Skip to content

Commit d6173f6

Browse files
authored
Merge pull request #28 from chkware/docs/add-syntax-highlighting-guide
docs: add syntax highlighting guide in README.md
2 parents 0047243 + ba4091d commit d6173f6

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Creating a `example.md` in a sub folder will create a category in the sidebar.
6262
```bash
6363
root
6464
├── docs
65-
└── sub-folder
66-
└── example.md
65+
└── sub-folder
66+
│ └── example.md
6767
```
6868

6969
To change the category name or other category meta data, an optional file `_category_.json` can be created in the respective sub folder. More [here](https://docusaurus.io/docs/next/sidebar/autogenerated#autogenerated-sidebar-metadata).
@@ -86,6 +86,10 @@ Generate the variables from [here](https://docusaurus.io/docs/next/styling-layou
8686

8787
Docusaurus uses [Prism React Renderer](https://github.com/FormidableLabs/prism-react-renderer) to highlight code blocks. All configuration are in the `prism` object of `docusaurus.config.js`. You can specify a custom theme from the [list of available themes](https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes).
8888

89+
### Syntax highlighting
90+
91+
To add syntax highlighting for any of the other [Prism-supported languages](https://prismjs.com/#supported-languages), define it in an array of additional languages. More [here](https://docusaurus.io/docs/next/markdown-features/code-blocks#supported-languages).
92+
8993
### Change footer
9094

9195
You can add logo and a copyright to the footer via `themeConfig.footer`. More [here](https://docusaurus.io/docs/next/api/themes/configuration#footer-1).

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ const config = {
141141
require.resolve('@easyops-cn/docusaurus-search-local'),
142142
{
143143
indexDocs: true,
144-
indexPages: true,
145144
indexBlog: false,
145+
indexPages: true,
146146
hashed: true,
147147
highlightSearchTermsOnTargetPage: true,
148148
docsRouteBasePath: ['/'],

0 commit comments

Comments
 (0)