diff --git a/exampleSite/content/posts/advanced/includes.md b/exampleSite/content/posts/advanced/includes.md index 161e9a2..d2c05fd 100644 --- a/exampleSite/content/posts/advanced/includes.md +++ b/exampleSite/content/posts/advanced/includes.md @@ -54,6 +54,8 @@ This method can be used to include source code files and keep them automatically {{* include file="config.yaml" language="yaml" options="linenos=table,hl_lines=5-6,linenostart=100" */>}} ``` +**Code Include:** + {{< include file="config.yaml" language="yaml" options="linenos=table,hl_lines=5-6,linenostart=100">}} @@ -77,9 +79,8 @@ HTML content will be filtered by the `safeHTML` filter and added to the rendered In some situations, it can be helpful to include Markdown files that also contain shortcodes. While the [default method](#markdown-file-default) works fine to render plain Markdown, shortcodes are not parsed. The only way to get this to work is to use Hugo pages. There are several ways to structure these include pages, so whatever you do, keep in mind that Hugo needs to be able to render and serve these files as regular pages! How it works: 1. First you need to create a directory **within** your content directory. For this example site `_includes` is used. -2. To prevent the theme from embedding the page in the navigation, create a file `_includes/_index.md` and add `GeekdocHidden: true` to the front matter. -3. Place your Markdown files within the `_includes` folder e.g. `/_includes/include-page.md`. Make sure to name it `*.md`. -4. Include the page using `{{* include file="/_includes/include-page.md" */>}}`. +2. Place your Markdown files within the `_includes` folder e.g. `/_includes/include-page.md`. Make sure to name it `*.md`. +3. Include the page using `{{* include file="/_includes/include-page.md" */>}}`. Resulting structure should look like this: diff --git a/exampleSite/content/posts/features/code-blocks.md b/exampleSite/content/posts/features/code-blocks.md index 1212958..b49b9ec 100644 --- a/exampleSite/content/posts/features/code-blocks.md +++ b/exampleSite/content/posts/features/code-blocks.md @@ -16,7 +16,7 @@ There are several ways to add code blocks. Most of them work out of the box, onl To display an inline shortcode use single quotes: -```plain +```Plain `some code` ``` @@ -26,7 +26,7 @@ To display an inline shortcode use single quotes: Code blocks can be uses without language specification: -````markdown +````Markdown ```Plain some code ``` @@ -40,7 +40,7 @@ some code ... or if you need language specific syntax highlighting: -````markdown +````Markdown ```Shell # some code echo "Hello world" @@ -80,7 +80,7 @@ pygmentsCodeFences: true You can use it like every other shortcode: -```markdown +```Markdown {{* highlight Shell "linenos=table" */>}} # some code echo "Hello World" diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html index 2f0f95f..1663cb8 100644 --- a/layouts/partials/foot.html +++ b/layouts/partials/foot.html @@ -2,3 +2,5 @@ {{ end }} + + diff --git a/layouts/partials/site-footer.html b/layouts/partials/site-footer.html index e2898af..41bd1c7 100644 --- a/layouts/partials/site-footer.html +++ b/layouts/partials/site-footer.html @@ -43,7 +43,7 @@ {{ end }} - {{ if (default true .Site.Params.GeekdocBackToTop) }} + {{ if (default true .Site.Params.GeekblogBackToTop) }}