Luminos site layout

Luminos requires both a special directory layout a configuration file to serve any host.

File: site.yaml

A required configuration file, not to be confused with settings.yaml, this file affects only the current host.

This is an example of a site.yaml file.

# Configuration file for Luminos.
#
# Note: Use two space indentations instead of the \t character.
#
#

page:
  # Name of the site.
  brand: "Luminos"

  # Some properties for <head>.
  head:
    # Title that appears on the <title> tag.
    title: "Luminos, markdown server"

  # Some properties for <body>.
  body:
    # Title that appears on the <h1> tag.
    title: "Luminos project"

    # Top navigation bar.
    menu:
      - { text: "Getting started", link: "/getting-started" }
      - { text: "Templates", link: "/templates" }
      - { text: "Source code", link: "https://github.com/xiam/luminos" }

    # Top-right navigation helper.
    menu_pull:
      - { text: "Home", link: "/" }

Directory: content/

A required directory that contains the documents you want to serve.

Add the .md extension to markdown files to be parsed and displayed as HTML. Files with the .html extension will be served as HTML.

When Luminos receives an URL, it looks for the most appropriate file in the content directory. For example, if the user request an URL like http://example.org/path/to/resource, Luminos will try to to serve these files:

content/path/to/resource.md
content/path/to/resource.html
content/path/to/resource

If a directory is found instead of a file, Luminos will look for an index.md or index.html file inside that directory.

markdown/path/to/resource/index.md
markdown/path/to/resource/index.html

The first file to be found is the one that gets served.

Directory: templates/

A required directory that contains templates that can be parsed with the html/template package. Tipically just an index.tpl file.

The index.tpl file determines how the whole page will be seen according to some template variables.

Directory: webroot/

A required directory that contains files that must be served without being parsed. If you’re using CSS, Javascript, or images you should drop them here.

Luminos checks here first, even before looking into the content/ directory.

Site examples

If you would like to see full site examples you can browse the source code of this site at the github project page.

The gosexy.org site uses Luminos too and the source code is freely available in github.

Markdown editors