tale/generators
Values
pub fn new_post_gen(raw_input: String) -> Result(String, String)
Creates a new post under content/posts/ using the archetype template and current timestamp.
pub fn new_site_gen(raw_name: String) -> Result(String, String)
Creates a new site rooted at the provided path. The generated site copies Tale’s default content and theme, and updates the config title. New site contains:
- archetypes: Contains the default markdown file
- assets: Empty but user can add files here if they dont want to use or create a theme
- content: Contains index.md, pages markdown files and posts directory who contains posts. Can be modified in config.toml
- layouts: Empty but again user can add templates here.
- static: Empty, user can add static files here.
config.tomlfile
pub fn new_theme_gen(raw_name: String) -> Result(String, String)
Creates a new theme <name> based on Tale’s default theme.
Theme directory contains:
- assets: Contains css, js and images
- layouts: Contains layout templates
- static: Contains all static files that will be copied in the site/blog like robots.txt, favicon etc.