tonybtw

https://git.tonybtw.com/tonybtw.git git://git.tonybtw.com/tonybtw.git
2,161 bytes raw
1
#+TITLE: tonybtw.com
2
3
* About
4
Source for [[https://tonybtw.com][tonybtw.com]], a static site built from Markdown with a
5
=Makefile= and [[https://pandoc.org][pandoc]]. No Hugo, no framework, no npm. The look matches
6
[[https://forums.tonybtw.com][forums.tonybtw.com]]: Tokyo Night colours, Iosevka, and the vim-style modeline
7
along the bottom.
8
9
* Layout
10
- =content/= — Markdown sources (the source of truth).
11
  =tutorial/<slug>/index.md= and =community/<slug>/index.md=.
12
- =template.html= — the one pandoc HTML template (nav + article + modeline).
13
- =gen.sh= — builds the derived pages (home, section lists, tag pages, support)
14
  from front matter, through the same template.
15
- =assets/= — =css/site.css=, =fonts/= (subset Iosevka woff2), =img/=, =.well-known/=.
16
- =Makefile= — =content/**/*.md= -> =public/**/*.html= via pandoc, then =gen.sh=,
17
  then copies =assets/=.
18
- =public/= — build output (git-ignored).
19
20
* Requirements
21
- [[https://nixos.org/download.html][Nix]] with flakes enabled. The dev shell provides pandoc, make, python3.
22
23
* Usage
24
#+begin_src sh
25
nix develop
26
make            # builds ./public
27
make serve      # builds, then serves ./public at http://localhost:1313
28
#+end_src
29
30
Reproducible build without a dev shell:
31
#+begin_src sh
32
nix build       # result -> ./result
33
#+end_src
34
35
* Writing a tutorial
36
Create =content/tutorial/<slug>/index.md= with YAML front matter, then the body:
37
#+begin_src yaml
38
---
39
title: "My Tutorial"
40
date: 2026-01-01
41
description: "One-line blurb used on cards and meta tags."
42
image: "/img/my-tutorial.png"
43
video: "https://www.youtube.com/watch?v=XXXXXXXXXXX"   # optional video hero
44
---
45
#+end_src
46
The heading structure (=##=, =###=) becomes the sidebar table of contents. Put
47
the card thumbnail (16:9) in =assets/img/=.
48
49
* Contributing (community)
50
1. Copy an existing post to =content/community/<your-slug>/index.md=.
51
2. Front matter: =title=, =date=, =author=, and =tags: ["a", "b"]=
52
   (tags become =/tags/= pages).
53
3. Put screenshots under =assets/img/community/<your-name>/= and reference them
54
   in the body as =![alt](/img/community/you/shot.png)=.
55
4. Submit a pull request with your =index.md= and images.