41 lines
8.4 KiB
HTML
41 lines
8.4 KiB
HTML
<!doctype html><html lang=en-us dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://example.org/categories/development/"><meta property="og:site_name" content="My New Hugo Site"><meta property="og:title" content="Development"><meta property="og:locale" content="en_us"><meta property="og:type" content="website"><title>Development | My New Hugo Site</title>
|
|
<link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://example.org/categories/development/><link rel=stylesheet href=/book.min.6c8b9d2a1fc95075ed7da46ca81060b39add8fff6741ac51259f768929281e2c.css integrity="sha256-bIudKh/JUHXtfaRsqBBgs5rdj/9nQaxRJZ92iSkoHiw=" crossorigin=anonymous><script defer src=/fuse.min.js></script><script defer src=/en.search.min.9673d6ec80e7ea2624702dfa8af062865b38fab85f2c803969e50d693548458f.js integrity="sha256-lnPW7IDn6iYkcC36ivBihls4+rhfLIA5aeUNaTVIRY8=" crossorigin=anonymous></script><link rel=alternate type=application/rss+xml href=https://example.org/categories/development/index.xml title="My New Hugo Site"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
|
|
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><span>My New Hugo Site</span></a></h2><div class="book-search hidden"><input type=text id=book-search-input placeholder=Search aria-label=Search maxlength=64 data-hotkeys=s/><div class="book-search-spinner hidden"></div><ul id=book-search-results></ul></div><script>document.querySelector(".book-search").classList.remove("hidden")</script><ul><li class=book-section-flat><a href=/docs/example/>Example Site</a><ul><li><a href=/docs/example/table-of-contents/>Table of Contents</a><ul><li><a href=/docs/example/table-of-contents/with-toc/>With ToC</a></li><li><a href=/docs/example/table-of-contents/without-toc/>Without ToC</a></li></ul></li><li><input type=checkbox id=section-daaeee56fab400ffe0b5304ba7523921 class=toggle>
|
|
<label for=section-daaeee56fab400ffe0b5304ba7523921 class="flex justify-between"><a role=button>Collapsed</a></label><ul><li><a href=/docs/example/collapsed/3rd-level/>3rd Level</a><ul><li><a href=/docs/example/collapsed/3rd-level/4th-level/>4th Level</a></li></ul></li></ul></li></ul></li><li class=book-section-flat><span>Shortcodes</span><ul><li><a href=/docs/shortcodes/buttons/>Buttons</a></li><li><a href=/docs/shortcodes/columns/>Columns</a></li><li><a href=/docs/shortcodes/details/>Details</a></li><li><a href=/docs/shortcodes/hints/>Hints</a></li><li><a href=/docs/shortcodes/mermaid/>Mermaid</a></li><li><a href=/docs/shortcodes/tabs/>Tabs</a></li><li><a href=/docs/shortcodes/katex/>KaTeX</a></li></ul></li></ul><ul><li><a href=/posts/>Blog</a></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Development</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav><ul><li class=book-section-flat><strong>Categories</strong><ul><li class="flex justify-between"><a href=/categories/development/>Development</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/categories/golang/>Golang</a>
|
|
<span>2</span></li></ul></li><li class=book-section-flat><strong>Tags</strong><ul><li class="flex justify-between"><a href=/tags/development/>Development</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/tags/go/>Go</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/tags/golang/>Golang</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/tags/hugo/>Hugo</a>
|
|
<span>1</span></li><li class="flex justify-between"><a href=/tags/templates/>Templates</a>
|
|
<span>1</span></li><li class="flex justify-between"><a href=/tags/themes/>Themes</a>
|
|
<span>1</span></li></ul></li></ul></nav></aside></header><article class="markdown book-post"><h2><a href=/posts/goisforlovers/>(Hu)go Template Primer</a></h2><div class="flex align-center text-small book-post-date"><img src=/svg/calendar.svg class=book-icon alt>
|
|
<span>April 2, 2014</span></div><div class=text-small><a href=/categories/development/>Development</a>,
|
|
<a href=/categories/golang/>Golang</a></div><div class=text-small><a href=/tags/go/>Go</a>,
|
|
<a href=/tags/golang/>Golang</a>,
|
|
<a href=/tags/templates/>Templates</a>,
|
|
<a href=/tags/themes/>Themes</a>,
|
|
<a href=/tags/development/>Development</a></div><p><p>Hugo uses the excellent <a href=https://golang.org/>Go</a> <a href=https://golang.org/pkg/html/template/>html/template</a> library for
|
|
its template engine. It is an extremely lightweight engine that provides a very
|
|
small amount of logic. In our experience that it is just the right amount of
|
|
logic to be able to create a good static website. If you have used other
|
|
template systems from different languages or frameworks you will find a lot of
|
|
similarities in Go templates.</p><p>This document is a brief primer on using Go templates. The <a href=https://golang.org/pkg/html/template/>Go docs</a>
|
|
provide more details.</p><a href=/posts/goisforlovers/>...</a></p></article><article class="markdown book-post"><h2><a href=/posts/hugoisforlovers/>Getting Started with Hugo</a></h2><div class="flex align-center text-small book-post-date"><img src=/svg/calendar.svg class=book-icon alt>
|
|
<span>April 2, 2014</span></div><div class=text-small><a href=/categories/development/>Development</a>,
|
|
<a href=/categories/golang/>Golang</a></div><div class=text-small><a href=/tags/go/>Go</a>,
|
|
<a href=/tags/golang/>Golang</a>,
|
|
<a href=/tags/hugo/>Hugo</a>,
|
|
<a href=/tags/development/>Development</a></div><p><h2 id=step-1-install-hugo>Step 1. Install Hugo
|
|
<a class=anchor href=#step-1-install-hugo>#</a></h2><p>Go to <a href=https://github.com/spf13/hugo/releases>Hugo releases</a> and download the
|
|
appropriate version for your OS and architecture.</p><p>Save it somewhere specific as we will be using it in the next step.</p><p>More complete instructions are available at <a href=https://gohugo.io/getting-started/installing/>Install Hugo</a></p><h2 id=step-2-build-the-docs>Step 2. Build the Docs
|
|
<a class=anchor href=#step-2-build-the-docs>#</a></h2><p>Hugo has its own example site which happens to also be the documentation site
|
|
you are reading right now.</p><p>Follow the following steps:</p><a href=/posts/hugoisforlovers/>...</a></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav><ul><li class=book-section-flat><strong>Categories</strong><ul><li class="flex justify-between"><a href=/categories/development/>Development</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/categories/golang/>Golang</a>
|
|
<span>2</span></li></ul></li><li class=book-section-flat><strong>Tags</strong><ul><li class="flex justify-between"><a href=/tags/development/>Development</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/tags/go/>Go</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/tags/golang/>Golang</a>
|
|
<span>2</span></li><li class="flex justify-between"><a href=/tags/hugo/>Hugo</a>
|
|
<span>1</span></li><li class="flex justify-between"><a href=/tags/templates/>Templates</a>
|
|
<span>1</span></li><li class="flex justify-between"><a href=/tags/themes/>Themes</a>
|
|
<span>1</span></li></ul></li></ul></nav></div></aside></main></body></html> |