No description
  • Shell 60.3%
  • SCSS 30.2%
  • HTML 7.9%
  • Ruby 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dennisppaul 059977918d feat: support multiple deployers per site
- tools/add-deployer.sh: run as root on the server to create a key-only
  user, a per-site group with a setgid group-writable docroot, and an
  onboarding bundle (deploy.conf, ssh config, known_hosts, scripts, README)
- deploy.sh: detect a shared docroot (setgid + g+w) and upload with
  D2775,F664 so deployers can replace each other's files; otherwise keep
  D755,F644
- deploy.sh: pass IdentitiesOnly=yes with SSH_KEY, avoiding "Too many
  authentication failures" when the agent holds several keys
- safe-deploy.sh: deploy only from a clean main in sync with origin, since
  rsync --delete would erase unpulled work
- exclude safe-deploy.sh and tools/ from the build and the upload

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:53:14 +02:00
_includes update css to mimic raw markdown even more, add option for configurable headline 2026-10-12 16:00:35 +02:00
_layouts update css to mimic raw markdown even more, add option for configurable headline 2026-10-12 16:00:35 +02:00
_posts add png 2026-08-03 13:54:00 +02:00
_sass update css to mimic raw markdown even more, add option for configurable headline 2026-10-12 16:00:35 +02:00
assets update css to mimic raw markdown even more, add option for configurable headline 2026-10-12 16:00:35 +02:00
tools feat: support multiple deployers per site 2026-10-16 18:53:14 +02:00
.gitignore create working template mechanism 2026-07-30 22:59:55 +02:00
.ruby-version create working template mechanism 2026-07-30 22:59:55 +02:00
404.html add sources and assets 2026-07-30 21:03:06 +02:00
_config.yml feat: support multiple deployers per site 2026-10-16 18:53:14 +02:00
about.md create working template mechanism 2026-07-30 22:59:55 +02:00
apple-touch-icon-precomposed.png add sources and assets 2026-07-30 21:03:06 +02:00
apple-touch-icon.png add sources and assets 2026-07-30 21:03:06 +02:00
deploy.sh feat: support multiple deployers per site 2026-10-16 18:53:14 +02:00
favicon.ico add sources and assets 2026-07-30 21:03:06 +02:00
Gemfile improve deploy, update gem 2026-07-30 23:17:39 +02:00
Gemfile.lock improve deploy, update gem 2026-07-30 23:17:39 +02:00
index.md create working template mechanism 2026-07-30 22:59:55 +02:00
privacy-policy.md create working template mechanism 2026-07-30 22:59:55 +02:00
README.md feat: support multiple deployers per site 2026-10-16 18:53:14 +02:00
safe-deploy.sh feat: support multiple deployers per site 2026-10-16 18:53:14 +02:00
serve.sh update css to mimic raw markdown even more, add option for configurable headline 2026-10-12 16:00:35 +02:00
setup.sh feat: support multiple deployers per site 2026-10-16 18:53:14 +02:00

static-website-template

A Jekyll template for a small, fast, self-contained static site: monospace layout, no webfont CDN, no analytics, no cookies. Clone it, run setup.sh with your details, and you have a working site with local preview and one-command deploy.

The theme is a vendored fork of minima — every layout, include and stylesheet lives in this repo, so there is no gem whose markup you cannot read.

prerequisites

  • Ruby ≥ 3.1 — the pinned version is in .ruby-version (3.2.5). With rbenv:

    rbenv install "$(cat .ruby-version)"
    
  • Bundler — gem install bundler

  • rsync and ssh — for deploying (both ship with macOS)

  • a Unix shell — setup.sh, serve.sh and deploy.sh are bash. macOS and Linux work as-is; on Windows use WSL.

setup.sh checks all of this before it changes anything.

setup

git clone <this-repo> mysite
cd mysite
./setup.sh --name        mysite \
           --author      "Your Name" \
           --mail        you@example.com \
           --url         https://mysite.example.com \
           --server      my-server \
           --server-path /var/www/mysite

Run ./setup.sh with no arguments to be prompted for each value instead, or ./setup.sh --dry-run to see exactly what would change without touching anything. ./setup.sh --help lists every flag.

flag meaning example
--name site title mysite
--author author name Your Name
--mail contact address you@example.com
--url base URL, no trailing slash https://mysite.example.com
--server ssh host or ~/.ssh/config alias my-server
--server-path absolute docroot on the server /var/www/mysite
--baseurl optional subpath, if not at the domain root /blog
--ssh-key optional identity file; blank uses the ssh agent ~/.ssh/id_rsa

setup.sh then:

  1. validates every value before writing anything — including the same docroot guards deploy.sh uses, so a typo in --server-path fails here rather than during an rsync --delete against a live server
  2. substitutes the __SITE_*__ placeholders in _config.yml
  3. writes deploy.conf (gitignored) for deploy.sh
  4. replaces this README with a short one for your site
  5. deletes SETUP.md and itself
  6. removes the origin remote, so you cannot push your site into the template
  7. runs bundle install

It refuses to run a second time.

local preview

./serve.sh              # http://127.0.0.1:4000, opens a browser, livereload
./serve.sh 4001         # a different port

Press Enter or Ctrl-C to stop. _config.yml is not reloaded while the server runs — restart after editing it.

deploy

./deploy.sh -n          # dry run: show what would transfer, change nothing
./deploy.sh             # preview the changes, then confirm
./deploy.sh -y          # no prompt
./deploy.sh --no-build  # upload the existing _site/ as-is

It builds, then mirrors _site/ to the server with rsync --delete. Before transferring anything it refuses to proceed if the target is a system directory, if the path has fewer than three segments (the shape an empty variable collapses to), or if the build output is missing or has no index.html. After a successful transfer it checks that URL returns HTTP 200.

Settings come from deploy.conf, which setup.sh writes and .gitignore excludes:

TARGET="my-server:/var/www/mysite"
SSH_KEY=""                          # blank = ssh agent / ~/.ssh/config
URL="https://mysite.example.com"

more than one deployer

To let someone else deploy the same site, run tools/add-deployer.sh on the server, as root:

./add-deployer.sh --user alice \
    --site-path /var/www/example.org/html \
    --host server.example.org \
    --url https://example.org \
    --generate-key --dry-run         # then again without --dry-run

It creates a key-only login for them and a group site-<name> that owns the docroot. It makes the docroot group-writable with setgid (2775/664), installs their key (or generates a pair with --generate-key), and writes a zip with their deploy.conf, ssh config, known_hosts, safe-deploy.sh and a short README. --deploy-sh FILE adds a deploy.sh too, for a repo that has none yet. --help lists everything.

deploy.sh recognises a shared docroot (setgid and group-writable) and then uploads files group-writable, so neither deployer gets locked out of the other's files. An ordinary docroot keeps 755/644.

Once two people deploy, use ./safe-deploy.sh instead of ./deploy.sh. It takes the same flags, but refuses unless you are on a clean main that is exactly in sync with origin. rsync --delete makes the live site a copy of your checkout, so deploying a stale one would erase the other person's work.

To revoke access: gpasswd -d alice site-<name> && userdel -r alice.

writing

  • posts — _posts/YYYY-MM-DD-title.md, front matter layout: post. Posts dated in the future stay unpublished (future: false).

  • pages — markdown files in the project root with layout: page and a permalink. Add them to header_pages in _config.yml to show them in the nav, in that order.

  • assets — anything in assets/. Reference it through relative_url so it survives a move to a subpath:

    ![alt]({% raw %}{{ "/assets/example.svg" | relative_url }}{% endraw %})
    

_posts/2026-07-27-example-post.md demonstrates every styled element — headings, lists, tables, code, blockquotes, footnotes, images, video embeds. Keep it while you set things up, then delete it.

structure

_config.yml              site identity + build settings; single source
                         of truth, read via {{ site.title }} etc.
_layouts/
  default.html           page skeleton
  home.html              front page: recent posts + OLDER POSTS list
  page.html              standalone pages
  post.html              blog posts
_includes/
  head.html              meta, seo tag, stylesheet, favicons
  header.html            site title
  footer.html            nav + contact email
_sass/
  _variables.scss        every themeable value, all !default
  _mixins.scss           media-query, relative-font-size
  _fonts.scss            @font-face for the self-hosted typeface
  minima.scss            theme entry point
  minima/                base, layout, syntax-highlighting
assets/
  main.scss              compiles to /assets/main.css
  fonts/                 JetBrains Mono woff2 + OFL licence
_posts/                  YYYY-MM-DD-title.md
index.md  about.md  privacy-policy.md  404.html
setup.sh  serve.sh  deploy.sh  safe-deploy.sh
tools/
  add-deployer.sh        run on the server: give someone deploy access

customising the look

Every visual value is a !default variable in _sass/_variables.scss. Override them from assets/main.scss without editing the theme:

@use "minima" with (
  $brand-color:   #c00,
  $content-width: 960px,
);

privacy

The template ships with no cookies, no analytics and no third-party requests. The typeface is self-hosted from assets/fonts/ (SIL OFL 1.1) rather than loaded from a font CDN, so no visitor IP reaches anyone else. privacy-policy.md states this, and pulls the controller's name and address from _config.yml — keep them consistent if you change how the site is hosted.

licence

The vendored theme derives from minima, MIT-licensed. JetBrains Mono is under the SIL Open Font License 1.1 (assets/fonts/OFL.txt).