summaryrefslogtreecommitdiffstats
path: root/content/en/getting-started/configuration-markup.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-12-15 10:35:09 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-12-15 10:35:09 +0100
commit2e711a28c71e8667258e5ab824f9b9a71c261b0a (patch)
tree70b7061711891111a68c535674f3a02056770ce2 /content/en/getting-started/configuration-markup.md
parentefc0b1bb6c6564f54d596467dbc6a18cb206954e (diff)
Squashed 'docs/' changes from 51c4f3184..af4b7ac5b
af4b7ac5b Remove mention of Amber and Ace c841e9207 Exif docs corrections (#978) 0f82420b8 Change cache assets default example to 1 year 676dc6e12 Release 0.61.0 a1d9fb18a Merge commit '79c5d7053486f540b6219e693d5590f2c4c3937a' 1b9e675cd releaser: Add release notes to /docs for release of 0.61.0 5b95cbc8a Fixed suffixIsRemoved error in code samples (#975) 59b2c245b Fix Usage section in toc.md to consider Goldmark TOC settings fd3828673 Add link on how to configure TOC w/ Goldmark ea339f2d6 Added external learning resources including Hugo In Action book. fab502d5d Adjust release notes 269a025ef Release 0.60.1 6bff50bea Merge branch 'temp601' e15251c43 releaser: Add release notes to /docs for release of 0.60.1 690b864b9 Update use-modules.md 345ca8c36 Update syntax-highlighting.md be64af9f5 Update syntax-highlighting.md df9dead83 Update syntax-highlighting.md 1c6e6d238 Fix relnotes 0ea6b2012 Update homepagetweets.toml 2c465625d Update index.md 0025bba09 Update index.md 7417f1c05 Update index.md 9eeb8ce57 Release 0.60.0 25a711023 Merge branch 'temp60' 0c4faab0e releaser: Add release notes to /docs for release of 0.60.0 779e5108e Update installing.md 2ef1c386a Minor text improvements in README.md 41ec5a19a Reword sentence for clarity search.md ded74f098 Add Goldmark as the new default markdown handler cb55cdbb0 Update introduction.md fcaad653a Update homepage.md 7427a1fc5 Update configuration.md 8cc2c72ca tpl/collections: Allow dict to create nested structures 4538c092c Merge commit 'efc0b1bb6c6564f54d596467dbc6a18cb206954e' 90f908e7b Support Go time format strings in permalinks git-subtree-dir: docs git-subtree-split: af4b7ac5b403e392a92228e66058331905fff7dc
Diffstat (limited to 'content/en/getting-started/configuration-markup.md')
-rw-r--r--content/en/getting-started/configuration-markup.md73
1 files changed, 73 insertions, 0 deletions
diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md
new file mode 100644
index 000000000..2a24fcdd0
--- /dev/null
+++ b/content/en/getting-started/configuration-markup.md
@@ -0,0 +1,73 @@
+---
+title: Configure Markup
+description: How to handle Markdown and other markup related configuration.
+date: 2019-11-15
+categories: [getting started,fundamentals]
+keywords: [configuration,highlighting]
+weight: 65
+sections_weight: 65
+slug: configuration-markup
+toc: true
+---
+
+## Configure Markup
+
+{{< new-in "0.60.0" >}}
+
+See [Goldmark](#goldmark) for settings related to the default Markdown handler in Hugo.
+
+Below are all markup related configuration in Hugo with their default settings:
+
+{{< code-toggle config="markup" />}}
+
+**See each section below for details.**
+
+### Goldmark
+
+[Goldmark](https://github.com/yuin/goldmark/) is from Hugo 0.60 the default library used for Markdown. It's fast, it's [CommonMark](https://spec.commonmark.org/0.29/) compliant and it's very flexible. Note that the feature set of Goldmark vs Blackfriday isn't the same; you gain a lot but also lose some, but we will work to bridge any gap in the upcoming Hugo versions.
+
+This is the default configuration:
+
+{{< code-toggle config="markup.goldmark" />}}
+
+Some settings explained:
+
+unsafe
+: By default, Goldmark does not render raw HTMLs and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
+
+typographer
+: This extension substitutes punctuations with typographic entities like [smartypants](https://daringfireball.net/projects/smartypants/).
+
+### Blackfriday
+
+
+[Blackfriday](https://github.com/russross/blackfriday) was Hugo's default Markdown rendering engine, now replaced with Goldmark. But you can still use it: Just set `defaultMarkdownHandler` to `blackfriday` in your top level `markup` config.
+
+This is the default config:
+
+{{< code-toggle config="markup.blackFriday" />}}
+
+### Highlight
+
+This is the default `highlight` configuration. Note that some of these settings can be set per code block, see [Syntax Highlighting](/content-management/syntax-highlighting/).
+
+{{< code-toggle config="markup.highlight" />}}
+
+For `style`, see these galleries:
+
+* [Short snippets](https://xyproto.github.io/splash/docs/all.html)
+* [Long snippets](https://xyproto.github.io/splash/docs/longer/all.html)
+
+For CSS, see [Generate Syntax Highlighter CSS](/content-management/syntax-highlighting/#generate-syntax-highlighter-css).
+
+### Table Of Contents
+
+{{< code-toggle config="markup.tableOfContents" />}}
+
+These settings only works for the Goldmark renderer:
+
+startLevel
+: The heading level, values starting at 1 (`h1`), to start render the table of contents.
+
+endLevel
+: The heading level, inclusive, to stop render the table of contents. \ No newline at end of file