A description of how this site’s static pages (i.e. not blog posts, not landing page, not the Digital Garden TODO: Add Link) were created.

  • Create folder content/pages
  • Create content/pages/_index.md and specify title and [cascade] type = posts
  • Copy all static page content to content/pages

Remove the ‘Next’/‘Prev’ nav footer by creating a custom post.html layout for type pages.

All static pages under content/pages get this pages type by virtue of being under the pages dir in content

1mkdir layouts/partials/pages/
2cp themes/hugo-bootstrap-theme/layouts/partials/post.html layouts/partials/pages/

Edit layouts/partials/pages/post.html and remove the lines

1<div class="card-footer">
2    {{- partial "post/nav" . -}}
3</div>
1mkdir layouts/pages
2cp themes/hugo-bootstrap-theme/layouts/_default/single.html layouts/pages

Edit layouts/pages/single.html and replace

1{{- partial "post" . -}}

with

1{{- partial "pages/post" . -}}
  • Copy associated static content into static
    • assets from Dendron for the Digital Garden subsection of this site
    • presentations, publications, and sarathi contain files linked to from various static pages

Remove widgets from sidebar

To remove everything except ToC widget from sidebar in Pages layout

  • cp themes/hugo-theme-bootstrap/layouts/partials/sidebar.html layouts/partials/pages/
  • Edit layouts/pages/single.html and replace {{- partial "sidebar" . -}} with {{- partial "pages/sidebar" . -}}
  • Edit layouts/partials/pages/sidebar.html to have the following content
 1<aside class="col-lg-4 sidebar d-flex position-sticky">
 2  <div class="container d-flex flex-column">
 3    {{ partial "hooks/sidebar-begin" . }}
 4    {{- partial "sidebar/profile" . -}}
 5    {{- partial "sidebar/profile" . -}}
 6    {{- if ne "content" .Site.Params.tocPosition -}}
 7      {{- partial "sidebar/toc" . -}}
 8    {{- end -}}
 9    {{ partial "hooks/sidebar-end" . }}
10  </div>
11</aside>