@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66
77This is ** cppbits.dev** , a static website for C++ tutorials written in AsciiDoc format. The site is deployed to GitHub Pages at cppbits.dev.
88
9- ## Build and Preview
9+ ## Build Commands
1010
1111The site uses Asciidoctor to convert ` .adoc ` files to HTML.
1212
@@ -15,42 +15,45 @@ The site uses Asciidoctor to convert `.adoc` files to HTML.
1515gem install asciidoctor
1616```
1717
18- ** Build all files locally :**
18+ ** Build everything :**
1919``` bash
20- asciidoctor index.adoc
21- asciidoctor posts/* .adoc
20+ make
2221```
2322
24- ** Build a single post :**
23+ ** Build a single file :**
2524``` bash
26- asciidoctor posts/260114_move_semantics_explained.adoc
25+ asciidoctor articles/move/introductory_example.adoc
26+ ```
27+
28+ ** Clean generated HTML:**
29+ ``` bash
30+ make clean
2731```
2832
2933The GitHub Actions workflow (` .github/workflows/publish.yml ` ) automatically builds and deploys on push to master.
3034
3135## Content Structure
3236
33- - ` index.adoc ` - Main landing page with table of contents
34- - ` posts/*.adoc ` - Individual tutorial posts (naming: ` YYMMDD_title.adoc ` )
35- - ` include/attributes.adoc ` - Shared AsciiDoc attributes (styling, syntax highlighting, etc. )
37+ - ` index.adoc ` - Main landing page
38+ - ` articles/ ` - Tutorial content organized by topic (e.g., ` articles/move/ ` )
39+ - ` include/attributes.adoc ` - Shared AsciiDoc attributes (styling, syntax highlighting)
3640- ` include/copyright.adoc ` - Copyright footer included in all pages
3741- ` stylesheets/ubuntu-custom.css ` - Custom styling based on Ubuntu theme
3842
39- ## Writing Posts
43+ ## Writing Articles
4044
41- Posts should:
42- 1 . Set ` :rootdir: .. ` to properly resolve includes
45+ Articles should:
46+ 1 . Set ` :rootdir: ` relative to the include directory (e.g., ` ../.. ` for ` articles/topic/file.adoc ` )
43472 . Include ` {rootdir}/include/attributes.adoc ` for consistent styling
44483 . Include ` {rootdir}/include/copyright.adoc ` at the end
45- 4 . Use ` [source] ` blocks for C++ code (syntax highlighting is preconfigured)
49+ 4 . Use ` [source] ` blocks for C++ code (syntax highlighting via highlight.js is preconfigured)
4650
47- Example post header:
51+ Example article header:
4852``` asciidoc
49- = Post Title
53+ = Article Title
5054Daniel Langr
51- :revdate: January 2025
52- :rootdir: ..
55+ :rootdir: ../..
5356include::{rootdir}/include/attributes.adoc[]
5457```
5558
56- After creating a new post , add a link to it in `index.adoc` under the Contents section .
59+ After creating a new article or section , add a link to it in the appropriate index file .
0 commit comments