🎨 make the markdown file configuration explicit
This commit is contained in:
22
README.md
22
README.md
@@ -220,6 +220,7 @@ Comics are stored in the `COMICS` list in `comics_data.py`. Each comic entry:
|
||||
'alt_text': 'Alt text for comic', # Accessibility text (required)
|
||||
'title': 'Comic Title', # Title (optional, shows #X if absent)
|
||||
'author_note': 'Optional note', # Author note (optional, plain text)
|
||||
'author_note_md': '2025-01-01.md', # Optional markdown file for author note
|
||||
'full_width': True, # Optional: override FULL_WIDTH_DEFAULT
|
||||
'plain': True # Optional: override PLAIN_DEFAULT
|
||||
}
|
||||
@@ -235,7 +236,7 @@ python scripts/add_comic.py
|
||||
# Add comic entry AND create markdown file for author notes
|
||||
python scripts/add_comic.py -m
|
||||
```
|
||||
This will automatically add a new entry with defaults. The `-m` flag creates a markdown file in `content/author_notes/{date}.md` with a template. Then edit `comics_data.py` to customize.
|
||||
This will automatically add a new entry with defaults. The `-m` flag creates a markdown file in `content/author_notes/{date}.md` with a template and adds the `author_note_md` field to the comic entry. Then edit `comics_data.py` to customize.
|
||||
|
||||
**Option 2: Manual**
|
||||
1. Save your comic image in `static/images/comics/` (e.g., `comic-001.png`)
|
||||
@@ -253,11 +254,26 @@ This creates/updates `static/feed.rss`
|
||||
### Markdown Support
|
||||
|
||||
**Author Notes:**
|
||||
Create markdown files in `content/author_notes/{date}.md` (e.g., `2025-01-01.md`) for rich-formatted author notes. Markdown author notes take precedence over the `author_note` field in `comics_data.py` and render as HTML.
|
||||
Add the `author_note_md` field to your comic entry in `comics_data.py` to use markdown-formatted author notes. The field can be:
|
||||
- Just a filename (e.g., `"2025-01-01.md"`) - looked up in `content/author_notes/`
|
||||
- A path relative to `content/` (e.g., `"special/intro.md"`)
|
||||
|
||||
Markdown author notes take precedence over the plain text `author_note` field and render as HTML.
|
||||
|
||||
Example:
|
||||
```python
|
||||
# In comics_data.py
|
||||
{
|
||||
'number': 1,
|
||||
'filename': 'comic-001.png',
|
||||
'date': '2025-01-01',
|
||||
'alt_text': 'First comic',
|
||||
'author_note_md': '2025-01-01.md' # References content/author_notes/2025-01-01.md
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
# Create author note for a specific comic
|
||||
# Create the markdown file
|
||||
echo "# My First Comic\n\nThis is **bold** text!" > content/author_notes/2025-01-01.md
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user