Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5f99583
Delete RW site.
dev-patch17 Dec 5, 2024
70cf0c4
Rewrite gitignore for Python.
dev-patch17 Dec 5, 2024
17d9efb
Restructure ignores with project specific items up top.
dev-patch17 Dec 5, 2024
7320630
Delete legacy server config.
dev-patch17 Dec 5, 2024
350de66
Update humans.txt.
dev-patch17 Dec 5, 2024
7c86622
Initial Pelican configuration.
dev-patch17 Dec 6, 2024
19c0f43
Move root-level static content to 'extra'.
dev-patch17 Dec 6, 2024
2c0510c
Add favicon assets.
dev-patch17 Dec 6, 2024
ba6e7fa
Create placeholder 'about' page.
dev-patch17 Dec 6, 2024
ca40e8c
Install and configure custom 'Bootstrap' theme.
dev-patch17 Dec 6, 2024
893b8ef
Add a site subtitle.
dev-patch17 Dec 6, 2024
485a5ca
Config favicon assets.
dev-patch17 Dec 6, 2024
76e461f
Ask Pelican not to delete the output directory when publishing.
dev-patch17 Dec 6, 2024
dd0d57a
Configure Google Analytics.
dev-patch17 Dec 7, 2024
d1c782f
Remove the leading 'pages/' in the URL for pages.
dev-patch17 Dec 8, 2024
00bf842
Write 'About' content and add photo.
dev-patch17 Dec 8, 2024
6075156
Add visual seperator between main content and page/post footer info.
dev-patch17 Dec 8, 2024
0801bf8
Correct 'archives' link from 404.
dev-patch17 Dec 8, 2024
7f6aecd
Write 'Responsible AI – Ethical Principles for Humanity' post.
dev-patch17 Dec 11, 2024
56f9a0e
Modify article and index templates for better SEO.
dev-patch17 Dec 11, 2024
8022ba8
Priortize article title over site title in article title tags for imp…
dev-patch17 Dec 11, 2024
cd0b77b
Replace dash with colon in 'Responsible AI' article title.
dev-patch17 Dec 11, 2024
68ba849
Update site subtitle with an AI focus.
dev-patch17 Dec 11, 2024
8d0ddee
Update 'About' content with an AI focus.
dev-patch17 Dec 11, 2024
9718d41
Update 'About' metadata.
dev-patch17 Dec 11, 2024
8c1b958
Remove 2nd description tag for articles.
dev-patch17 Dec 11, 2024
b608f73
Correct 404 'Archives' link for production site.
dev-patch17 Dec 12, 2024
5f333f0
Fix 'Archives' link for GitHub pages.
dev-patch17 Dec 12, 2024
61fbb87
Add '/archives.html' to 404.
dev-patch17 Dec 12, 2024
73cee4c
Update release notes for Pelican rebuild.
dev-patch17 Dec 12, 2024
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
175 changes: 167 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,171 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# Pelican
output
cache

# macOS
.DS_Store

# Ignore text editor project files
*.sublime*
*.code-workspace
# General Python ignores

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$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

# 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

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# 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
.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/
80 changes: 80 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
PY?=
PELICAN?=pelican
PELICANOPTS=

BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py

GITHUB_PAGES_BRANCH=gh-pages
GITHUB_PAGES_COMMIT_MESSAGE=Generate Pelican site


DEBUG ?= 0
ifeq ($(DEBUG), 1)
PELICANOPTS += -D
endif

RELATIVE ?= 0
ifeq ($(RELATIVE), 1)
PELICANOPTS += --relative-urls
endif

SERVER ?= "0.0.0.0"

PORT ?= 0
ifneq ($(PORT), 0)
PELICANOPTS += -p $(PORT)
endif


help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
@echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
@echo ' make devserver [PORT=8000] serve and regenerate together '
@echo ' make devserver-global regenerate and serve on 0.0.0.0 '
@echo ' make github upload the web site via gh-pages '
@echo ' '
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
@echo ' '

html:
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)

clean:
[ ! -d "$(OUTPUTDIR)" ] || rm -rf "$(OUTPUTDIR)"

regenerate:
"$(PELICAN)" -r "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)

serve:
"$(PELICAN)" -l "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)

serve-global:
"$(PELICAN)" -l "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) -b $(SERVER)

devserver:
"$(PELICAN)" -lr "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)

devserver-global:
"$(PELICAN)" -lr "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) -b 0.0.0.0

publish:
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(PUBLISHCONF)" $(PELICANOPTS)

github: publish
ghp-import -m "$(GITHUB_PAGES_COMMIT_MESSAGE)" -b $(GITHUB_PAGES_BRANCH) "$(OUTPUTDIR)" --no-jekyll
git push origin $(GITHUB_PAGES_BRANCH)


.PHONY: html help clean regenerate serve serve-global devserver devserver-global publish github
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
# Benjamin Patch
Public website for benjaminpatch.com, built with
[RapidWeaver Classic](https://www.realmacsoftware.com/rapidweaver/).

RapidWeaver project file can be found in the 'rw_project' directory.
[Pelican](https://getpelican.com/) and [Bootstrap](https://getbootstrap.com/).

## Pelican Site Updates

### Development
```
rm -rf output/*
invoke regenerate
invoke livereload
```

### Production
```
rm -rf output/*
make publish
```
Push the newly generated site to the `gh-pages` branch. GitHub Pages should
automatically update the production site within a few minutes.

## GitHub Master to Main Update
```
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
```

---

## Release Notes

### 2024.12.11
* Rebuild as a blog using Pelican.
* Rename 'master' git branch to 'main.'

### 2023.04.08
* Update with AE credits.

Expand Down
Loading