Skip to content

Rails-Designer/perron-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perron library

This repository serves to help build snippets, components and templates for the Perron library.

Development

Start the server:

bin/dev

Start a new resource

  1. Create the resource structure:
    bin/new templates/blog
  2. Develop the template in the dummy app
  3. Update the development/template.rb
  4. Generate the template files:
    bin/prepare-resource templates/blog
  5. Clean the dummy app:
    bin/clean
  6. Test the generated template:
    bin/apply templates/blog

Edit/update an existing resource

  1. Apply the existing template to dummy app:
    bin/apply templates/blog
  2. Make changes in the dummy app
  3. Update the template files:
    bin/prepare-resource templates/blog
  4. Clean the dummy app:
    bin/clean
  5. Test the updated template:
    bin/apply templates/blog

Structure

  • components/: reusable UI components
  • snippets/: snippets to inject functionality into your site
  • templates/: complete site templates
  • test/dummy/: development Rails app with Perron installed

Each resource contains:

  • development/template.rb: template with {{files}} placeholder (this will be used by bin/prepare-resource)
  • files.txt: list of files to include (one per line; auto-generated by bin/prepare-resource)
  • template.md: frontmatter with title, description; optional: about, category; body (after frontmatter)
  • images/: optional, screenshots of the resource
  • template.rb: generated final template (generated by bin/prepare-resource; should not be manually updated)

About

Library for Perron, the Rails-based static site generator

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages