# Intro to LunaGen
---
pagetitle: "Welcome to LunaGen!"

intro:
    about_lunagen: >
    
        LunaGen is a simple static website generator, created for the
        "Lunatics!" project, with a focus on generating pages that are
        driven from structured data. It is not as sophisticated as a
        blogging site, but is optimized for a site based around accessing
        lists of episodic content, and makes this task very simple.
        
datablocks:
    - title: Data is YAML
      body: >
      
        The primary source that you will be editing for your website is
        expressed as structured data in YAML files. In the simplest case,
        like this page, the data is simply provided directly to the template
        used to render the page. In this simple case, almost all the magic
        is actually being provided by the template language.
        
    - title: Templates are Jinja2
      body: > 
      
        The templates used to represent data are written in Jinja2. This is
        used for built-in templates included with the software, in pluggable
        site themes, and in your own custom site design. It's largely up to
        you what you want to keep with your site source as "custom layout"
        and what you want to migrate into a custom theme for your site. These
        will be stored in a directory, "templates" under your site source
        directory.
        
    - title: Use CSS Stylesheets for Theme Styling
      body: >
      
        Much of the style of the site is simply CSS. You can provide your
        own stylesheets, or just use the ones in your theme. LunaGen will
        use a built-in template to attach a stylesheet reference in the
        page header. You can indicate this by using the "stylesheets" tag at
        the top of your YAML data file. If there is no such tag, then only
        the site default CSS will be available. Any name you give will simply
        refer to the CSS file with the name, plus ".css" Of course, if you
        need a CSS file that isn't in the templates or built-ins, you'll need
        to provide it in your site skeleton.
        
    - title: Unchanging Elements are Just HTML
      body: >
      
        Your site source should have a directory called "skeleton" which will
        contain all the unchanging (or manually-changed) elements of your site,
        such as images, stylesheets, and HTML that you don't intend to regenerate.
        
    - title: Looped Data is Integral
      body: >
      
        Since the application is centered on content listings, the ability
        of YAML to represent list-structured data is extremely useful. LunaGen
        itself does very little to achieve this -- it's basically just exploiting
        the nature capabilities of YAML and Jinja2 templates. This page is 
        a good example of this simple formatting, and can be used for general
        pages on your site. I use it for character lists, link lists, and simple
        explanatory pages. You can get a lot of mileage out of this without having
        to rely on built-in templates or code.
        
    - title: More Sophisticated Formatting is Generated Using Python
      body:
        
        For this simple example, I have avoided using any of the features that
        require significant program action. All the program does is run the template
        on the YAML data and generate the static HTML output. 
        
        