mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-21 19:41:33 +00:00
feat: add github edit btn (#1822)
Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
|
|||||||
|
|
||||||
gem 'github-pages', group: :jekyll_plugins
|
gem 'github-pages', group: :jekyll_plugins
|
||||||
gem 'webrick'
|
gem 'webrick'
|
||||||
|
gem 'jekyll-github-metadata'
|
||||||
@@ -273,6 +273,7 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
github-pages
|
github-pages
|
||||||
|
jekyll-github-metadata
|
||||||
webrick
|
webrick
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
url: "https://expressjs.com"
|
url: "https://expressjs.com"
|
||||||
baseurl: "/"
|
baseurl: "/"
|
||||||
|
|
||||||
|
repository: expressjs/expressjs.com
|
||||||
|
|
||||||
# Site settings
|
# Site settings
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
@@ -19,6 +21,7 @@ announcement: false # Enable or disable the announcements.
|
|||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- jekyll-redirect-from
|
- jekyll-redirect-from
|
||||||
|
- jekyll-github-metadata
|
||||||
|
|
||||||
highlighter: rouge
|
highlighter: rouge
|
||||||
# library used for syntax highlighting
|
# library used for syntax highlighting
|
||||||
@@ -34,6 +37,3 @@ exclude:
|
|||||||
- [uk/CHANGELOG.md]
|
- [uk/CHANGELOG.md]
|
||||||
- vendor/bundle
|
- vendor/bundle
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
|
||||||
|
|
||||||
github: [metadata]
|
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/tree/gh-pages/_includes/{{page.menu}}/en/3x" aria-label="GitHub button">
|
||||||
|
<span class="hidden-dark">
|
||||||
|
{% include icons/github-light.svg %}
|
||||||
|
</span>
|
||||||
|
<span class="hidden-light">
|
||||||
|
{% include icons/github-dark.svg %}
|
||||||
|
</span>
|
||||||
|
Edit this page</a>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/tree/gh-pages/_includes/{{page.menu}}/en/4x" aria-label="GitHub button">
|
||||||
|
<span class="hidden-dark">
|
||||||
|
{% include icons/github-light.svg %}
|
||||||
|
</span>
|
||||||
|
<span class="hidden-light">
|
||||||
|
{% include icons/github-dark.svg %}
|
||||||
|
</span>
|
||||||
|
Edit this page</a>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/tree/gh-pages/_includes/{{page.menu}}/en/5x" aria-label="GitHub button">
|
||||||
|
<span class="hidden-dark">
|
||||||
|
{% include icons/github-light.svg %}
|
||||||
|
</span>
|
||||||
|
<span class="hidden-light">
|
||||||
|
{% include icons/github-dark.svg %}
|
||||||
|
</span>
|
||||||
|
Edit this page</a>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,14 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<main>
|
<main>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/edit/gh-pages/{{ page.path }}" aria-label="GitHub button">
|
||||||
|
<span class="hidden-dark">
|
||||||
|
{% include icons/github-light.svg %}
|
||||||
|
</span>
|
||||||
|
<span class="hidden-light">
|
||||||
|
{% include icons/github-dark.svg %}
|
||||||
|
</span>
|
||||||
|
Edit this page</a>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -557,6 +557,25 @@ html[xmlns] .clearfix {
|
|||||||
color: var(--box-fg);
|
color: var(--box-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.edit-github-btn{
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
align-items: center;
|
||||||
|
width: fit-content;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
|
||||||
|
span {
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:is(:hover, :active, :focus) {
|
||||||
|
color: var(--fg);
|
||||||
|
background-color: var(--hover-bg);
|
||||||
|
outline: 1px solid var(--card-fg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#mobile-menu {
|
#mobile-menu {
|
||||||
display: none;
|
display: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -1381,6 +1400,10 @@ strong.eol {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden-light {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|||||||
Reference in New Issue
Block a user