Skip to content

Commit 1e05e8b

Browse files
authored
feat: add configuration to display the announcements (#1791)
1 parent 9157075 commit 1e05e8b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ defaults:
1313
menu: blog
1414
lang: en
1515

16+
announcement: false # Enable or disable the announcements.
17+
1618
# Build settings
1719

1820
plugins:

_data/en/general.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
title_announcement: "Express 5.0 documentation is now available."
2-
body_announcement: "The <a href='{{ page.lang }}/5x/api.html'>API documentation</a> is a work in progress. For information on what's in the release, see the Express <a href='https://github.com/expressjs/express/blob/5.0/History.md'>release history</a>"
2+
body_announcement: "The <a href='/en/5x/api.html'>API documentation</a> is a work in progress. For information on what's in the release, see the Express <a href='https://github.com/expressjs/express/blob/5.0/History.md'>release history</a>"

index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ app.listen(port, () => {
3535

3636
</div>
3737
</section>
38+
39+
{% if site.announcement %}
3840
<section id="announcements">
3941
{% include announcement.html %}
4042
</section>
43+
{% endif %}
4144

4245
<section id="intro">
4346

0 commit comments

Comments
 (0)