Skip to content

Commit 8290757

Browse files
docs: update doc to include announcement banner
1 parent 1ee81dd commit 8290757

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

afterpython/doc/project_website.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ Both `question` and `answer` accept Markdown — inline code, links, lists, fenc
171171

172172
Categories are displayed in the order they first appear in `faq.yml`, so order your questions to control category order.
173173

174+
### Announcement Banner
175+
Set `announcement` under `[website]` in `afterpython.toml` to display a banner at the top of the home page on the project website. Markdown is supported (inline code, links, **bold**, emoji), so you can link to a release, blog post, or external page.
176+
177+
```toml
178+
[website]
179+
announcement = "🎉 v2.0 is out — [read the changelog](/blog/v2-release)"
180+
```
181+
182+
For longer messages, use a triple-quoted string. Keep it concise — the banner is meant for a one-glance heads-up, not a full announcement post. Leave it as `""` to hide the banner.
183+
174184
### API Reference
175185
[great-docs] will be used to build the API Reference section on the project website.
176186

src/afterpython/tools/_afterpython.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def init_afterpython():
123123
"logo": "logo.svg",
124124
"logo_dark": "logo.svg",
125125
"thumbnail": "thumbnail.png",
126+
"announcement": "",
126127
},
127128
}
128129
update_afterpython(default_data)

0 commit comments

Comments
 (0)