Merge branch 'master' into support/use-no-jekyll-flag-ghp-import

This commit is contained in:
Justin Mayer 2024-01-15 11:05:57 +01:00 committed by GitHub
commit 5319001ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 16 deletions

View file

@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:

View file

@ -23,7 +23,7 @@ jobs:
python: "3.9"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
@ -52,10 +52,10 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v3
with:
python-version: 3.9
python-version: "3.11"
cache: true
cache-dependency-path: ./pyproject.toml
- name: Install dependencies
@ -70,10 +70,10 @@ jobs:
name: Test build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v3
with:
python-version: 3.9
python-version: "3.11"
cache: true
cache-dependency-path: ./pyproject.toml
- name: Install dependencies
@ -88,11 +88,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
cache: "pip"
cache-dependency-path: "**/requirements/*"
- name: Install tox
@ -117,14 +117,14 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Check release
id: check_release

View file

@ -631,7 +631,7 @@ are not included by default in tag, category, and author indexes, nor in the
main article feed. This has the effect of creating an "unlisted" post.
.. _W3C ISO 8601: https://www.w3.org/TR/NOTE-datetime
.. _AsciiDoc: https://www.methods.co.nz/asciidoc/
.. _AsciiDoc: https://asciidoc.org
.. _Pelican Plugins: https://github.com/pelican-plugins
.. _pelican-plugins: https://github.com/getpelican/pelican-plugins
.. _Python-Markdown: https://github.com/Python-Markdown/markdown

View file

@ -26,6 +26,12 @@ not be converted (as Pelican also supports Markdown).
manually, or use a plugin such as `More Categories`_ that enables multiple
categories per article.
.. note::
Imported pages may contain links to images that still point to the original site.
So you might want to download those images into your local content and manually
re-link them from the relevant pages of your site.
Dependencies
============
@ -121,6 +127,15 @@ For WordPress::
$ pelican-import --wpfile -o ~/output ~/posts.xml
For Medium (an example of using an RSS feed):
$ python -m pip install feedparser
$ pelican-import --feed https://medium.com/feed/@username
.. note::
The RSS feed may only return the most recent posts — not all of them.
Tests
=====

View file

@ -85,13 +85,15 @@ class FatalLogger(LimitLogger):
warnings_fatal = False
errors_fatal = False
# adding `stacklevel=2` means that the displayed filename and line number
# will match the "original" calling location, rather than the wrapper here
def warning(self, *args, **kwargs):
super().warning(*args, **kwargs)
super().warning(*args, stacklevel=2, **kwargs)
if FatalLogger.warnings_fatal:
raise RuntimeError("Warning encountered")
def error(self, *args, **kwargs):
super().error(*args, **kwargs)
super().error(*args, stacklevel=2, **kwargs)
if FatalLogger.errors_fatal:
raise RuntimeError("Error encountered")

View file

@ -37,6 +37,7 @@ DROPBOX_DIR={{dropbox_dir}}
{% endif %}
{% if github %}
GITHUB_PAGES_BRANCH={{github_pages_branch}}
GITHUB_PAGES_COMMIT_MESSAGE=Generate Pelican site
{% endif %}
@ -161,7 +162,7 @@ cf_upload: publish
{% if github %}
{% set upload = upload + ["github"] %}
github: publish
ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) "$(OUTPUTDIR)" --no-jekyll
ghp-import -m "$(GITHUB_PAGES_COMMIT_MESSAGE)" -b $(GITHUB_PAGES_BRANCH) "$(OUTPUTDIR)" --no-jekyll
git push origin $(GITHUB_PAGES_BRANCH)
{% endif %}

View file

@ -1,5 +1,5 @@
[tox]
envlist = py{3.8,3.9,3.10,3.11.3.12},docs
envlist = py{3.8,3.9,3.10,3.11,3.12},docs
[testenv]
basepython =
@ -18,7 +18,7 @@ commands =
pytest -s --cov=pelican pelican
[testenv:docs]
basepython = python3.9
basepython = python3.11
deps =
-rrequirements/docs.pip
changedir = docs