Merge pull request #290 from fghaas/tox-plus-series

Support the Series plugin
This commit is contained in:
Alexandre Vicenzi 2022-07-08 15:45:32 +02:00 committed by GitHub
commit 0006c3e6db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 69 additions and 0 deletions

28
.github/workflows/pelican-test.yaml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Pelican test
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install tox tox-gh-actions
- name: Test with tox
run: tox

View file

@ -17,6 +17,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
- Open Graph - Open Graph
- Rich Snippets (JSON-LD) - Rich Snippets (JSON-LD)
- Related Posts (via [plugin](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) or AddThis) - Related Posts (via [plugin](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) or AddThis)
- Series (via [plugin](https://github.com/pelican-plugins/series))
- Minute read (via [plugin](https://github.com/getpelican/pelican-plugins/tree/master/post_stats)) - Minute read (via [plugin](https://github.com/getpelican/pelican-plugins/tree/master/post_stats))
- [Multiple Code Highlight Styles](https://github.com/alexandrevicenzi/Flex/wiki/Code-Highlight) - [Multiple Code Highlight Styles](https://github.com/alexandrevicenzi/Flex/wiki/Code-Highlight)
- [Translation Support](https://github.com/alexandrevicenzi/Flex/wiki/Translations) - [Translation Support](https://github.com/alexandrevicenzi/Flex/wiki/Translations)
@ -41,6 +42,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
- [I18N Sub-sites](https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites) - [I18N Sub-sites](https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites)
- [Minute read](https://github.com/getpelican/pelican-plugins/tree/master/post_stats) - [Minute read](https://github.com/getpelican/pelican-plugins/tree/master/post_stats)
- [Related Posts](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) - [Related Posts](https://github.com/getpelican/pelican-plugins/tree/master/related_posts)
- [Series](https://github.com/pelican-plugins/series)
- [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image) - [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image)
- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors) - [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors)
- [Pelican Search](https://github.com/pelican-plugins/search) - [Pelican Search](https://github.com/pelican-plugins/search)

View file

@ -83,6 +83,29 @@
<div class="addthis_relatedposts_inline"></div> <div class="addthis_relatedposts_inline"></div>
{% endif %} {% endif %}
{% if article.series %}
<div class="related-posts">
{% set text = SERIES_TEXT|default('Part %(index)s of the %(name)s series') %}
<h4>{{ text|format(index=article.series.index, name=article.series.name) }}</h4>
{% if article.series.all_previous %}
<h5>Previous articles</h5>
<ul>
{% for article in article.series.all_previous %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if article.series.all_next %}
<h5>Next articles</h5>
<ul>
{% for article in article.series.all_next %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endif %}
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.article_bottom %} {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.article_bottom %}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle ads-responsive" <ins class="adsbygoogle ads-responsive"

16
tox.ini Normal file
View file

@ -0,0 +1,16 @@
[tox]
envlist = py{36,37,38,39}
skipsdist = True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
[testenv]
deps =
-r docs/requirements.txt
commands =
pelican -s docs/pelicanconf.py