-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add documentation for announcement
- Loading branch information
Showing
5 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
:description: A theme option enables the display of an announcement banner. | ||
|
||
Announcement | ||
============ | ||
|
||
.. rst-class:: lead | ||
|
||
Display an announcement banner at the top of the page. | ||
|
||
---- | ||
|
||
When there's something to announce, you can include the announcement | ||
content in the ``conf.py`` announcement option. | ||
|
||
.. code-block:: python | ||
:caption: conf.py | ||
html_theme_options = { | ||
"announcement": "The content of the announcement", | ||
} | ||
.. note:: | ||
|
||
HTML is allowed in the ``announcement`` option. | ||
|
||
Here shows an example with ``announcement`` configuration. | ||
|
||
.. container:: image-container | ||
|
||
.. image:: /_static/screenshots/light-homepage.jpg | ||
:class: light-only | ||
:align: center | ||
|
||
.. image:: /_static/screenshots/dark-homepage.jpg | ||
:class: dark-only | ||
:align: center |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ footer, navbar, and sidebar. | |
logos | ||
colors | ||
navbar | ||
announcement | ||
social | ||
fonts | ||
sidebar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters