Single Templates

For every Markdown file in the content/ folder (except the homepage), Aoife will render it using a single.html file from the currently active theme. Which single.html template file is used is decided with this algorithm:

  1. Is the file content/ If so then it’s a static homepage so render it with layouts/home.html
  2. Is the Markdown file in the root of content/? If yes then use layouts/single.html
  3. Is the Markdown file in a section? If yes then use the single.html file for that section. For example, for the Markdown file content/review/Die Aoife will look first for layouts/review/single.html and use it. If that doesn’t exist then Aoife will render the content with the default layouts/single.html file

Example single template file

The example single.html template file below is used for this very page you’re viewing. It makes use of partials.

{{partial header-docs} }

{{partial top-navbar} }

  <div class="container">
    <div class="row row-offcanvas row-offcanvas-left">

      <!-- sidebar navigation -->
      <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
          {{partial navigation} }

      <!-- main area -->
      <div class="col-xs-12 col-sm-9 my-content">
        <h1>{{title} }</h1>
        {{content} }
        <div class="row meta">
          <div class="col-xs-6 col-sm-6">
            <p class="text-left">Modified: {{date.shortMonth} } {{} }, {{date.year} } at {{date.hour} }:{{date.minute} }:{{date.second} }</p>
          </div><!--/.col-xs-6 col-sm-6-->
          <div class="col-xs-6 col-sm-6">
            <p class="text-right">Aoife v{{aoife.version} } documentation</p>
          </div><!--/.col-xs-6 col-sm-6-->
        </div><!--/.row meta-->
      </div><!-- /.col-xs-12 main -->
</div><!--/#wrap data-sticky-wrap-->

{{partial footer-docs} }

Modified: Dec 8, 2016 at 20:41:13

Aoife v0.9.0 documentation