mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-26 04:21:38 +01:00
Update HugoBasicExample Content (#45)
Closes #7 , closes #9 The existing outdated Hugo documentation in this repo will be replaced with the following more-or-less *evergreen* content: - **Markdown & HTML Syntax Guide** shows whether a theme has decorated basic HTML elements with CSS. Note that I have not included the Markdown syntax for aligning table columns due to: https://github.com/russross/blackfriday/issues/506 - **Rich Content** features a brief showcase of Hugo’s Privacy config and related Simple shortcodes. Note that I have chosen to embed content that showcases typography by several designers in various media including a 360° interactive YouTube video (for inspiration). Also these embeds should be covered under [Fair Use](https://fairuse.stanford.edu/overview/fair-use/what-is-fair-use/) since these are meant for teaching users how these Hugo shortcodes work. - **Placeholder Content** includes dummy copy along with a diagram and a link with info about the *Van de Graaf Canon* for constructing layouts (that can also be applied to websites). Note: the diagram is Open Source and taken from https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon (there is a link to this page in the caption). - **Math Typesetting** a brief tutorial about enabling KaTeX in Hugo (the Hugo Docs mention MathJax which is slower) - **Emoji Support** brief tutorial about Hugo’s built-in Unicode emoji support (as mentioned in the Hugo Docs) but also this includes an original technique for enabling non Unicode emoji in Hugo by using Static Image Replacement with the `replaceRE` function. Note: custom icons are from the Open Source [Mutant Standard](https://mutant.tech) emoji set. Also note that the **About** Page has been expanded and updated to reflect Hugo’s current features. --- **NOTES** Besides quoting from the Hugo Docs (when needed), these content files contain original content written and curated by me and whatever sources I used were modified to such an extent that there is no need for footnotes. The author credit for the new content is Hugo Authors since this is meant for the Hugo community -of which I am a current member- furthermore the content also may be modified by someone else in the future, so this credit seems more appropriate than one with my name. P.S. @digitalcraftsman I have not included a guide about Modular Typography as this would have been quite involved and I am running out of time. P.S.2 This PR also fixes the path of the `menu.main` `/about/` item see: #41 by @guylyons
This commit is contained in:
parent
24a0baeb7f
commit
5d9d7786a2
38
config.toml
38
config.toml
@ -6,13 +6,14 @@ copyright = "Copyright © 2008–2019, Steve Francia and the Hugo Authors; all r
|
||||
paginate = 3
|
||||
languageCode = "en"
|
||||
DefaultContentLanguage = "en"
|
||||
enableInlineShortcodes = true
|
||||
|
||||
[menu]
|
||||
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "about/"
|
||||
url = "/about/"
|
||||
weight = 10
|
||||
|
||||
[taxonomies]
|
||||
@ -22,21 +23,28 @@ series = "series"
|
||||
|
||||
[privacy]
|
||||
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
simple = true
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.twitter]
|
||||
disabled = false
|
||||
enableDNT = true
|
||||
simple = true
|
||||
disableInlineCSS = true
|
||||
[privacy.twitter]
|
||||
disabled = false
|
||||
enableDNT = true
|
||||
simple = true
|
||||
|
||||
[privacy.instagram]
|
||||
disabled = false
|
||||
simple = true
|
||||
[privacy.instagram]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.youtube]
|
||||
disabled = false
|
||||
privacyEnhanced = true
|
||||
[privacy.youtube]
|
||||
disabled = false
|
||||
privacyEnhanced = true
|
||||
|
||||
[services]
|
||||
|
||||
[services.instagram]
|
||||
disableInlineCSS = true
|
||||
|
||||
[services.twitter]
|
||||
disableInlineCSS = true
|
||||
|
||||
|
4
content/_index.md
Normal file
4
content/_index.md
Normal file
@ -0,0 +1,4 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
+++
|
||||
|
@ -1,13 +1,14 @@
|
||||
+++
|
||||
title = "About"
|
||||
date = "2014-04-09"
|
||||
description = "Hugo, the world’s fastest framework for building websites"
|
||||
date = "2019-02-28"
|
||||
aliases = ["about-us","about-hugo","contact"]
|
||||
author = "Hugo Authors"
|
||||
+++
|
||||
|
||||
Hugo is the **world’s fastest framework for building websites**. It is written in Go.
|
||||
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||
|
||||
It makes use of a variety of open source projects including:
|
||||
Hugo makes use of a variety of open source projects including:
|
||||
|
||||
* https://github.com/russross/blackfriday
|
||||
* https://github.com/alecthomas/chroma
|
||||
@ -15,5 +16,13 @@ It makes use of a variety of open source projects including:
|
||||
* https://github.com/spf13/cobra
|
||||
* https://github.com/spf13/viper
|
||||
|
||||
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
|
||||
|
||||
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
|
||||
|
||||
Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
|
||||
|
||||
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
||||
|
||||
|
||||
|
||||
|
20
content/cannabis_leaf.svg
Normal file
20
content/cannabis_leaf.svg
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||
<metadata>
|
||||
<rdf:RDF xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:dc = "http://purl.org/dc/elements/1.1/"
|
||||
>
|
||||
|
||||
<rdf:Description rdf:about="">
|
||||
<dc:title>Mutant Standard emoji v0.3.1</dc:title>
|
||||
</rdf:Description>
|
||||
|
||||
<cc:work rdf:about="">
|
||||
<cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/"/>
|
||||
<cc:attributionName>Dzuk</cc:attributionName>
|
||||
<cc:attributionURL>http://mutant.tech/</cc:attributionURL>
|
||||
</cc:work>
|
||||
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g id="comp."><rect id="cannabis_leaf" x="0" y="0" width="32" height="32" style="fill:none;"/><clipPath id="_clip1"><rect id="cannabis_leaf1" serif:id="cannabis_leaf" x="0" y="0" width="32" height="32"/></clipPath><g clip-path="url(#_clip1)"><g id="Layer2"><path d="M16,22c0,0 -0.619,-1.239 -1.422,-2.845c-2.253,-4.504 -2.253,-9.806 0,-14.31c0.803,-1.606 1.422,-2.845 1.422,-2.845c0,0 0.619,1.239 1.422,2.845c2.253,4.504 2.253,9.806 0,14.31c-0.803,1.606 -1.422,2.845 -1.422,2.845Z" style="fill:none;stroke:#000;stroke-width:4px;"/><path d="M16,22c0,0 0.758,-1.517 1.615,-3.23c1.548,-3.096 4.059,-5.607 7.155,-7.155c1.713,-0.857 3.23,-1.615 3.23,-1.615c0,0 -0.758,1.517 -1.615,3.23c-1.548,3.096 -4.059,5.607 -7.155,7.155c-1.713,0.857 -3.23,1.615 -3.23,1.615Z" style="fill:none;stroke:#000;stroke-width:4px;"/><path d="M16,21c0,0 0,0 0,0c4.407,-2.203 9.593,-2.203 14,0c0,0 0,0 0,0c0,0 0,0 0,0c-4.407,2.203 -9.593,2.203 -14,0c0,0 0,0 0,0Z" style="fill:none;stroke:#000;stroke-width:4px;"/><path d="M16,22c0,0 0.653,0 1.528,0c2.741,0 5.246,1.549 6.472,4c0,0 0,0 0,0c0,0 -0.653,0 -1.528,0c-2.741,0 -5.246,-1.549 -6.472,-4c0,0 0,0 0,0Z" style="fill:none;stroke:#000;stroke-width:4px;"/><path d="M16,22c0,0 -0.653,0 -1.528,0c-2.741,0 -5.246,1.549 -6.472,4c0,0 0,0 0,0c0,0 0.653,0 1.528,0c2.741,0 5.246,-1.549 6.472,-4c0,0 0,0 0,0Z" style="fill:none;stroke:#000;stroke-width:4px;"/><path d="M2,21c0,0 0,0 0,0c4.407,-2.203 9.593,-2.203 14,0c0,0 0,0 0,0c0,0 0,0 0,0c-4.407,2.203 -9.593,2.203 -14,0c0,0 0,0 0,0Z" style="fill:none;stroke:#000;stroke-width:4px;"/><path d="M16,22c0,0 -0.758,-1.517 -1.615,-3.23c-1.548,-3.096 -4.059,-5.607 -7.155,-7.155c-1.713,-0.857 -3.23,-1.615 -3.23,-1.615c0,0 0.758,1.517 1.615,3.23c1.548,3.096 4.059,5.607 7.155,7.155c1.713,0.857 3.23,1.615 3.23,1.615Z" style="fill:none;stroke:#000;stroke-width:4px;"/><rect x="15" y="25" width="2" height="5" style="fill:none;stroke:#000;stroke-width:4px;stroke-linejoin:miter;"/></g><g id="Layer1"><path d="M16,22c0,0 -0.619,-1.239 -1.422,-2.845c-2.253,-4.504 -2.253,-9.806 0,-14.31c0.803,-1.606 1.422,-2.845 1.422,-2.845c0,0 0.619,1.239 1.422,2.845c2.253,4.504 2.253,9.806 0,14.31c-0.803,1.606 -1.422,2.845 -1.422,2.845Z" style="fill:#219555;"/><path d="M16,22c0,0 0.758,-1.517 1.615,-3.23c1.548,-3.096 4.059,-5.607 7.155,-7.155c1.713,-0.857 3.23,-1.615 3.23,-1.615c0,0 -0.758,1.517 -1.615,3.23c-1.548,3.096 -4.059,5.607 -7.155,7.155c-1.713,0.857 -3.23,1.615 -3.23,1.615Z" style="fill:#219555;"/><path d="M16,21c0,0 0,0 0,0c4.407,-2.203 9.593,-2.203 14,0c0,0 0,0 0,0c0,0 0,0 0,0c-4.407,2.203 -9.593,2.203 -14,0c0,0 0,0 0,0Z" style="fill:#219555;"/><path d="M16,22c0,0 0.653,0 1.528,0c2.741,0 5.246,1.549 6.472,4c0,0 0,0 0,0c0,0 -0.653,0 -1.528,0c-2.741,0 -5.246,-1.549 -6.472,-4c0,0 0,0 0,0Z" style="fill:#219555;"/><path d="M16,22c0,0 -0.653,0 -1.528,0c-2.741,0 -5.246,1.549 -6.472,4c0,0 0,0 0,0c0,0 0.653,0 1.528,0c2.741,0 5.246,-1.549 6.472,-4c0,0 0,0 0,0Z" style="fill:#219555;"/><path d="M2,21c0,0 0,0 0,0c4.407,-2.203 9.593,-2.203 14,0c0,0 0,0 0,0c0,0 0,0 0,0c-4.407,2.203 -9.593,2.203 -14,0c0,0 0,0 0,0Z" style="fill:#219555;"/><path d="M16,22c0,0 -0.758,-1.517 -1.615,-3.23c-1.548,-3.096 -4.059,-5.607 -7.155,-7.155c-1.713,-0.857 -3.23,-1.615 -3.23,-1.615c0,0 0.758,1.517 1.615,3.23c1.548,3.096 4.059,5.607 7.155,7.155c1.713,0.857 3.23,1.615 3.23,1.615Z" style="fill:#219555;"/><rect x="15" y="15" width="2" height="15" style="fill:#219555;"/></g><path d="M13,20l3,-3l3,3l0,3l-6,0l0,-3Z" style="fill:#219555;"/></g></g></svg>
|
After Width: | Height: | Size: 4.4 KiB |
45
content/orc.svg
Normal file
45
content/orc.svg
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<metadata>
|
||||
<rdf:RDF xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:dc = "http://purl.org/dc/elements/1.1/"
|
||||
>
|
||||
|
||||
<rdf:Description rdf:about="">
|
||||
<dc:title>Mutant Standard emoji v0.3.1</dc:title>
|
||||
</rdf:Description>
|
||||
|
||||
<cc:work rdf:about="">
|
||||
<cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/"/>
|
||||
<cc:attributionName>Dzuk</cc:attributionName>
|
||||
<cc:attributionURL>http://mutant.tech/</cc:attributionURL>
|
||||
</cc:work>
|
||||
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
||||
<rect id="orc" x="0" y="0" width="32" height="32" style="fill:none;"/>
|
||||
<clipPath id="_clip1">
|
||||
<rect x="0" y="0" width="32" height="32"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#_clip1)">
|
||||
<g id="outline">
|
||||
<path d="M4.261,9.504c0.107,-0.506 0.246,-1.004 0.418,-1.492c0.578,-1.641 1.519,-3.15 2.735,-4.395c1.248,-1.279 2.781,-2.274 4.46,-2.888c0.839,-0.308 1.713,-0.52 2.6,-0.633c0.455,-0.058 0.913,-0.086 1.371,-0.095c0.156,-0.001 0.155,-0.001 0.31,0c0.458,0.009 0.916,0.037 1.371,0.095c0.887,0.113 1.761,0.325 2.6,0.633c1.679,0.614 3.212,1.609 4.46,2.888c1.216,1.245 2.157,2.754 2.735,4.395c0.172,0.488 0.311,0.986 0.418,1.492l3.953,-0.989c0.103,0.08 0.205,0.16 0.308,0.24c0,2.445 0.017,4.889 -0.001,7.333c-0.002,0.089 -0.005,0.176 -0.009,0.264c-0.031,0.465 -0.109,0.924 -0.242,1.37c-0.257,0.856 -0.706,1.651 -1.307,2.312c-0.254,0.28 -0.535,0.533 -0.835,0.762l-1.739,1.304c-0.051,0.335 -0.115,0.668 -0.194,0.998c-0.404,1.696 -1.181,3.298 -2.263,4.665c-0.479,0.606 -1.018,1.158 -1.6,1.664c-0.381,0.322 -0.765,0.639 -1.147,0.958c-0.235,0.191 -0.477,0.37 -0.732,0.532c-0.683,0.431 -1.441,0.743 -2.23,0.918c-0.447,0.099 -0.9,0.148 -1.358,0.163c-1.514,0.017 -3.029,0.002 -4.544,0.002c-0.353,-0.004 -0.704,-0.028 -1.053,-0.081c-0.749,-0.115 -1.477,-0.353 -2.15,-0.701c-0.393,-0.203 -0.761,-0.445 -1.111,-0.715l-0.749,1.497l-5.736,0l0,-10.745c-0.224,-0.169 -0.447,-0.339 -0.67,-0.508c-0.07,-0.055 -0.138,-0.11 -0.206,-0.167c-0.353,-0.303 -0.673,-0.64 -0.95,-1.015c-0.531,-0.719 -0.898,-1.555 -1.066,-2.432c-0.072,-0.372 -0.105,-0.748 -0.108,-1.126l0,-7.252l0.308,-0.24l3.953,0.989Z"/>
|
||||
</g>
|
||||
<g id="emoji">
|
||||
<path d="M5,30l2.5,0l2.5,-5l0,-12l-5,0l0,17Z" style="fill:#1c2c12;"/>
|
||||
<path d="M30,12.031l-2.393,7.764l-3.607,2.705l0,-10l6,-1.5l0,1.031Z" style="fill:#77b84c;"/>
|
||||
<path d="M30,12.031l0,3.969c0,1.259 -0.593,2.445 -1.6,3.2l-0.793,0.595c-0.378,-0.366 -0.607,-0.878 -0.607,-1.435l0,-5.579l3,-0.75Z" style="fill:#618e29;"/>
|
||||
<path d="M2,12.031l2.393,7.764l3.607,2.705l0,-10l-6,-1.5l0,1.031Z" style="fill:#77b84c;"/>
|
||||
<path d="M2,12.031l0,3.969c0,1.259 0.593,2.445 1.6,3.2l0.793,0.595c0.378,-0.366 0.607,-0.878 0.607,-1.435l0,-5.579l-3,-0.75Z" style="fill:#618e29;"/>
|
||||
<path d="M22.001,4c2.428,1.824 3.999,4.729 3.999,8c0,2.893 0,5.915 0,8.316c0,2.968 -1.318,5.783 -3.598,7.682c-0.356,0.297 -0.7,0.584 -1.011,0.843c-0.899,0.749 -2.032,1.159 -3.201,1.159c-1.309,0 -3.071,0 -4.38,0c-1.169,0 -2.302,-0.41 -3.201,-1.159c-0.311,-0.259 -0.655,-0.546 -1.011,-0.843c-2.28,-1.899 -3.598,-4.714 -3.598,-7.682l0,-8.222l0,-0.094l16,-8l0.001,0Z" style="fill:#77b84c;"/>
|
||||
<path d="M8.036,14.555c-0.204,-0.307 -0.223,-0.702 -0.049,-1.027c0.174,-0.325 0.513,-0.528 0.882,-0.528c1.034,0 2.28,0 3.131,0c0.552,0 1,0.448 1,1c0,0.322 0,0.678 0,1c0,0.552 -0.448,1 -1,1c-0.781,0 -1.837,0 -2.465,0c-0.334,0 -0.646,-0.167 -0.832,-0.445c-0.18,-0.271 -0.422,-0.633 -0.667,-1Zm15.928,0c0.204,-0.307 0.223,-0.702 0.049,-1.027c-0.174,-0.325 -0.513,-0.528 -0.882,-0.528c-1.034,0 -2.28,0 -3.131,0c-0.552,0 -1,0.448 -1,1c0,0.322 0,0.678 0,1c0,0.552 0.448,1 1,1c0.781,0 1.837,0 2.465,0c0.334,0 0.646,-0.167 0.832,-0.445c0.18,-0.271 0.422,-0.633 0.667,-1Z"/>
|
||||
<path d="M19.316,19.949c-0.709,0.236 -1.416,0.479 -2.128,0.708c-0.078,0.024 -0.155,0.045 -0.234,0.065c-0.47,0.111 -0.953,0.145 -1.434,0.087c-0.24,-0.029 -0.476,-0.082 -0.708,-0.152l-0.072,-0.023l-2.056,-0.685l0.632,-1.898c0.71,0.237 1.413,0.493 2.129,0.708c0.065,0.018 0.13,0.033 0.196,0.046c0.32,0.055 0.642,0.036 0.953,-0.058l0.043,-0.014l2.047,-0.682c0.211,0.633 0.421,1.265 0.632,1.898Z" style="fill:#456e17;fill-rule:nonzero;"/>
|
||||
<path d="M12,24l-3,0l1,-4l2,4Zm11,0l-1,-4l-2,4l3,0Z" style="fill:#fff;"/>
|
||||
<path d="M22.838,22.513l0.624,1.872l-0.014,0.008c-1.156,0.579 -2.307,1.17 -3.47,1.739c-0.179,0.083 -0.364,0.152 -0.556,0.2c-0.384,0.097 -0.781,0.113 -1.173,0.059c-0.716,-0.113 -1.426,-0.275 -2.146,-0.358c-0.083,-0.008 -0.166,-0.006 -0.248,0.005c-0.723,0.113 -1.441,0.26 -2.166,0.359c-0.177,0.02 -0.353,0.028 -0.53,0.019c-0.375,-0.019 -0.738,-0.111 -1.081,-0.261c-1.192,-0.553 -2.35,-1.173 -3.525,-1.761c-0.005,-0.002 -0.01,-0.005 -0.015,-0.008l0.624,-1.873c0.025,0.004 0.05,0.009 0.075,0.015c0.074,0.018 0.141,0.046 0.21,0.078c1.163,0.581 2.29,1.241 3.491,1.741c0.166,0.066 0.342,0.087 0.519,0.063c0.705,-0.111 1.406,-0.241 2.11,-0.351c0.29,-0.039 0.578,-0.039 0.867,0.001c0.723,0.113 1.438,0.289 2.166,0.36c0.179,0.014 0.355,-0.018 0.518,-0.094c1.15,-0.562 2.289,-1.147 3.434,-1.721c0.06,-0.028 0.075,-0.036 0.138,-0.057c0.049,-0.016 0.098,-0.027 0.148,-0.035Z" style="fill:#456e17;"/>
|
||||
<path d="M6,12c0,-5.523 4.477,-10 10,-10c0,0 0,0 0,0c2.251,0 4.329,0.744 6,1.999l0,1.93c0,1.326 -0.527,2.598 -1.464,3.535c-2.55,2.55 -7.536,7.536 -7.536,7.536l0,-6l-7,7l0,-5.969l0,-0.031Z" style="fill:#1c2c12;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.8 KiB |
@ -2,4 +2,5 @@
|
||||
aliases = ["posts","articles","blog","showcase"]
|
||||
title = "Posts"
|
||||
author = "Hugo Authors"
|
||||
tags = ["index"]
|
||||
+++
|
80
content/post/emoji-support.md
Normal file
80
content/post/emoji-support.md
Normal file
@ -0,0 +1,80 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Emoji Support"
|
||||
date = "2019-03-05"
|
||||
description = "Guide to emoji usage in Hugo"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
emoji = "<span class='nowrap'> :orc: <code>:orc:</code></span><span class='nowrap'> :v_paw_fk1: <code>:v_paw_fk1:</code></span><span class='nowrap'> :cannabis_leaf: <code>:cannabis_leaf:</code></span>"
|
||||
+++
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
<!--more-->
|
||||
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
|
||||
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
***
|
||||
|
||||
**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 >}}
|
||||
.emoji {
|
||||
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
|
||||
***
|
||||
|
||||
|
||||
If you feel restricted by Unicode Standard emoji and want to use custom emoji the [`replaceRE`](https://gohugo.io/functions/replacere/#readout) function makes it easy to perform Static Image Replacement in Hugo.
|
||||
|
||||
In this example we will be using emoji from the [Mutant Standard](https://mutant.tech/) set.
|
||||
|
||||
- Do not use `enableEmoji` in your Hugo project's configuration
|
||||
|
||||
- Store the icons of the custom emoji set under `/static/`
|
||||
|
||||
- Use the shorthand codes provided by the custom emoji set in your content files e.g. `:orc:`
|
||||
|
||||
- In your templates execute the Image Replacement like so:
|
||||
|
||||
{{< highlight html >}}
|
||||
{{ replaceRE "(\\:([a-zA-Z0-9_]*)\\:)" `<img class="emoji" src="/${2}.svg" alt="${1}" title="${1}">` .Content | markdownify | safeHTML }}
|
||||
{{< /highlight >}}
|
||||
|
||||
|
||||
{{< css.inline >}}
|
||||
<p>{{ replaceRE "(\\ :([a-zA-Z0-9_]*)\\: )" `<img class="emoji" src="/${2}.svg" alt="${1}" title="${1}">` .Page.Params.emoji | safeHTML }}</p>
|
||||
<style>
|
||||
.emoji {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
height: 5.5rem;
|
||||
width: 5.5rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
|
||||
font-size: 5rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
||||
|
||||
|
||||
**N.B.** The above RegEx captures all alphanumerics and underscores within two colon `:` characters (amend it according to your custom emoji set's specification).
|
242
content/post/markdown-and-html-syntax.md
Normal file
242
content/post/markdown-and-html-syntax.md
Normal file
@ -0,0 +1,242 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Markdown & HTML Syntax Guide"
|
||||
date = "2019-03-11"
|
||||
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags = [
|
||||
"markdown",
|
||||
"css",
|
||||
"html",
|
||||
"themes",
|
||||
]
|
||||
categories = [
|
||||
"themes",
|
||||
"syntax",
|
||||
]
|
||||
series = ["Themes Guide"]
|
||||
aliases = ["migrate-from-jekyl"]
|
||||
+++
|
||||
|
||||
This article offers a sample of basic Markdown and HTML syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||
<!--more-->
|
||||
***
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
***
|
||||
|
||||
## Paragraph
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
---
|
||||
|
||||
## Blockquotes
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
<h5>Blockquote without attribution</h5>
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use *Markdown syntax* within a blockquote.
|
||||
|
||||
<h5>Blockquote with attribution</h5>
|
||||
|
||||
<blockquote>
|
||||
<p>Don't communicate by sharing memory, share memory by communicating.</p>
|
||||
<footer>— <cite>Rob Pike</cite></footer>
|
||||
</blockquote>
|
||||
|
||||
###### The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
***
|
||||
|
||||
## Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
<h5>Markdown Input</h5>
|
||||
|
||||
```
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
```
|
||||
<h5>HTML Output</h5>
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<h4>Sample Inline Markdown within tables</h4>
|
||||
|
||||
<h5>Markdown Input</h5>
|
||||
|
||||
```
|
||||
| Inline | Markdown | In | Table |
|
||||
| ---------- | --------- | ----------------- | ---------- |
|
||||
| *italics* | **bold** | ~~strikethrough~~ | `code` |
|
||||
```
|
||||
|
||||
|
||||
<h5>HTML Output</h5>
|
||||
|
||||
| Inline | Markdown | In | Table |
|
||||
| ---------- | --------- | ----------------- | ---------- |
|
||||
| *italics* | **bold** | ~~strikethrough~~ | `code` |
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Code Blocks
|
||||
|
||||
<h5>Code block with backticks </h5>
|
||||
|
||||
```
|
||||
html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
<br>
|
||||
<h5>Code block indented with four spaces</h5>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<br>
|
||||
<h5>Code block with Hugo's internal highlight shortcode</h5>
|
||||
{{< highlight html >}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
|
||||
---
|
||||
|
||||
## List Types
|
||||
|
||||
### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
<br>
|
||||
### Unordered List
|
||||
|
||||
<h5>Markdown Input</h5>
|
||||
|
||||
```
|
||||
* List item
|
||||
* Another item
|
||||
* And another item
|
||||
```
|
||||
|
||||
<h5>HTML Output</h5>
|
||||
|
||||
<ul>
|
||||
<li>List item</li>
|
||||
<li>Another item</li>
|
||||
<li>And another item</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
### Nested list
|
||||
|
||||
<h5>Markdown Input</h5>
|
||||
|
||||
```
|
||||
* Item
|
||||
1. First Sub-item
|
||||
2. Second Sub-item
|
||||
```
|
||||
|
||||
<h5>HTML Output</h5>
|
||||
|
||||
<ul>
|
||||
<li>Item</li>
|
||||
<ol>
|
||||
<li>First Sub-item</li>
|
||||
<li>Second Sub-item</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
### Definition List
|
||||
|
||||
<h5>HTML Input</h5>
|
||||
|
||||
```
|
||||
<dl>
|
||||
<dt>Aque venitatiusda cum</dt>
|
||||
<dd>Voluptionse latur sitiae dolessi...</dd>
|
||||
<dt>Dantinc itiur</dt>
|
||||
<dd>Axim reperum ese eaquam, coriatiorita...</dd>
|
||||
</dl>
|
||||
```
|
||||
|
||||
<h5>HTML Output</h5>
|
||||
|
||||
<dl>
|
||||
<dt>Aque venitatiusda cum</dt>
|
||||
<dd>Voluptionse latur sitiae dolessi...</dd>
|
||||
<dt>Dantinc itiur</dt>
|
||||
<dd>Axim reperum ese eaquam, coriatiorita...</dd>
|
||||
</dl>
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
46
content/post/math-typesetting.mmark
Normal file
46
content/post/math-typesetting.mmark
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
author: Hugo Authors
|
||||
title: Math Typesetting
|
||||
date: 2019-03-08
|
||||
description: A brief guide to setup KaTeX
|
||||
markup: mmark
|
||||
math: true
|
||||
---
|
||||
|
||||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
|
||||
<!--more-->
|
||||
|
||||
In this example we will be using [KaTeX](https://katex.org/)
|
||||
|
||||
- Create a partial under `/layouts/partials/math.html`
|
||||
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
|
||||
- Include the partial in your templates like so:
|
||||
|
||||
```
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ 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.
|
||||
|
||||
**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 }}
|
||||
<!-- KaTeX -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
||||
{{</ math.inline >}}
|
||||
|
||||
### Examples
|
||||
|
||||
Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$
|
||||
|
||||
Block math:
|
||||
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
|
60
content/post/placeholder-text.md
Normal file
60
content/post/placeholder-text.md
Normal file
@ -0,0 +1,60 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Placeholder Text"
|
||||
date = "2019-03-09"
|
||||
description = "Lorem Ipsum Dolor Si Amet"
|
||||
tags = [
|
||||
"markdown",
|
||||
"text",
|
||||
]
|
||||
+++
|
||||
|
||||
# Vagus elidunt
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" height="370" width="495" viewBox="0 0 495 370"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mole et vultus populifer quaque primoque non
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de
|
||||
pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice
|
||||
subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc
|
||||
caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis
|
||||
lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus
|
||||
silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria
|
||||
tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
Victa caducifer, malo vulnere contra
|
||||
dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere
|
||||
furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||
|
||||
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli
|
||||
Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare
|
||||
Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert
|
||||
ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae
|
||||
vulnus haerentia iuste et exercebat, sui et.
|
||||
|
||||
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem
|
||||
Propoetides **parte**.
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto;}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
42
content/post/rich-content.md
Normal file
42
content/post/rich-content.md
Normal file
@ -0,0 +1,42 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Rich Content"
|
||||
date = "2019-03-10"
|
||||
description = "A brief description of Hugo Shortcodes"
|
||||
tags = [
|
||||
"shortcodes",
|
||||
"privacy",
|
||||
]
|
||||
+++
|
||||
|
||||
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
||||
<!--more-->
|
||||
---
|
||||
|
||||
## Instagram Simple Shortcode
|
||||
|
||||
{{< instagram_simple BGvuInzyFAe hidecaption >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## YouTube Privacy Enhanced Shortcode
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Twitter Simple Shortcode
|
||||
|
||||
{{< twitter_simple 1085870671291310081 >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Vimeo Simple Shortcode
|
||||
|
||||
{{< vimeo_simple 48912912 >}}
|
@ -1,5 +0,0 @@
|
||||
+++
|
||||
aliases = ["posts","articles","blog","showcase"]
|
||||
title = "Posts"
|
||||
author = "Hugo Authors"
|
||||
+++
|
1
content/posts/_index.md
Symbolic link
1
content/posts/_index.md
Symbolic link
@ -0,0 +1 @@
|
||||
../post/_index.md
|
1
content/posts/emoji-support.md
Symbolic link
1
content/posts/emoji-support.md
Symbolic link
@ -0,0 +1 @@
|
||||
../post/emoji-support.md
|
1
content/posts/markdown-and-html-syntax.md
Symbolic link
1
content/posts/markdown-and-html-syntax.md
Symbolic link
@ -0,0 +1 @@
|
||||
../post/markdown-and-html-syntax.md
|
1
content/posts/math-typesetting.mmark
Symbolic link
1
content/posts/math-typesetting.mmark
Symbolic link
@ -0,0 +1 @@
|
||||
../post/math-typesetting.mmark
|
1
content/posts/placeholder-text.md
Symbolic link
1
content/posts/placeholder-text.md
Symbolic link
@ -0,0 +1 @@
|
||||
../post/placeholder-text.md
|
1
content/posts/rich-content.md
Symbolic link
1
content/posts/rich-content.md
Symbolic link
@ -0,0 +1 @@
|
||||
../post/rich-content.md
|
20
content/v_paw_fk1.svg
Normal file
20
content/v_paw_fk1.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 8.2 KiB |
Loading…
Reference in New Issue
Block a user