pagination rdundant, adding optin for view repo
This commit is contained in:
parent
ebd97d3e76
commit
ecb33848cb
3 changed files with 18 additions and 3 deletions
|
|
@ -36,9 +36,6 @@ module.exports = {
|
|||
paginationPrevious: 'Previous',
|
||||
paginationNext: 'Next'
|
||||
},
|
||||
pagination: {
|
||||
itemsPerPage: 20
|
||||
},
|
||||
navigation: {
|
||||
ariaTop: 'Main',
|
||||
ariaBottom: 'Complementary',
|
||||
|
|
@ -64,5 +61,10 @@ module.exports = {
|
|||
url: ''
|
||||
}
|
||||
},
|
||||
viewRepo: {
|
||||
// this is for the view/edit on github link. The value in the package.json will be pulled in.
|
||||
allow: true,
|
||||
infoText: 'View this page on GitHub'
|
||||
},
|
||||
easteregg: true
|
||||
};
|
||||
|
|
|
|||
12
src/_includes/components/edit-on.njk
Normal file
12
src/_includes/components/edit-on.njk
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% if meta.viewRepo.allow %}
|
||||
<hr />
|
||||
<p class="text-step-min-1">
|
||||
{{ meta[page.lang].blog.githubEdit }}
|
||||
<a
|
||||
href="{{ pkg.repository.url | url | replace('.git', '/tree/main/') }}{{
|
||||
page.inputPath
|
||||
}}"
|
||||
>{{ meta.viewRepo.infoText }}</a
|
||||
>.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
|
@ -29,6 +29,7 @@ schema: blog
|
|||
</p>
|
||||
|
||||
{{ content | safe }}
|
||||
{% include 'components/edit-on.njk' %}
|
||||
</div>
|
||||
|
||||
<!-- h-card infos: https://indieweb.org/authorship -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue