You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples.rst
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Examples
2
2
========
3
3
4
-
Examples are available in the **genja/examples** directory in the genja `GitHub <https://github.com/wigging/genja>`_ repository. Use the ``genja build`` or ``genja serve`` command to generate the HTML for a particular example. For instance, use the command shown below to build the website and run a local server for the **directory-output** example. The website will automatically reload in the web browser when changes are saved to the Markdown files.
4
+
Examples are available in the ``genja/examples`` directory in the genja `GitHub <https://github.com/wigging/genja>`_ repository. Use the ``genja build`` or ``genja serve`` command to generate the HTML for a particular example. For instance, use the command shown below to build the website and run a local server for the ``directory-output`` example. The website will automatically reload in the web browser when changes are saved to the Markdown files.
5
5
6
6
.. code:: text
7
7
@@ -18,12 +18,29 @@ Alternatively, use the build command to build the website without starting a loc
18
18
Code blocks
19
19
-----------
20
20
21
-
The code-blocks example demonstrates the use of `highlight.js <https://highlightjs.org>`_ to provide syntax coloring of code that is rendered in pages and posts.
21
+
The ``code-blocks`` example demonstrates the use of `highlight.js <https://highlightjs.org>`_ to provide syntax coloring of code that is rendered in pages and posts. The CSS and JavaScript for hightlightjs must be defined in the ``<head>...</head>`` section in the HTML page or post template such as:
Next, code blocks can be defined in the Markdown files as follows:
31
+
32
+
.. code:: text
33
+
34
+
```python
35
+
def seyhello():
36
+
s = "hello there"
37
+
print(s)
38
+
```
22
39
23
40
Directory output
24
41
----------------
25
42
26
-
The directory-output example defines ``site_output = "mysite"`` in the ``genja.toml`` file. This tells Genja to output the generated content to the ``mysite`` directory in the project.
43
+
The ``directory-output`` example defines ``site_output = "mysite"`` in the ``genja.toml`` file. This tells Genja to output the generated content to the ``mysite`` directory in the project.
0 commit comments