mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
No description
| .zed | ||
| bin | ||
| images | ||
| lib | ||
| posts | ||
| public | ||
| spec | ||
| wayback | ||
| .gitignore | ||
| .ruby-version | ||
| bake.rb | ||
| Gemfile | ||
| Gemfile.lock | ||
| projects.toml | ||
| Readme.md | ||
| site.toml | ||
samhuri.net
Source code for samhuri.net, powered by a Ruby static site generator.
Overview
This repository is now a single integrated Ruby project. The legacy Swift generators (gensite/ and samhuri.net/) have been removed.
- Generator core:
lib/ - Build tasks and utility workflows:
bake.rb - Tests:
spec/ - Config:
site.tomlandprojects.toml - Content:
posts/andpublic/ - Output:
www/
Requirements
- Ruby (see
.ruby-version) - Bundler
rbenvrecommended
Setup
bin/bootstrap
Or manually:
rbenv install -s "$(cat .ruby-version)"
rbenv exec bundle install
Build And Serve
rbenv exec bundle exec bake debug # build for http://localhost:8000
rbenv exec bundle exec bake serve # serve www/ locally
Configuration
Site metadata and project data are configured with TOML files at the repository root:
site.toml: site identity, default scripts/styles, andprojects_pluginassets.projects.toml: project listing entries using[[projects]].
Pressa.create_site loads both files from the provided source_path and still supports URL overrides for debug, beta, and release builds.
Other targets:
rbenv exec bundle exec bake mudge
rbenv exec bundle exec bake beta
rbenv exec bundle exec bake release
rbenv exec bundle exec bake generate . www https://samhuri.net
rbenv exec bundle exec bake watch target=debug
rbenv exec bundle exec bake deploy --test true --delete true
rbenv exec bundle exec bake publish_beta
rbenv exec bundle exec bake publish
Draft Workflow
rbenv exec bundle exec bake new_draft "Post title"
rbenv exec bundle exec bake publish_draft public/drafts/post-title.md
Tests And Lint
rbenv exec bundle exec rspec
rbenv exec bundle exec standardrb
Or via bake:
rbenv exec bundle exec bake test
rbenv exec bundle exec bake lint
Site Generation
rbenv exec bundle exec bake generate SOURCE TARGET [URL]
# example:
rbenv exec bundle exec bake generate . www https://samhuri.net
Notes
bake watchis Linux-only and requiresinotifywait.- Deployment uses
rsyncto the configuredmudgehost paths inbake.rb.