leafy

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 6 Imported by: 0

README

Leafy

Leafy is a minimal static site generator written in Go. It allows you to quickly generate a basic HTML site from Markdown content and a template.


Requirements

  • Go 1.20+ installed on your system
  • Basic knowledge of Markdown and HTML + .tmpl

Install

go install github.com/LazyCode2/leafy@latest  

How It Works

  1. Initialize a project structure
    Run the following command to create the folder structure:

    leafy --init
    

it will create

  • ├── content
  • ├── output
  • └── template
  1. Add your content Put Markdown files inside the content folder (content/content.md) !Only one for now.

  2. Add a template Put a basic HTML template inside the template folder (e.g., template/default.tmpl) with a placeholder {{ .Data }} where the Markdown content will be inserted.

    Example :

     <!DOCTYPE html>
     <html>
     <head>
         <title>Leafy</title>
     </head>
     <body>
         {{ .Data }}
     </body>
     </html>
    
  3. Build the site Generate your HTML site with:

    leafy --build
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL