{"id":37186559,"url":"https://github.com/altlimit/sitegen","last_synced_at":"2026-03-01T21:04:25.725Z","repository":{"id":39594887,"uuid":"250656999","full_name":"altlimit/sitegen","owner":"altlimit","description":"Sitegen is a simple but flexible static site generator.","archived":false,"fork":false,"pushed_at":"2026-02-25T19:46:12.000Z","size":145,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-25T22:05:09.814Z","etag":null,"topics":["blog-engine","cms","content-management-system","documentation-tool","go","static-site-generator"],"latest_commit_sha":null,"homepage":"https://altlimit.github.io/sitegen/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/altlimit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-27T21:57:21.000Z","updated_at":"2026-02-25T19:46:15.000Z","dependencies_parsed_at":"2024-01-23T19:27:25.226Z","dependency_job_id":"6a510560-d9d1-484b-a4f3-72dfe2340581","html_url":"https://github.com/altlimit/sitegen","commit_stats":null,"previous_names":["faisalraja/sitegen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/altlimit/sitegen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altlimit%2Fsitegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altlimit%2Fsitegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altlimit%2Fsitegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altlimit%2Fsitegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/altlimit","download_url":"https://codeload.github.com/altlimit/sitegen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altlimit%2Fsitegen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog-engine","cms","content-management-system","documentation-tool","go","static-site-generator"],"created_at":"2026-01-14T21:38:16.550Z","updated_at":"2026-03-01T21:04:25.720Z","avatar_url":"https://github.com/altlimit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SiteGen\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/altlimit/sitegen)](https://goreportcard.com/report/github.com/altlimit/sitegen)\n[![Latest Release](https://img.shields.io/github/v/release/altlimit/sitegen)](https://github.com/altlimit/sitegen/releases)\n[![License](https://img.shields.io/github/license/altlimit/sitegen)](LICENSE)\n\nSitegen is a simple, flexible, and fast static site generator written in Go. It supports incremental builds, live reloading, and a powerful template system.\n\n## Features\n\n- 🚀 **Fast \u0026 Incremental**: Builds only what's needed.\n- 🔄 **Live Reload**: Built-in development server with changes detection.\n- 🎨 **Templating**: Flexible Go templates with custom functions.\n- 📝 **Markdown**: Write pages in `.md` with automatic HTML conversion.\n- 📦 **Zero Dependency**: Single binary, easy to install.\n- 🔧 **File Handlers**: Custom build commands for specific file types (e.g. CSS, JS).\n\n## Installation\n\n### Unix/Linux/macOS\n\n```bash\ncurl -s -S -L https://raw.githubusercontent.com/altlimit/sitegen/master/install.sh | bash\n```\n\n### Windows\n\nDownload the latest release from the [Releases Page](https://github.com/altlimit/sitegen/releases).\n\n## Quick Start\n\n1. **Create a new project:**\n   ```bash\n   mkdir my-website\n   cd my-website\n   sitegen -create\n   ```\n\n2. **Start development server:**\n   ```bash\n   sitegen -serve\n   ```\n   Open [http://localhost:8888](http://localhost:8888) in your browser.\n\n3. **Build for production:**\n   ```bash\n   sitegen -clean -minify\n   ```\n\n## Usage\n\n```bash\nsitegen [options]\n\nOptions:\n  -create       Create a new site template\n  -site \u003cpath\u003e  Root site path (default: \"./site\")\n  -serve        Start development server\n  -port \u003cport\u003e  Port for development server (default: \"8888\")\n  -clean        Clean public dir before build\n  -minify       Minify HTML/JS/CSS output\n  -public \u003cdir\u003e Public output directory (default: \"./public\")\n  -base \u003cpath\u003e  Base URL path (default: \"/\")\n  -help         Show help\n```\n\n## Template System\n\nSitegen uses Go's `html/template` with extra helper functions.\n\n### Functions\n\n| Function | Description |\n|----------|-------------|\n| `path` | Prefixes path with base URL. |\n| `sources \"prop\" \"pattern\"` | Returns list of sources matching pattern. |\n| `data \"file.json\"` | Loads JSON data from `data/` directory. |\n| `sort \"prop\" \"order\"` | Sorts input array/slice. |\n| `limit n` | Limits the array/slice to `n` items. |\n| `offset n` | Offsets the array/slice by `n` items. |\n| `paginate n` | Paginates input. Populates `.Page` and `.Pages`. |\n| `page \"path\"` | Creates a parameterized page from current source. |\n\n### Page Variables\n\n- `.\u003ckey\u003e`: Any variable defined in YAML frontmatter is accessible directly at the root (e.g., `.title`). When iterating over sources (e.g. `range sources`), use `.Meta.\u003ckey\u003e` on the source item instead.\n- `.Dev`: Boolean, true if running in development mode.\n- `.Source`: Current source object (`.Source.Meta` has the raw frontmatter map).\n- `.BasePath`: Configured base path.\n- `.Today`: Current date (YYYY-MM-DD).\n- `.Year`: Current year (YYYY).\n- `.Path`: Current page path (if parameterized).\n- `.Page`, `.Pages`: Pagination info.\n- `.BuildID`: Unix timestamp string, regenerated on every build (useful for cache busting).\n\n### Basic Example\n\n**`src/about.html`**:\n```html\n---\ntitle: About Us\ntemplate: main.html\n---\n\n{{define \"content\"}}\n  \u003ch1\u003e{{ .title }}\u003c/h1\u003e\n  \u003cp\u003eWelcome to our site!\u003c/p\u003e\n{{end}}\n```\n\n## File Handlers\n\nCustomize how files are processed by adding a frontmatter block to any file (css, js, etc).\n\n```css\n/*\n---\nserve: npm run build:css\nbuild: npm run build:prod:css\n---\n*/\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](LICENSE.txt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltlimit%2Fsitegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltlimit%2Fsitegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltlimit%2Fsitegen/lists"}