Simplify README commands by removing env prefixes

This commit is contained in:
Sami Samhuri 2026-02-07 20:54:27 -08:00
parent 93fe959ce1
commit bb3d698e27
No known key found for this signature in database

View file

@ -6,7 +6,9 @@ Source code for [samhuri.net](https://samhuri.net), powered by a Ruby static sit
This repository contains the Ruby static-site generator and site content for samhuri.net. This repository contains the Ruby static-site generator and site content for samhuri.net.
- Generator core: `lib/` If what you want is an artisanal, hand-crafted, static site generator for your personal blog then this might be a decent starting point. If you want a static site generator for other purposes then this has the bones you need to do that too, by ripping out the bundled plugins for posts and projects and writing your own.
- Generator core: `lib/pressa/` (entrypoint: `lib/pressa.rb`)
- Build tasks and utility workflows: `bake.rb` - Build tasks and utility workflows: `bake.rb`
- Tests: `spec/` - Tests: `spec/`
- Config: `site.toml` and `projects.toml` - Config: `site.toml` and `projects.toml`
@ -29,14 +31,14 @@ Or manually:
```bash ```bash
rbenv install -s "$(cat .ruby-version)" rbenv install -s "$(cat .ruby-version)"
rbenv exec bundle install bundle install
``` ```
## Build And Serve ## Build And Serve
```bash ```bash
rbenv exec bundle exec bake debug # build for http://localhost:8000 bake debug # build for http://localhost:8000
rbenv exec bundle exec bake serve # serve www/ locally bake serve # serve www/ locally
``` ```
## Configuration ## Configuration
@ -56,27 +58,27 @@ If this workflow seems like a good fit, here is the minimum to make it your own:
- Set `plugins` in `site.toml` to explicitly enable features (`"posts"`, `"projects"`). Safe default if omitted is no plugins. - Set `plugins` in `site.toml` to explicitly enable features (`"posts"`, `"projects"`). Safe default if omitted is no plugins.
- Define your projects in `projects.toml` using `[[projects]]` entries with `name`, `title`, `description`, and `url`. - Define your projects in `projects.toml` using `[[projects]]` entries with `name`, `title`, `description`, and `url`.
- Configure project-page-only assets in `site.toml` under `[projects_plugin]` (`scripts` and `styles`) when using the `"projects"` plugin. - Configure project-page-only assets in `site.toml` under `[projects_plugin]` (`scripts` and `styles`) when using the `"projects"` plugin.
- Add custom plugins by implementing `Pressa::Plugin` in `lib/` and registering them in `lib/config/loader.rb`. - Add custom plugins by implementing `Pressa::Plugin` in `lib/pressa/` and registering them in `lib/pressa/config/loader.rb`.
- Adjust rendering and layout in `lib/views/` and the static content in `public/` as needed. - Adjust rendering and layout in `lib/pressa/views/` and the static content in `public/` as needed.
Other targets: Other targets:
```bash ```bash
rbenv exec bundle exec bake mudge bake mudge
rbenv exec bundle exec bake beta bake beta
rbenv exec bundle exec bake release bake release
rbenv exec bundle exec bake watch target=debug bake watch target=debug
rbenv exec bundle exec bake clean bake clean
rbenv exec bundle exec bake publish_beta bake publish_beta
rbenv exec bundle exec bake publish bake publish
``` ```
## Draft Workflow ## Draft Workflow
```bash ```bash
rbenv exec bundle exec bake new_draft "Post title" bake new_draft "Post title"
rbenv exec bundle exec bake drafts bake drafts
rbenv exec bundle exec bake publish_draft public/drafts/post-title.md bake publish_draft public/drafts/post-title.md
``` ```
Published posts in `posts/YYYY/MM/*.md` require YAML front matter keys: Published posts in `posts/YYYY/MM/*.md` require YAML front matter keys:
@ -89,16 +91,16 @@ Published posts in `posts/YYYY/MM/*.md` require YAML front matter keys:
## Tests And Lint ## Tests And Lint
```bash ```bash
rbenv exec bundle exec bake test bake test
rbenv exec bundle exec standardrb standardrb
``` ```
Or via bake: Or via bake:
```bash ```bash
rbenv exec bundle exec bake test bake test
rbenv exec bundle exec bake lint bake lint
rbenv exec bundle exec bake lint_fix bake lint_fix
``` ```
## Notes ## Notes