diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 5f1956fcc..0ad6d84d0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,13 +4,16 @@ theme = "hugo-coder" languageCode = "en" defaultContentLanguage = "en" paginate = 20 -pygmentsStyle = "bw" +pygmentsStyle = "b2" pygmentsCodeFences = true pygmentsCodeFencesGuessSyntax = true enableEmoji = true # Enable Disqus comments # disqusShortname = "yourdiscussshortname" +# To enable inline assets +enableInlineShortcodes = true + [params] author = "John Doe" description = "John Doe's personal website" @@ -75,23 +78,23 @@ customJS = [] # id = "gid" # If you want to implement a Content-Security-Policy, add this section -[params.csp] -childsrc = ["'self'"] -fontsrc = ["'self'", "https://fonts.gstatic.com", "https://cdn.jsdelivr.net/"] -formaction = ["'self'"] -framesrc = ["'self'"] -imgsrc = ["'self'"] -objectsrc = ["'none'"] -stylesrc = [ - "'self'", - "'unsafe-inline'", - "https://fonts.googleapis.com/", - "https://cdn.jsdelivr.net/" -] -scriptsrc = ["'self'", "'unsafe-inline'", "https://www.google-analytics.com"] -prefetchsrc = ["'self'"] +# [params.csp] +# childsrc = ["'self'"] +# fontsrc = ["'self'", "https://fonts.gstatic.com", "https://cdn.jsdelivr.net/"] +# formaction = ["'self'"] +# framesrc = ["'self'"] +# imgsrc = ["'self'"] +# objectsrc = ["'none'"] +# stylesrc = [ +# "'self'", +# "'unsafe-inline'", +# "https://fonts.googleapis.com/", +# "https://cdn.jsdelivr.net/" +# ] +# scriptsrc = ["'self'", "'unsafe-inline'", "https://www.google-analytics.com"] +# prefetchsrc = ["'self'"] # connect-src directive – defines valid targets for to XMLHttpRequest (AJAX), WebSockets or EventSource -connectsrc = ["'self'", "https://www.google-analytics.com"] +# connectsrc = ["'self'", "https://www.google-analytics.com"] [taxonomies] category = "categories" @@ -190,3 +193,9 @@ url = "projects/" name = "Contato" weight = 5 url = "contact/" + +# Enable html support inside markdown +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true diff --git a/exampleSite/content/posts/emoji-support.md b/exampleSite/content/posts/emoji-support.md index f17f49a2b..0e6313369 100644 --- a/exampleSite/content/posts/emoji-support.md +++ b/exampleSite/content/posts/emoji-support.md @@ -23,7 +23,7 @@ The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. -{{< highlight html >}} +{{< highlight css >}} .emoji { font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; } diff --git a/exampleSite/content/posts/emoji-support.pt-br.md b/exampleSite/content/posts/emoji-support.pt-br.md index 0aa0ae27c..55d680a3a 100644 --- a/exampleSite/content/posts/emoji-support.pt-br.md +++ b/exampleSite/content/posts/emoji-support.pt-br.md @@ -23,7 +23,7 @@ O [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) é uma referência úti **Nota:** Os passos anteriores ativam os caractéres e sequências de emoji do Padrão Unicode no Hugo, porém a renderização desses glifos depende do navegador e plataforma utilizada. Para escolher o estilo dos emojis você pode tanto usar um font de emoji de terceiros ou uma lista de fontes. Por exemplo: -{{< highlight html >}} +{{< highlight css >}} .emoji { font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; } diff --git a/exampleSite/content/posts/math-typesetting.md b/exampleSite/content/posts/math-typesetting.md index 62831a9c1..8093f0293 100644 --- a/exampleSite/content/posts/math-typesetting.md +++ b/exampleSite/content/posts/math-typesetting.md @@ -3,7 +3,7 @@ author: Hugo Authors title: Math Typesetting date: 2019-03-08 description: A brief guide to setup KaTeX -math: true +katex: true --- Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. @@ -21,27 +21,13 @@ In this example we will be using [KaTeX](https://katex.org/) {{ end }} ``` -- To enable KaTex globally set the parameter `math` to `true` in a project's configuration -- To enable KaTex on a per page basis include the parameter `math: true` in content files +- To enable KaTex on a per page basis include the parameter `katex: true` in content files **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) -{{< math.inline >}} -{{ if or .Page.Params.math .Site.Params.math }} - - - - -{{ end }} -{{ math.inline >}} - ### Examples -{{< math.inline >}} -
-Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) -
-{{ math.inline >}} +Inline math: $(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…)$ Block math: $$ diff --git a/exampleSite/content/posts/math-typesetting.pt-br.md b/exampleSite/content/posts/math-typesetting.pt-br.md index 31dd3670b..a0b892f86 100644 --- a/exampleSite/content/posts/math-typesetting.pt-br.md +++ b/exampleSite/content/posts/math-typesetting.pt-br.md @@ -3,7 +3,7 @@ author: Hugo Authors title: Configuração de Equações Matemáticas date: 2019-03-08 description: Um guia rápido sobre utilizar KaTeX -math: true +katex: true --- Em um projeto Hugo as Notações Matemáticas podem ser usadas com a ajuda de bibliotecas JavaScript de terceiros. @@ -21,27 +21,13 @@ Nesse exemplo usaremos o [KaTeX](https://katex.org/). {{ end }} ``` -- Para ativar o KaTex globalmente defina o parâmetro `math` como `true` na confgiuração do projeto -- Para ativar o KaTex em páginas específicas inclua o parâmetro `math: true` nos arquivos de conteúdo +- Para ativar o KaTex em páginas específicas inclua o parâmetro `katex: true` nos arquivos de conteúdo **Nota:** Use a referência online [Supported TeX Functions](https://katex.org/docs/supported.html) como base para criar notações matemáticas. -{{< math.inline >}} -{{ if or .Page.Params.math .Site.Params.math }} - - - - -{{ end }} -{{ math.inline >}} - ### Examples -{{< math.inline >}} --Notação inline: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) -
-{{ math.inline >}} +Notação inline: $(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…)$ Notação em bloco: $$