Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"permissions": {
"allow": [
"Bash(awk *)",
"Bash(cat *)",
"Bash(grep *)",
"Bash(uv sync)",
"Bash(uv run pelican *)"
]
}
}
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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 -v
209 changes: 6 additions & 203 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,207 +1,10 @@
# Byte-compiled / optimized / DLL files
# Python
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so
# uv
.venv/

# 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__/
# Pelican
output/
.cache/
28 changes: 28 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Commands

| Task | Command |
|---|---|
| Install dependencies | `uv sync` |
| Build (dev) | `uv run pelican content` |
| Build, serve, and watch | `uv run pelican --listen` |
| Production build | `uv run pelican content -s publishconf.py` |

There is no Makefile or tasks.py — all tasks run via `uv run`.

## Configuration split

`pelicanconf.py` is the development config: `SITEURL = ""` and `RELATIVE_URLS = True`. `publishconf.py` imports from it and overrides for production: absolute `SITEURL`, Atom feeds enabled, and `DELETE_OUTPUT_DIRECTORY = True`.

When editing site-wide settings, be careful which config file needs to change — production-only settings (feeds, absolute URLs) belong in `publishconf.py`; everything else in `pelicanconf.py`.

## Theme

The [Attila](https://github.com/arulrajnet/attila) theme is installed as a Python package via `pyproject.toml` (pinned to a specific git commit). Its path is resolved at runtime with `attila.get_path()` in `pelicanconf.py`. To update the theme, change the commit SHA in `pyproject.toml` and run `uv sync`.

## CI

The GitHub Actions workflow (`.github/workflows/build.yml`) only verifies the build succeeds — it does not deploy the site.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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` |
1 change: 1 addition & 0 deletions content/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file exists to force git to track the empty content directory.
7 changes: 7 additions & 0 deletions content/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Title: Blog
Date: 2024-09-16 17:51
Author:
Slug: blog
Status: published

[<span class="invisible">https://</span><span>diffraction.pt/blog/</span><span class="invisible"></span>](https://diffraction.pt/blog/)
10 changes: 10 additions & 0 deletions content/camera-phone/a-dog-barking-in-the-distance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Title: a dog barking in the distance
Date: 2012-04-25 23:42
Author: paulo.ribeiro
Category: camera phone
Slug: a-dog-barking-in-the-distance
Status: published

![a dog barking in the distance](https://diffraction.pt/blog/images/photos/12/a_dog_barking_in_the_distance_i.jpg)

![a dog barking in the distance](https://diffraction.pt/blog/images/photos/12/a_dog_barking_in_the_distance_ii.jpg)
8 changes: 8 additions & 0 deletions content/camera-phone/a-little-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Title: a little lie
Date: 2014-07-05 00:08
Author: paulo.ribeiro
Category: camera phone
Slug: a-little-lie
Status: published

![a little lie](https://diffraction.pt/blog/images/photos/14/a_little_lie.jpg)
12 changes: 12 additions & 0 deletions content/camera-phone/a-world-apart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Title: a world apart
Date: 2018-08-04 08:41
Author: paulo.ribeiro
Category: camera phone
Slug: a-world-apart
Status: published

![a world apart](https://diffraction.pt/blog/images/photos/18/a_world_apart_i.jpg)

![a world apart](https://diffraction.pt/blog/images/photos/18/a_world_apart_ii.jpg)

![a world apart](https://diffraction.pt/blog/images/photos/18/a_world_apart_iii.jpg)
10 changes: 10 additions & 0 deletions content/camera-phone/at-rest-still.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Title: at rest, still
Date: 2013-04-20 21:07
Author: paulo.ribeiro
Category: camera phone
Slug: at-rest-still
Status: published

![at rest, still](https://diffraction.pt/blog/images/photos/13/at_rest_still_i.jpg)

![at rest, still](https://diffraction.pt/blog/images/photos/13/at_rest_still_ii.jpg)
10 changes: 10 additions & 0 deletions content/camera-phone/cutoff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Title: cutoff
Date: 2015-11-26 20:43
Author: paulo.ribeiro
Category: camera phone
Slug: cutoff
Status: published

![cutoff](https://diffraction.pt/blog/images/photos/15/cutoff_i.jpg)

![cutoff](https://diffraction.pt/blog/images/photos/15/cutoff_ii.jpg)
16 changes: 16 additions & 0 deletions content/camera-phone/das-horas-crescentes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Title: das horas crescentes
Date: 2023-09-08 16:19
Author: paulo.ribeiro
Category: camera phone
Slug: das-horas-crescentes
Status: published

![das horas crescentes](https://diffraction.pt/blog/images/photos/23/das_horas_crescentes_i.jpg)

![das horas crescentes](https://diffraction.pt/blog/images/photos/23/das_horas_crescentes_ii.jpg)

![das horas crescentes](https://diffraction.pt/blog/images/photos/23/das_horas_crescentes_iii.jpg)

![das horas crescentes](https://diffraction.pt/blog/images/photos/23/das_horas_crescentes_iv.jpg)

[+](/blog/2023/08/25/das-tardes-passadas/)
Loading