Adding-contents on AIMS Desktop https://desktop.aims.ac.za/adding-content/index.xml Recent content in Adding-contents on AIMS Desktop Hugo -- gohugo.io en-us Released under the MIT license Wed, 09 Mar 2016 19:56:50 +0100 Adding content https://desktop.aims.ac.za/adding-content/ Wed, 09 Mar 2016 19:56:50 +0100 https://desktop.aims.ac.za/adding-content/ <h2 id="download-aims-desktop">Download AIMS Desktop</h2> <p>&hellip;</p> <h2 id="hello-world">Hello world</h2> <p>Let&rsquo;s create our first content file for your documentation. Open a terminal and add the following command for each new file you want to add. Replace <code>&lt;section-name&gt;</code> with a general term that describes your document in detail.</p> <pre><code class="language-sh">hugo new &lt;section-name&gt;/filename.md </code></pre> <p>Visitors of your website will find the final document under <code>www.example.com/&lt;section-name&gt;/filename/</code>.</p> <p>Since it&rsquo;s possible to have multiple content files in the same section I recommend to create at least one <code>index.md</code> file per section. This ensures that users will find an index page under <code>www.example.com/&lt;section-name&gt;</code>.</p> <h2 id="homepage">Homepage</h2> <p>To add content to the homepage you need to add a small indicator to the frontmatter of the content file:</p> <pre><code class="language-toml">type: index </code></pre> <p>Otherwise the theme will not be able to find the corresponding content file.</p> <h2 id="table-of-contents">Table of contents</h2> <p>You maybe noticed that the menu on the left contains a small table of contents of the current page. All <code>&lt;h2&gt;</code> tags (<code>## Headline</code> in Markdown) will be added automatically.</p> <h2 id="admonitions">Admonitions</h2> <p>Admonition is a handy feature that adds block-styled side content to your documentation, for example hints, notes or warnings. It can be enabled by using the corresponding <a href="http://gohugo.io/extras/shortcodes/">shortcodes</a> inside your content:</p> <pre><code class="language-go">{{&lt; note title=&quot;Note&quot; &gt;}} Nothing to see here, move along. {{&lt; /note &gt;}} </code></pre> <p>This will print the following block:</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Nothing to see here, move along.</p> </div> <p>The shortcode adds a neutral color for the note class and a red color for the warning class. You can also add a custom title:</p> <pre><code class="language-go">{{&lt; warning title=&quot;Don't try this at home&quot; &gt;}} Nothing to see here, move along. {{&lt; /warning &gt;}} </code></pre> <p>This will print the following block:</p> <div class="admonition warning"> <p class="admonition-title">Don&#39;t try this at home</p> <p>Nothing to see here, move along.</p> </div>