Introduction Prerequisites Installation Development Instructions Files Structure Contents Contexts Special Pages Deployment Conclusion

Contents in Sites115

Conventions used in folder templates

Templates is a programming method that helps reduce duplicates. This makes it easier to write content with shared elements all stored somewhere. Examples of frequently duplicated things include navigation links on the top of a page and footer at the bottom of a page.

The conventions used in folder templates are:

  1. The template kind in use is golang's html/template.
  2. Search on google for how to use golang's templates.
  3. All templates files must not begin with a variables section.

Conventions used in folder stuffs

  1. Every folder must contain a ‘index.html’ for the path /

  2. Every html or markdown file must begin with a variables part. It must begin with --- and end with ---. Sample contents include

    ---
    template: base.html
    title: Saenuma - A beautiful programs website
    meta: Saenuma homepage. Saenuma delivers beautiful programs.
    keywords: programs, database, program, forms, git, stories
    ---
          

    it must contain the variables: template, title, meta and keywords. You can include your own variables.

  3. A markdown file must have the template and the md_template variables.

  4. Every sub-folder of stuffs must contain a toc.txt. toc.txt is used to order the links in the index.html. toc.txt can contain only html and markdown entries. Sample of a toc.txt is as follows:

    how_to_blog.md
    on_css_frameworks.md
    long_running_tasks.md
        

  5. Include a ‘404.html’ in your stuffs folder for not found pages.

  6. Include a ‘search_results.html’ in your stuffs folder for results of a search

< Previous Next >