Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"template": "https://github.com/getpelican/cookiecutter-pelican-plugin",
"commit": "c961d0e4dbb0758b15f7102c6f5585660dd0551a",
"checkout": null,
"context": {
"cookiecutter": {
"plugin_name": "yaml-metadata",
"repo_name": "yaml-metadata",
"package_name": "yaml_metadata",
"distribution_name": "pelican-yaml-metadata",
"version": "2.1.0",
"description": "Pelican plugin for YAML-formatted Markdown metadata headers",
"authors": "{name = \"Carey Metcalfe\", email = \"carey@cmetcalfe.ca\"}, {name = \"Justin Mayer\", email = \"entroP@gmail.com\"}",
"keywords": "\"pelican\", \"plugin\"",
"readme": "README.md",
"contributing": "CONTRIBUTING.md",
"license": "MIT License|MIT",
"repo_url": "https://github.com/pelican-plugins/yaml-metadata",
"dev_status": "5 - Production/Stable",
"tests_exist": false,
"python_version": ">=3.11",
"pelican_version": ">=4.5",
"_template": "https://github.com/getpelican/cookiecutter-pelican-plugin",
"_commit": "9fff5f77d0678218def8c081481d3ad3d66cd3c7"
}
},
"directory": null
}
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: justinmayer
liberapay: pelican
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: "\U0001F41E Bug Report"
about: Did you find a bug?
title: ''
labels: bug
assignees: ''

---

<!--
Hi there! Thank you for discovering and submitting an issue.

Before you submit this, let’s make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill them first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [ ] 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 have searched the [issues](https://github.com/pelican-plugins/yaml-metadata/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate.

<!--
Once the above boxes are checked, if you are able to fill in the following list
with your information, it would be very helpful for maintainers.
-->

- **OS version and name**: <!-- Replace with version + name -->
- **Python version**: <!-- Replace with version -->
- **Pelican version**: <!-- Replace with version -->
- **Link to theme**: <!-- Replace with link to the theme you are using -->
- **Links to plugins**: <!-- Replace with list of links to plugins you are using -->
- **Link to your site**: <!-- If available, replace with link to your site -->
- **Link to your source**: <!-- If available, replace with link to relevant source repository -->
- **Link to a [Gist](https://gist.github.com/) with the contents of your settings file**: <!-- If your source is not accessible, put Gist link here -->

## Issue
<!--
Now feel free to write your issue. Please avoid vague phrases like “[…] doesn’t work”.
Be descriptive! Thanks again 🙌 ❤️
-->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/---documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "\U0001F4DA Documentation"
about: Did you find errors, problems, or anything unclear in the README/docs?
title: ''
labels: docs
assignees: ''

---

<!--
Hi there! Thank you for discovering and submitting an issue with our documentation.

Before you submit this, let’s make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill them first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [ ] I have searched the [issues](https://github.com/pelican-plugins/yaml-metadata/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate.

## Issue
<!-- Now feel free to write your issue, but please be descriptive! Thanks again 🙌 ❤️ -->
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/---enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: "\U0001F381 Feature Request"
about: Do you have ideas for new features and improvements?
title: ''
labels: enhancement
assignees: ''

---

<!--
Hi there! Thank you for wanting to make Pelican better.

Before you submit this, let’s make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill them first. The last one is optional but encouraged.
-->

<!-- Checked checkbox should look like this: [x] -->
- [ ] I have searched the [issues](https://github.com/pelican-plugins/yaml-metadata/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate.
- [ ] I have searched the [Pelican documentation](https://docs.getpelican.com/) and believe that my question is not covered.
- [ ] I am willing to lend a hand to help implement this feature. <!-- optional but encouraged -->

## Feature Request
<!-- Now feel free to write your idea for improvement. Thanks again 🙌 ❤️ -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/---everything-else.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "\U0001F5C3 Everything Else"
about: Do you have a question/issue that does not fall into any of the other categories?
title: ''
labels: question
assignees: ''

---

<!--
Describe your question/issue here. This space is meant to be used for general questions
that are not bugs, feature requests, or documentation issues.
Before you submit this, let’s make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill them first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [ ] I have searched the [issues](https://github.com/pelican-plugins/yaml-metadata/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate.
- [ ] I have searched the [Pelican documentation](https://docs.getpelican.com/) and believe that my question is not covered.

## Issue
<!-- Now feel free to write your issue, but please be descriptive! Thanks again 🙌 ❤️ -->
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: true
contact_links:
- name: '💬 Pelican IRC Channel on Freenode'
url: https://kiwiirc.com/client/irc.freenode.net/?#pelican
about: |
Chat with the community, ask questions, and learn about best practices.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Pull Request Checklist

Resolves: #issue-number-here <!-- Only if related issue *already* exists — otherwise remove this line -->

<!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. Also, please read our [contribution guide](https://docs.getpelican.com/en/latest/contribute.html#contributing-code) at least once — it will save you unnecessary review cycles! -->

- [ ] Ensured **tests pass** and (if applicable) updated functional test output
- [ ] Conformed to **code style guidelines** by running appropriate linting tools
- [ ] Added **tests** for changed code
- [ ] Updated **documentation** for changed code

<!-- If you have *any* questions to *any* of the points above, just **submit and ask**! This checklist is here to *help* you, not to deter you from contributing! -->
27 changes: 16 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ 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@v3
- uses: actions/checkout@v5
with:
persist-credentials: false

- name: Set up PDM
uses: pdm-project/setup-pdm@v3
- name: Set up Python & PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install dependencies
run: pdm install
Expand All @@ -33,26 +41,23 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.9"
python-version: "3.11"

- name: Check release
id: check_release
run: |
python -m pip install --upgrade pip
python -m pip install autopub[github]
autopub check

- name: Publish
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
autopub prepare
autopub commit
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:
# 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
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -21,8 +21,8 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.15.12
hooks:
- id: ruff
- id: ruff-check
- id: ruff-format
args: ["--check"]
7 changes: 4 additions & 3 deletions pelican/plugins/yaml_metadata/yaml_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
re.MULTILINE | re.DOTALL,
)

DUPES_NOT_ALLOWED = set(
k for k, v in DUPLICATES_DEFINITIONS_ALLOWED.items() if not v
) - {"tags", "authors"}
DUPES_NOT_ALLOWED = {k for k, v in DUPLICATES_DEFINITIONS_ALLOWED.items() if not v} - {
"tags",
"authors",
}

_DEL = object()

Expand Down
32 changes: 17 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors = [
{name = "Carey Metcalfe", email = "carey@cmetcalfe.ca"},
{name = "Justin Mayer", email = "entroP@gmail.com"}
]
readme = "README.md"
license = {text = "MIT"}
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -17,32 +17,33 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8.1"
requires-python = ">=3.11"
Comment thread
pR0Ps marked this conversation as resolved.
dependencies = [
"markdown>=3.3.4",
"markdown>=3.4.0",
"pelican>=4.8.0",
"pyYAML>=5.4.1",
]

[project.urls]
Homepage = "https://github.com/pelican-plugins/yaml-metadata"
"Funding" = "https://donate.getpelican.com/"
"Homepage" = "https://github.com/pelican-plugins/yaml-metadata"
"Issue Tracker" = "https://github.com/pelican-plugins/yaml-metadata/issues"
"Changelog" = "https://github.com/pelican-plugins/yaml-metadata/blob/main/CHANGELOG.md"
"Funding" = "https://donate.getpelican.com/"

[tool.pdm]
[project.optional-dependencies]
markdown = ["markdown>=3.4.0"]

[tool.pdm.dev-dependencies]
[dependency-groups]
lint = [
"invoke>=2.2.0",
"ruff>=0.4.1,<0.5.0"
"invoke>=2.2",
"ruff>=0.15.12,<1.0.0",
]

[tool.pdm.build]
Expand All @@ -51,10 +52,10 @@ source-includes = [
"CONTRIBUTING.md",
]
includes = ["pelican/"]
excludes = ["**/.DS_Store", "tasks.py"]
excludes = ["**/.DS_Store"]

[tool.autopub]
project-name = "Pelican YAML Metadata"
project-name = "yaml-metadata"
git-username = "botpub"
git-email = "52496925+botpub@users.noreply.github.com"
append-github-contributor = true
Expand All @@ -63,6 +64,7 @@ append-github-contributor = true
select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
Expand Down Expand Up @@ -90,7 +92,7 @@ ignore = [
"D107", # missing docstring in __init__
"D203", # blank line before class docstring
"D213", # multi-line docstring summary should start at the second line
"ISC001",
"ISC001", # disabled so `ruff format` works without warning
"PLW2901",
"TRY401",
]
Expand Down
Loading
Loading