Skip to content

Commit 5443f78

Browse files
Added syntax highlighting
1 parent a7d4022 commit 5443f78

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

README.md

+20-18
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,23 @@ Content can be added and edited using the block editor.
1919

2020
The following variables are available:
2121

22-
| Name | Description |
23-
| --- | --- |
24-
| + Main | The main content block area |
25-
| Brand | The brand HTML, SVG or text to be used as logo |
26-
| Image Logo | The path to your logo - this variable should be defined globally in the shared data section |
27-
| Image Logo Mobile | An alternative logo for smaller devices |
28-
| Items Footer | Additional markup to be added to page's footer |
29-
| Items Header | Additional markup to be added to page's `<head></head>` section |
30-
| Format Date | The format for displaying the date |
31-
| Label More | Label text for the "More" button |
32-
| Label Show All | Label text for filter button when no filter is selected |
33-
| Locale | The locale information to format date and time according to like `en_EN` or `de_DE` |
34-
| Meta Title | An optional meta title to be used for the browser title bar and links used on Twitter, Facebook or similar social networks |
35-
| Notification No Search Results | Notification text for an empty list of search results |
36-
| Og Image | A glob pattern to select a preview image for Twitter, Facebook or similar social network cards. This could be for example `*.png, *.jpg` |
37-
| Placeholder Search | Placeholder text for the search field of the main menu |
38-
| Url Github | The URL to a related GitHub repository |
39-
| Url Pagelist | The URL for the search results page |
22+
| Name | Description | Scope |
23+
| --- | --- | --- |
24+
| + Main | The main content block area | Page |
25+
| Brand | The brand HTML, SVG or text to be used as logo | - |
26+
| Image Logo | The path to your logo - this variable should be defined globally in the shared data section | - |
27+
| Image Logo Mobile | An alternative logo for smaller devices | - |
28+
| Items Footer | Additional markup to be added to page's footer | - |
29+
| Items Header | Additional markup to be added to page's `<head></head>` section | - |
30+
| Format Date | The format for displaying the date | - |
31+
| Label More | Label text for the "More" button | Shared |
32+
| Label Show All | Label text for filter button when no filter is selected | Shared |
33+
| Locale | The locale information to format date and time according to like `en_EN` or `de_DE` | - |
34+
| Meta Title | An optional meta title to be used for the browser title bar and links used on Twitter, Facebook or similar social networks | - |
35+
| Notification No Search Results | Notification text for an empty list of search results | Shared |
36+
| Og Image | A glob pattern to select a preview image for Twitter, Facebook or similar social network cards. This could be for example `*.png, *.jpg` | - |
37+
| Placeholder Search | Placeholder text for the search field of the main menu | Shared |
38+
| Search Results Title | The title for the search results page | Shared |
39+
| Syntax Theme | The name of the syntax theme for [highlight.js](https://highlightjs.org/static/demo/) like for example 'mono-blue'. | Shared |
40+
| Url Github | The URL to a related GitHub repository | Shared |
41+
| Url Pagelist | The URL for the search results page | Shared |

snippets/header.php

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
twitterCard: 'summary_large_image'
1818
} ~@>
1919
<link rel="stylesheet" href="/packages/@{ theme }/dist/revitron.min.css" type="text/css" />
20+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/@{ syntaxTheme | def('mono-blue') }.min.css">
21+
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
22+
<script>hljs.initHighlightingOnLoad();</script>
2023
@{ itemsHeader }
2124
</head>
2225

theme.json

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"notificationNoSearchResults",
1111
"placeholderSearch",
1212
"searchResultsTitle",
13+
"syntaxTheme",
1314
"urlGithub",
1415
"urlPagelist"
1516
],
@@ -33,6 +34,7 @@
3334
"ogImage": "A glob pattern to select a preview image for Twitter, Facebook or similar social network cards. This could be for example `*.png, *.jpg`",
3435
"placeholderSearch": "Placeholder text for the search field of the main menu",
3536
"searchResultsTitle": "The title for the search results page",
37+
"syntaxTheme": "The name of the syntax theme for <a href='https://highlightjs.org/static/demo/' style='color: inherit; text-decoration: underline !important;'>highlight.js</a> like for example 'mono-blue'",
3638
"urlGithub": "The URL to a related GitHub repository",
3739
"urlPagelist": "The URL for the search results page"
3840
}

0 commit comments

Comments
 (0)