-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize and bring up to latest plugin standards
- Loading branch information
1 parent
1b0624e
commit 7806ecb
Showing
12 changed files
with
457 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"template": "https://github.com/getpelican/cookiecutter-pelican-plugin", | ||
"commit": "b4b9b4f83b624cfd7728a3f1527d272be28ee916", | ||
"checkout": null, | ||
"context": { | ||
"cookiecutter": { | ||
"plugin_name": "Dead Links", | ||
"repo_name": "deadlinks", | ||
"package_name": "deadlinks", | ||
"distribution_name": "pelican-deadlinks", | ||
"version": "0.0.0", | ||
"description": "Pelican plugin to scan links and check their status codes", | ||
"authors": "{name = \"Justin Mayer\", email = \"[email protected]\"}", | ||
"keywords": "\"pelican\", \"plugin\", \"link\", \"checker\"", | ||
"readme": "README.md", | ||
"contributing": "CONTRIBUTING.md", | ||
"license": "MIT License|MIT", | ||
"repo_url": "https://github.com/pelican-plugins/deadlinks", | ||
"dev_status": "5 - Production/Stable", | ||
"tests_exist": false, | ||
"python_version": ">=3.8.1,<4.0", | ||
"pelican_version": ">=4.5", | ||
"_template": "https://github.com/getpelican/cookiecutter-pelican-plugin" | ||
} | ||
}, | ||
"directory": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.py] | ||
max_line_length = 88 | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: justinmayer | ||
liberapay: pelican |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
PYTEST_ADDOPTS: "--color=yes" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python & PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: pdm install | ||
|
||
- name: Run linters | ||
run: pdm run invoke lint --diff | ||
|
||
deploy: | ||
name: Deploy | ||
environment: Deployment | ||
needs: [lint] | ||
runs-on: ubuntu-latest | ||
if: github.ref=='refs/heads/main' && github.event_name!='pull_request' | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Check release | ||
id: check_release | ||
run: | | ||
python -m pip install autopub httpx | ||
python -m pip install https://github.com/scikit-build/github-release/archive/master.zip | ||
autopub check | ||
- name: Publish | ||
if: ${{ steps.check_release.outputs.autopub_release=='true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
autopub prepare | ||
autopub commit | ||
autopub build | ||
autopub githubrelease | ||
- name: Upload package to PyPI | ||
if: ${{ steps.check_release.outputs.autopub_release=='true' }} | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,6 @@ ENV/ | |
*.swp | ||
*.orig | ||
|
||
# PDM | ||
.pdm-python | ||
pdm.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
ci: | ||
autoupdate_schedule: quarterly | ||
|
||
# See https://pre-commit.com/hooks.html for info on hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: forbid-new-submodules | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.1 | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format | ||
args: ["--check"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Contributing | ||
============ | ||
|
||
Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][]. | ||
|
||
To start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section. | ||
|
||
[existing issues]: https://github.com/pelican-plugins/deadlinks/issues | ||
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
# -*- coding: utf8 -*- | ||
|
||
from .deadlinks import * | ||
|
||
|
||
from .deadlinks import * # noqa: F403,PGH004,RUF100 |
Oops, something went wrong.