<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jennaleigh Angala]]></title><description><![CDATA[Jennaleigh Angala]]></description><link>https://blog.jennayey.com</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 18:56:46 GMT</lastBuildDate><atom:link href="https://blog.jennayey.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[4 Basic Hugo Commands]]></title><description><![CDATA[Hugo  is an open-source static site generator that has a very flexible templating system. I've listed below the most frequent hugo commands you'll be using while building your website.
Creating a new Hugo site
This is the first Hugo command you'll ty...]]></description><link>https://blog.jennayey.com/4-basic-hugo-commands</link><guid isPermaLink="true">https://blog.jennayey.com/4-basic-hugo-commands</guid><category><![CDATA[Hugo]]></category><category><![CDATA[markdown]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Jennaleigh]]></dc:creator><pubDate>Sat, 19 Oct 2019 14:02:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1606055547931/tMGE6uVoh.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p> <a target="_blank" href="https://gohugo.io">Hugo</a>  is an open-source static site generator that has a very flexible templating system. I've listed below the most frequent hugo commands you'll be using while building your website.</p>
<h3 id="creating-a-new-hugo-site">Creating a new Hugo site</h3>
<p>This is the first Hugo command you'll type.</p>
<pre><code>hugo <span class="hljs-built_in">new</span> site site-<span class="hljs-type">name</span>
</code></pre><p>This will create a new Hugo site complete with all the folder structure. This new Hugo site will not contain any content or themes yet, you can add them using the 
<code>hugo new</code>
command (see below).</p>
<h3 id="creating-new-markdown-files">Creating new Markdown files</h3>
<p>Markdown files are one of the Hugo files you'll be creating frequently, especially if your Hugo site will have a lot of content or pages. To create a new hugo markdown file:</p>
<pre><code>hugo <span class="hljs-built_in">new</span> post1.md
</code></pre><p>And there you go, a new markdown file was created under your content folder. </p>
<p>Markdown files created via Hugo CLI already includes the front-matter defaults you've set in your <code>default.md</code> file. The new Markdown files are generated in your content folder by default. But if you want to further arrange your files into subfolders, just add your the name of your subfolder right before the markdown file name.</p>
<pre><code> hugo <span class="hljs-built_in">new</span> subfolder-<span class="hljs-type">name</span>/post1.md
</code></pre><p><code>folder-name</code> is the name of the folder under your content folder.</p>
<h3 id="running-the-hugo-server">Running the Hugo Server</h3>
<p>If you're familiar with Visual Studio Code's live server, Hugo has it's own command for running it's server. To preview your website onto your browser:
    hugo server
Your web server will now be available to view on your browser at http://localhost:1313/. </p>
<p>Hugo automatically refreshes your website with updated content while you're editing it, no need to refresh your browser or re-run the <code>hugo server</code> command. To stop the server, return to the terminal and press the keyboard shortcut <code>ctrl+c</code>.</p>
<p>When running the server, Hugo will only show and build pages that aren't drafts. Posts/files with dates set in the future won't be showed or generated by Hugo as well. Only files dated today and older are built and shown. If you want to preview draft pages in the server, you just need to add <code>-D</code> at the end of the command.</p>
<pre><code>hugo <span class="hljs-keyword">server</span> -D
</code></pre><p>If you want to view the future dated files:</p>
<pre><code>hugo <span class="hljs-keyword">server</span> <span class="hljs-comment">--buildFuture</span>
</code></pre><h3 id="building-your-hugo-site">Building your Hugo site</h3>
<p>If you are done editing, testing and creating your Hugo website, it's time to build and generate your website files for publishing. This can be done with the command:</p>
<pre><code>hugo
</code></pre><p>Hugo will generate your website files under the <code>public</code> folder of your Hugo project folder. You can now transfer your files and publish your website.</p>
]]></content:encoded></item></channel></rss>