<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aan de slag on Hugo Codex</title>
    <link>https://hugocodex.org/nl/aan-de-slag/</link>
    <description>Recent content in Aan de slag on Hugo Codex</description>
    <generator>Hugo</generator>
    <language>nl</language>
    <atom:link href="https://hugocodex.org/nl/aan-de-slag/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>1. Hugo installeren</title>
      <link>https://hugocodex.org/nl/aan-de-slag/1-hugo-installeren/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://hugocodex.org/nl/aan-de-slag/1-hugo-installeren/</guid>
      <description>&lt;p&gt;Er zijn &#xA;&lt;a href=&#34;https://gohugo.io/getting-started/installing/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;heel veel manieren&lt;/a&gt; om Hugo te installeren. Het mooie aan Hugo is dat installeren heel simpel is/kan zijn. Het komt eigenlijk allemaal op hetzelfde neer:&lt;/p&gt;&#xA;&lt;p&gt;Op Windows download je de Windows-versie (tar.gz), pak je hem uit in je projectmap en start je &amp;lsquo;hugo server&amp;rsquo; vanaf de command line. Op een Mac download je de MacOS-versie (tar.gz), pak je hem uit in je projectmap en start je &amp;lsquo;hugo server&amp;rsquo; vanaf de command line. Op een Linux-machine installeer je Hugo door &amp;lsquo;sudo apt install hugo&amp;rsquo; te typen. Ga daarna naar je projectmap en start &amp;lsquo;hugo server&amp;rsquo; vanaf de command line. Wil je de nieuwste versie, dan kun je het .deb-bestand downloaden en met hetzelfde commando installeren (vervang &amp;lsquo;hugo&amp;rsquo; door de naam van je .deb-bestand).&lt;/p&gt;</description>
    </item>
    <item>
      <title>2. Wat HTML maken</title>
      <link>https://hugocodex.org/nl/aan-de-slag/2-html-maken/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://hugocodex.org/nl/aan-de-slag/2-html-maken/</guid>
      <description>&lt;p&gt;Nu Hugo geïnstalleerd is, beginnen we met een hele simpele webpagina. Eerst moet je twee bestanden maken. Maak eerst een leeg bestand met de naam &amp;lsquo;hugo.yaml&amp;rsquo;. Maak daarna een bestand met de naam &amp;lsquo;home.html&amp;rsquo; met wat simpele HTML:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;    Dit is een hele simpele webpagina&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Het bestand &amp;lsquo;hugo.yaml&amp;rsquo; zet je in de root van je project en het bestand &amp;lsquo;home.html&amp;rsquo; in een map met de naam &amp;rsquo;layouts&amp;rsquo;. Je project ziet er nu zo uit:&lt;/p&gt;</description>
    </item>
    <item>
      <title>3. Je eerste content toevoegen</title>
      <link>https://hugocodex.org/nl/aan-de-slag/3-content-toevoegen/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://hugocodex.org/nl/aan-de-slag/3-content-toevoegen/</guid>
      <description>&lt;p&gt;Nu we een &amp;lsquo;index.html&amp;rsquo; bestand hebben, gaan we de code van de content scheiden. Hugo gebruikt hiervoor &#xA;&lt;a href=&#34;https://www.markdownguide.org/cheat-sheet/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Markdown&lt;/a&gt;. Alle content wordt opgeslagen in &amp;lsquo;.md&amp;rsquo; (Markdown) bestanden in een map &amp;lsquo;content&amp;rsquo; in de root van je project. Maak een Markdown-bestand met de naam &amp;lsquo;_index.md&amp;rsquo; dat er zo uitziet:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;---&#xA;title: Mijn eerste contentbestand&#xA;---&#xA;Mijn eerste alinea in Markdown&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sla het bestand op in de map &amp;lsquo;content&amp;rsquo;. Pas nu je &amp;lsquo;/layouts/home.html&amp;rsquo; bestand aan, zodat het er zo uitziet:&lt;/p&gt;</description>
    </item>
    <item>
      <title>4. Je eerste partials gebruiken</title>
      <link>https://hugocodex.org/nl/aan-de-slag/4-partials-gebruiken/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://hugocodex.org/nl/aan-de-slag/4-partials-gebruiken/</guid>
      <description>&lt;p&gt;Een website bestaat meestal uit een paar onderdelen die op elke pagina terugkomen, zoals een header met een menu en een footer. In plaats van die aan elke pagina toe te voegen, kun je een &amp;lsquo;partial&amp;rsquo; gebruiken. Partials moeten opgeslagen worden in de map &amp;lsquo;/layouts/_partials&amp;rsquo;.&lt;/p&gt;&#xA;&lt;p&gt;Maak een bestand &amp;lsquo;header.html&amp;rsquo; dat er zo uitziet:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Maak een bestand &amp;lsquo;footer.html&amp;rsquo; dat er zo uitziet:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sla beide bestanden op in de map &amp;lsquo;/layouts/_partials&amp;rsquo;. Werk nu je &amp;lsquo;/layouts/home.html&amp;rsquo; bestand bij en zorg dat het er zo uitziet (vervang de code door links naar de partials):&lt;/p&gt;</description>
    </item>
    <item>
      <title>5. Nog een contentbestand toevoegen</title>
      <link>https://hugocodex.org/nl/aan-de-slag/5-meer-content-toevoegen/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://hugocodex.org/nl/aan-de-slag/5-meer-content-toevoegen/</guid>
      <description>&lt;p&gt;Onze website begint vorm te krijgen ;-). Maar we missen nog een nette contactpagina. Om die te maken, maken we een bestand &amp;lsquo;/content/contact.md&amp;rsquo;. Dat bestand ziet er zo uit:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;---&#xA;title: Contactpagina&#xA;---&#xA;Stuur me een e-mail op joost@vdschee.nl&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We hadden al een layoutbestand (home.html), maar dat bestand gold alleen voor de homepage. Daarom hebben we nu een tweede bestand nodig. Dat bestand mag een exacte kopie van &amp;lsquo;home.html&amp;rsquo; zijn en moet je &amp;lsquo;page.html&amp;rsquo; noemen. Dit bestand sla je op in de map &amp;lsquo;/layouts/&amp;rsquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>6. Een blog toevoegen</title>
      <link>https://hugocodex.org/nl/aan-de-slag/6-een-blog-toevoegen/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://hugocodex.org/nl/aan-de-slag/6-een-blog-toevoegen/</guid>
      <description>&lt;p&gt;Elke website heeft een nieuwssectie of een blog. Daarom gaan we een map &amp;lsquo;posts&amp;rsquo; aan onze contentmap toevoegen. In deze nieuwe map maken we een markdown-bestand met de naam &amp;lsquo;hello-world.md&amp;rsquo;, ons eerste bericht. Dat bestand ziet er zo uit:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;---&#xA;title: Hallo wereld&#xA;date: 2016-02-01 10:00:00&#xA;---&#xA;Dit is mijn eerste blogbericht&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;De datum moet de huidige datum zijn. De tijd is optioneel. Daarnaast gaan we een (nieuw) layoutbestand toevoegen voor ons blogoverzicht (een lijstweergave van onze berichten). Hugo eist dat je dit bestand &amp;lsquo;section.html&amp;rsquo; noemt en in de map &amp;rsquo;layouts&amp;rsquo; opslaat. Dit bestand ziet er zo uit:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
