From 7a98657c2b134237200f7073aa5035e5806d5767 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:21:21 +0100 Subject: [PATCH 1/9] clean: Simplify .gitignore --- .gitignore | 207 +---------------------------------------------------- 1 file changed, 3 insertions(+), 204 deletions(-) diff --git a/.gitignore b/.gitignore index dfcba97..d4252d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,210 +1,9 @@ -# Byte-compiled / optimized / DLL files +# Python __pycache__/ *.py[codz] -*$py.class -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py.cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock -#poetry.toml - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python. -# https://pdm-project.org/en/latest/usage/project/#working-with-version-control -#pdm.lock -#pdm.toml -.pdm-python -.pdm-build/ - -# pixi -# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control. -#pixi.lock -# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one -# in the .venv directory. It is recommended not to include this directory in version control. -.pixi - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.envrc -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# Abstra -# Abstra is an AI-powered process automation framework. -# Ignore directories containing user credentials, local state, and settings. -# Learn more at https://abstra.io/docs -.abstra/ - -# Visual Studio Code -# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore -# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore -# and can be added to the global gitignore or merged into this file. However, if you prefer, -# you could uncomment the following to ignore the entire vscode folder -# .vscode/ - -# Ruff stuff: -.ruff_cache/ - -# PyPI configuration file -.pypirc - -# Cursor -# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to -# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data -# refer to https://docs.cursor.com/context/ignore-files -.cursorignore -.cursorindexingignore - -# Marimo -marimo/_static/ -marimo/_lsp/ -__marimo__/ +# uv +.venv/ # Pelican output/ From 7b844e3830def4fa63e0449a957aff86000c6635 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:24:02 +0100 Subject: [PATCH 2/9] docs: Bootstrap README.md --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cd0516..7b472dc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # diffraction -immersed in the electromagnetic waves + +*immersed in the electromagnetic waves* + +A static site built with [Pelican](https://getpelican.com) and the [Attila](https://github.com/arulrajnet/attila) theme. + +## Setup + +Install dependencies into a local virtual environment: + +```bash +uv sync +``` + +## Usage + +| Task | Command | +|---|---| +| Build | `uv run pelican content` | +| Build, serve, and watch for changes | `uv run pelican --listen` | +| Production build | `uv run pelican content -s publishconf.py` | From db9f71a2505c10e03a6e2264cb9f5f268cf3813e Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:26:37 +0100 Subject: [PATCH 3/9] fix: Turn off plugin auto-discovery --- pelicanconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index 8a9a1c8..ccac0a1 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -19,10 +19,10 @@ # Theme THEME = attila.get_path() -HOME_COLOR = '#222222' # fallback header colour when no cover image is set +HOME_COLOR = '#222222' # fallback header color when no cover image is set # Plugins -SEO_REPORT = False # suppress seo_report.html generation +PLUGINS = [] # explicit list turns off auto-discovery # Social SOCIAL = ( From 55242627243068a398763f5b123fff72708acbfe Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:34:33 +0100 Subject: [PATCH 4/9] toolchain: Initialize GitHub Actions CI/CD --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4dc6678 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.10" + + - name: Install dependencies + run: uv sync + + - name: Build site + run: uv run pelican content -s publishconf.py -o output From 3e50d029035894b23fc59e2739d2d0b7effd4bbf Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:39:21 +0100 Subject: [PATCH 5/9] feat: Output debug messages --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dc6678..d217987 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,4 +26,4 @@ jobs: run: uv sync - name: Build site - run: uv run pelican content -s publishconf.py -o output + run: uv run pelican content -s publishconf.py -o output -D From f8212a64e40cb47d0ccd1e39b0d424efec3d15ca Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:44:23 +0100 Subject: [PATCH 6/9] clean: Simplify build targets --- .github/workflows/build.yml | 2 +- README.md | 1 - content/.gitkeep | 0 pelicanconf.py | 10 +++++----- publishconf.py | 22 ---------------------- 5 files changed, 6 insertions(+), 29 deletions(-) create mode 100644 content/.gitkeep delete mode 100644 publishconf.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d217987..989fd65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,4 +26,4 @@ jobs: run: uv sync - name: Build site - run: uv run pelican content -s publishconf.py -o output -D + run: uv run pelican content -s pelicanconf.py -o output -D diff --git a/README.md b/README.md index 7b472dc..c9c3b74 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,3 @@ uv sync |---|---| | Build | `uv run pelican content` | | Build, serve, and watch for changes | `uv run pelican --listen` | -| Production build | `uv run pelican content -s publishconf.py` | diff --git a/content/.gitkeep b/content/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pelicanconf.py b/pelicanconf.py index ccac0a1..24cdc03 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -11,11 +11,11 @@ DEFAULT_LANG = 'en' # Feed generation is usually not desired when developing -FEED_ALL_ATOM = None -CATEGORY_FEED_ATOM = None -TRANSLATION_FEED_ATOM = None -AUTHOR_FEED_ATOM = None -AUTHOR_FEED_RSS = None +FEED_ALL_ATOM = True +CATEGORY_FEED_ATOM = False +TRANSLATION_FEED_ATOM = False +AUTHOR_FEED_ATOM = False +AUTHOR_FEED_RSS = False # Theme THEME = attila.get_path() diff --git a/publishconf.py b/publishconf.py deleted file mode 100644 index 51e0f9c..0000000 --- a/publishconf.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file is only used if you use `make publish` or -# explicitly specify it as your config file. - -import os -import sys - -sys.path.append(os.curdir) -from pelicanconf import * - -# If your site is available via HTTPS, make sure SITEURL begins with https:// -SITEURL = "https://diffraction.pt/blog" -RELATIVE_URLS = False - -FEED_ALL_ATOM = "feeds/all.atom.xml" -CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml" - -DELETE_OUTPUT_DIRECTORY = True - -# Following items are often useful when publishing - -# DISQUS_SITENAME = "" -# GOOGLE_ANALYTICS = "" From 279257f097274003e31e3bddbab30fda91d0a279 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:49:09 +0100 Subject: [PATCH 7/9] Revert "clean: Simplify build targets" This reverts commit f8212a64e40cb47d0ccd1e39b0d424efec3d15ca. --- .github/workflows/build.yml | 2 +- README.md | 1 + content/.gitkeep | 0 pelicanconf.py | 10 +++++----- publishconf.py | 22 ++++++++++++++++++++++ 5 files changed, 29 insertions(+), 6 deletions(-) delete mode 100644 content/.gitkeep create mode 100644 publishconf.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 989fd65..d217987 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,4 +26,4 @@ jobs: run: uv sync - name: Build site - run: uv run pelican content -s pelicanconf.py -o output -D + run: uv run pelican content -s publishconf.py -o output -D diff --git a/README.md b/README.md index c9c3b74..7b472dc 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,4 @@ uv sync |---|---| | Build | `uv run pelican content` | | Build, serve, and watch for changes | `uv run pelican --listen` | +| Production build | `uv run pelican content -s publishconf.py` | diff --git a/content/.gitkeep b/content/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/pelicanconf.py b/pelicanconf.py index 24cdc03..ccac0a1 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -11,11 +11,11 @@ DEFAULT_LANG = 'en' # Feed generation is usually not desired when developing -FEED_ALL_ATOM = True -CATEGORY_FEED_ATOM = False -TRANSLATION_FEED_ATOM = False -AUTHOR_FEED_ATOM = False -AUTHOR_FEED_RSS = False +FEED_ALL_ATOM = None +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None # Theme THEME = attila.get_path() diff --git a/publishconf.py b/publishconf.py new file mode 100644 index 0000000..51e0f9c --- /dev/null +++ b/publishconf.py @@ -0,0 +1,22 @@ +# This file is only used if you use `make publish` or +# explicitly specify it as your config file. + +import os +import sys + +sys.path.append(os.curdir) +from pelicanconf import * + +# If your site is available via HTTPS, make sure SITEURL begins with https:// +SITEURL = "https://diffraction.pt/blog" +RELATIVE_URLS = False + +FEED_ALL_ATOM = "feeds/all.atom.xml" +CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml" + +DELETE_OUTPUT_DIRECTORY = True + +# Following items are often useful when publishing + +# DISQUS_SITENAME = "" +# GOOGLE_ANALYTICS = "" From 8e68441022087ad02902a35148d7a357ea3a5576 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:49:44 +0100 Subject: [PATCH 8/9] fix: Output verbose messages --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d217987..aa4ddd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,4 +26,4 @@ jobs: run: uv sync - name: Build site - run: uv run pelican content -s publishconf.py -o output -D + run: uv run pelican content -s publishconf.py -o output -v From cb08ca6369f51f4b37baf6e89d762ece7502f8a2 Mon Sep 17 00:00:00 2001 From: Paulo Ribeiro Date: Fri, 17 Apr 2026 10:53:23 +0100 Subject: [PATCH 9/9] fix: Add content/.gitkeep --- content/.gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 content/.gitkeep diff --git a/content/.gitkeep b/content/.gitkeep new file mode 100644 index 0000000..c6c4dac --- /dev/null +++ b/content/.gitkeep @@ -0,0 +1 @@ +This file exists to force git to track the empty content directory.