samhuri.net/lib/pressa.rb
Sami Samhuri fc68fc58af Extract bake logic into lib/pressa and fold tasks back into one bake.rb
Pull the pure, testable logic out of the bake tasks into Pressa modules:

- Pressa::Drafts — slugs, ordinal dates, draft paths, and the new-draft template
- Pressa::Coverage — the coverage measurement script, output parsing, and baseline-ref resolution
- Pressa::Publish — the rsync command builder

Each gets its own tests, so this logic now sits under the lib/ coverage gate
instead of being untested glue inside the task files.

With the logic extracted, the namespaced bake/ split no longer earns its keep —
those files were mostly thin task declarations. Collapse build/draft/publish/quality
back into a single bake.rb with the original flat task names (new_draft, coverage,
publish_beta, and so on) and update CI and AGENTS.md to match.
2026-06-07 17:57:01 -07:00

18 lines
543 B
Ruby

require "pressa/site"
require "pressa/site_generator"
require "pressa/plugin"
require "pressa/posts/plugin"
require "pressa/projects/plugin"
require "pressa/utils/markdown_renderer"
require "pressa/utils/gemini_markdown_renderer"
require "pressa/config/loader"
require "pressa/drafts"
require "pressa/coverage"
require "pressa/publish"
module Pressa
def self.create_site(source_path: ".", url_override: nil, output_format: "html")
loader = Config::Loader.new(source_path:)
loader.build_site(url_override:, output_format:)
end
end