diff --git a/.coveragerc b/.coveragerc index 6347d80b..fdd2cad6 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,2 @@ [report] -omit = - pelican/tests/* - pelican/signals.py +omit = pelican/tests/* diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index df6e6f61..0d92c9d9 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -5,17 +5,3 @@ cabdb26cee66e1173cf16cb31d3fe5f9fa4392e7 ecd598f293161a52564aa6e8dfdcc8284dc93970 # Apply Ruff and pyupgrade to Jinja templates db241feaa445375dc05e189e69287000ffe5fa8e -# Change pre-commit to run ruff and ruff-format with fixes -6d8597addb17d5fa3027ead91427939e8e4e89ec -# Upgrade Ruff from 0.1.x to 0.4.x -0bd02c00c078fe041b65fbf4eab13601bb42676d -# Apply more Ruff checks to code -9d30c5608a58d202b1c02d55651e6ac746bfb173 -# Apply yet more Ruff checks to code -7577dd7603f7cb3a09922d1edb65b6eafb6e2ac7 -# Indent Jinja templates, HTML, CSS, and JS via DjHTML -4af40e80772a58eac8969360e5caeb99e3e26e78 -# Ruff UP031: Use F-string format specifiers instead of percent format -30bde3823f50b9ba8ac5996c1c46bb72031aa6b8 -# Upgrade Ruff to 0.12.x & comply with new rules -4dedf1795831db99d18941c707923ba48cc28ce7 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 0fbd850c..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -.github/workflows/github_pages.yml @seanh diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md index 6825b61c..c0f9dec6 100644 --- a/.github/ISSUE_TEMPLATE/---bug-report.md +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -17,15 +17,11 @@ assignees: '' - [ ] I have read the [Filing Issues](https://docs.getpelican.com/en/latest/contribute.html#filing-issues) and subsequent “How to Get Help” sections of the documentation. -- [ ] I can reproduce this problem with stock/default settings file, theme, and sample content (as described in above “How to Get Help” sections of the documentation). - [ ] I have searched the [issues](https://github.com/getpelican/pelican/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate. - **OS version and name**: diff --git a/.github/ISSUE_TEMPLATE/---everything-else.md b/.github/ISSUE_TEMPLATE/---everything-else.md index 23a3f7bd..fd2a58ae 100644 --- a/.github/ISSUE_TEMPLATE/---everything-else.md +++ b/.github/ISSUE_TEMPLATE/---everything-else.md @@ -8,11 +8,7 @@ assignees: '' --- - [ ] I have searched the [issues](https://github.com/getpelican/pelican/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate. - [ ] I have searched the [documentation](https://docs.getpelican.com/) and believe that my question is not covered. -- [ ] I have carefully read the [How to Get Help](https://docs.getpelican.com/en/latest/contribute.html#how-to-get-help) section of the documentation. ## Issue diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index a07de4ab..9e240bd9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,6 +1,6 @@ --- # Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser -blank_issues_enabled: false +blank_issues_enabled: true contact_links: - name: '💬 Pelican IRC Channel' url: https://web.libera.chat/?#pelican diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 4fed5330..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,9 +0,0 @@ -# See https://docs.github.com/en/free-pro-team@latest/ -# github/administering-a-repository/enabling-and-disabling-version-updates ---- -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index 9c279ab1..ccf172b4 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -1,4 +1,3 @@ -# Workflow for building the site and (optionally) publishing it to GitHub Pages. name: Deploy to GitHub Pages on: workflow_call: @@ -17,83 +16,39 @@ on: default: "output/" description: "Where to output the generated files (`pelican`'s `--output` option)" type: string - theme: - required: false - default: "" - description: "The GitHub repo URL of a custom theme to use, for example: 'https://github.com/seanh/sidecar.git'" - type: string - python: - required: false - default: "3.12" - description: "The version of Python to use, for example: '3.12' (to use the most recent version of Python 3.12, this is faster) or '3.12.1' (to use an exact version, slower)" - type: string - siteurl: - required: false - default: "" - description: "The base URL of your web site (Pelican's SITEURL setting). If not passed this will default to the URL of your GitHub Pages site, which is correct in most cases." - type: string - feed_domain: - required: false - default: "" - description: "The domain to be prepended to feed URLs (Pelican's FEED_DOMAIN setting). If not passed this will default to the URL of your GitHub Pages site, which is correct in most cases." - type: string - deploy: - required: false - default: true - description: "Whether to deploy the site. If true then build the site and deploy it. If false then just test that the site builds successfully but don't deploy anything." - type: boolean permissions: contents: read pages: write id-token: write +concurrency: + group: "pages" + cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: - python-version: ${{ inputs.python }} - - name: Checkout theme - if: ${{ inputs.theme }} - run: git clone '${{ inputs.theme }}' .theme + python-version: "3.11" - name: Configure GitHub Pages id: pages - uses: actions/configure-pages@v5 + uses: actions/configure-pages@v3 - name: Install requirements run: pip install ${{ inputs.requirements }} - name: Build Pelican site - shell: python run: | - import subprocess - - cmd = "pelican" - cmd += " --settings ${{ inputs.settings }}" - cmd += " --extra-settings" - cmd += """ SITEURL='"${{ inputs.siteurl || steps.pages.outputs.base_url }}"'""" - cmd += """ FEED_DOMAIN='"${{ inputs.feed_domain || steps.pages.outputs.base_url }}"'""" - cmd += " --output ${{ inputs.output-path }}" - - if "${{ inputs.theme }}": - cmd += " --theme-path .theme" - - subprocess.run(cmd, shell=True, check=True) - - name: Fix permissions - run: | - chmod -c -R +rX "${{ inputs.output-path }}" | while read line; do - echo "::warning title=Invalid file permissions automatically fixed::$line" - done + pelican \ + --settings "${{ inputs.settings }}" \ + --extra-settings SITEURL='"${{ steps.pages.outputs.base_url }}"' \ + --output "${{ inputs.output-path }}" - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v2 with: path: ${{ inputs.output-path }} deploy: - concurrency: - group: "pages" - cancel-in-progress: false - if: ${{ inputs.deploy }} environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -102,4 +57,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e5a877b..c29a08c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,15 +15,17 @@ jobs: strategy: matrix: os: [ubuntu, macos, windows] - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.10", "3.11", "3.12"] include: + - os: ubuntu + python: "3.8" - os: ubuntu python: "3.9" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} cache: "pip" @@ -50,10 +52,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: pdm-project/setup-pdm@v4 + - uses: actions/checkout@v3 + - uses: pdm-project/setup-pdm@v3 with: - python-version: "3.11" + python-version: 3.9 cache: true cache-dependency-path: ./pyproject.toml - name: Install dependencies @@ -62,16 +64,16 @@ jobs: - name: Run linters run: pdm lint --diff - name: Run pre-commit checks on all files - uses: pre-commit/action@v3.0.1 + uses: pre-commit/action@v3.0.0 build: name: Test build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: pdm-project/setup-pdm@v4 + - uses: actions/checkout@v3 + - uses: pdm-project/setup-pdm@v3 with: - python-version: "3.11" + python-version: 3.9 cache: true cache-dependency-path: ./pyproject.toml - name: Install dependencies @@ -86,11 +88,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.9" cache: "pip" cache-dependency-path: "**/requirements/*" - name: Install tox @@ -98,7 +100,7 @@ jobs: - name: Check run: tox -e docs - name: cache the docs for inspection - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: docs path: docs/_build/html/ @@ -108,21 +110,21 @@ jobs: environment: Deployment needs: [test, lint, docs, build] runs-on: ubuntu-latest - if: github.ref=='refs/heads/main' && github.event_name!='pull_request' && github.repository == 'getpelican/pelican' + if: github.ref=='refs/heads/master' && github.event_name!='pull_request' && github.repository == 'getpelican/pelican' permissions: contents: write id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: token: ${{ secrets.GH_TOKEN }} - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.9" - name: Check release id: check_release diff --git a/.gitignore b/.gitignore index 6ea22c9c..473efea2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.pyc .DS_Store docs/_build -docs/*/_build +docs/fr/_build build dist tags @@ -17,13 +17,4 @@ samples/output *.pem *.lock .pdm-python -.vale .venv -**/LC_MESSAGES/*.mo - -# direnv -.envrc - -# IDE cruft -.idea -.vscode diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 38287df9..333bc3c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for info on hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-ast @@ -13,18 +13,11 @@ repos: - id: end-of-file-fixer - id: forbid-new-submodules - id: trailing-whitespace - - repo: https://github.com/astral-sh/ruff-pre-commit - # ruff version should match the one in pyproject.toml - rev: v0.12.2 + rev: v0.1.5 hooks: - - id: ruff-check - args: [--fix, --exit-non-zero-on-fix] + - id: ruff - id: ruff-format + args: ["--check"] - - repo: https://github.com/rtts/djhtml - rev: '3.0.8' - hooks: - - id: djhtml - - id: djcss - - id: djjs +exclude: ^pelican/tests/output/ diff --git a/.vale.ini b/.vale.ini deleted file mode 100644 index aad18229..00000000 --- a/.vale.ini +++ /dev/null @@ -1,10 +0,0 @@ -StylesPath = .vale/styles - -Vocab = Pelican - -MinAlertLevel = suggestion - -Packages = proselint, alex - -[*] -BasedOnStyles = Vale, proselint, alex diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 5ac5f0ad..4faace91 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -24,7 +24,7 @@ Before you ask for help, please make sure you do the following: 3. Try reproducing the issue in a clean environment, ensuring you are using: -* latest Pelican release (or an up-to-date Git clone of Pelican ``main`` branch) +* latest Pelican release (or an up-to-date Git clone of Pelican master) * latest releases of libraries used by Pelican * no plugins or only those related to the issue @@ -87,7 +87,7 @@ Using Git and GitHub -------------------- * `Create a new branch`_ specific to your change (as opposed to making - your commits in the ``main`` branch). + your commits in the master branch). * **Don't put multiple unrelated fixes/features in the same branch / pull request.** For example, if you're working on a new feature and find a bugfix that doesn't *require* your new feature, **make a new distinct branch and pull diff --git a/README.rst b/README.rst index 0e3577ec..3f708242 100644 --- a/README.rst +++ b/README.rst @@ -64,8 +64,8 @@ Why the name “Pelican”? .. _`Pelican's internals`: https://docs.getpelican.com/en/latest/internals.html .. _`hosted on GitHub`: https://github.com/getpelican/pelican -.. |build-status| image:: https://img.shields.io/github/actions/workflow/status/getpelican/pelican/main.yml?branch=main - :target: https://github.com/getpelican/pelican/actions/workflows/main.yml?query=branch%3Amain +.. |build-status| image:: https://img.shields.io/github/actions/workflow/status/getpelican/pelican/main.yml?branch=master + :target: https://github.com/getpelican/pelican/actions/workflows/main.yml?query=branch%3Amaster :alt: GitHub Actions CI: continuous integration status .. |pypi-version| image:: https://img.shields.io/pypi/v/pelican.svg :target: https://pypi.org/project/pelican/ diff --git a/docs/_templates/page.html b/docs/_templates/page.html index 0fbfdf7d..233f43ad 100644 --- a/docs/_templates/page.html +++ b/docs/_templates/page.html @@ -1,201 +1,201 @@ {% extends "base.html" %} {% block body -%} - {{ super() }} - {% include "partials/icons.html" %} +{{ super() }} +{% include "partials/icons.html" %} - - - - + + + + - {% if theme_announcement -%} -