Skip to content
Open
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
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Format and Lint
on:
pull_request:
branches: [main]
workflow_dispatch:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-python:
name: Format and Lint Python
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
- name: Lint
run: uvx ruff check app.py --output-format=github
- name: Check formatting
run: uvx ruff format app.py --check

lint-docs:
name: Lint Markdown
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0
with:
globs: |
*.md
content/**/*.md
16 changes: 16 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"MD013": {
"line_length": 120,
"tables": false,
"code_blocks": false
},
"MD041": false,
"MD046": {
"style": "fenced"
},
"MD054": {
"inline": false,
"url_inline": false,
"collapsed": false
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# render-engine.org

The repository for the website for Render Engine

## Contributing
Expand Down
7 changes: 4 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from collections.abc import Callable
from pathlib import Path
from typing import Callable, Any
from typing import Any

from re_plugin_pack import LatestEntries
from render_engine import BasePageParser, Blog, Page, Site
from render_engine_markdown import MarkdownPageParser
from re_plugin_pack import LatestEntries

MD_EXTRAS: list[str] = [
"link-shortrefs",
Expand Down Expand Up @@ -41,6 +42,7 @@ class Index(Page):
)
]


@app.page
class About(Page):
template = "page.html"
Expand All @@ -49,7 +51,6 @@ class About(Page):
parser_extras: dict[str, list[str]] = {"markdown_extras": MD_EXTRAS}



@app.collection
class News(Blog):
content_path: str = "content/news" # path to content files
Expand Down
2 changes: 1 addition & 1 deletion content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ slug: about
Render Engine is a static site generator inspired by modern web frameworks to show the speed and flexibility of static
sites.

The project was created by Jay Miller for their personal website. Its original design was fewer than 200 lines of
The project was created by Jay Miller for their personal website. Its original design was fewer than 200 lines of
code. Jay continued to develop after failing to find a static site generator written purely in Python,
technically simple enough for a beginner to contribute to, and actively being maintained.

Expand Down
2 changes: 0 additions & 2 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ To checkout the source code, please see our [repositories].
Render Engine is an open source project and encourages the community to contribute. If you are interested,
please checkout the [contributing guidelines] and feel free to inquire about any unassigned [issue].



[documentation]: https://render-engine.readthedocs.io
[repositories]: https://github.com/render-engine
[PyPI]: https://pypi.org/org/render-engine
Expand Down
2 changes: 1 addition & 1 deletion content/news/djangonaut_space.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ thank you for their contributions to the project!
[![Djangonaut Space][djangonaut-logo]][Djangonaut Space]

[Djangonaut Space]: https://djangonaut.space
[djangonaut-logo]: /img/main-logo-transparent.svg
[djangonaut-logo]: /img/main-logo-transparent.svg
[Dan Shernicoff]: https://brassnet.biz
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ dependencies = [
site = "app"
module = "app"
collection = "news"

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = ["E", "F", "I", "UP"]