wytch 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0437b28a3f15b9b8c8b038d704007549d041d037a06423bdc5e7e707d2f0406a
4
- data.tar.gz: d3c6f678b5146c515096c32a0ef61bef367b6af875df257455699db790019223
3
+ metadata.gz: 3adc6455846cef32252a24576fd40aafe237d26a688e131ee73a9c222827d0c6
4
+ data.tar.gz: 1409ff6165c88b35941cef1679c7fcd8f77d7e07950d7ec9601a504c89309a91
5
5
  SHA512:
6
- metadata.gz: 1c9b98d2db33c4b4b1ae078ce992d1d8ff7965b5ace303cfa8f49148c52cd0f4564c1d36b2ddad6a46e548e27914bc70b8488aaf5ad51a009a084a037c710a1a
7
- data.tar.gz: cbfefe11f6b4b6a74534cb150b136f90d370f71a11e8be5ca3f21e926292272233c1a723d96b11fc1b374239257205c3d71c0c3bcae8cb8bda2f5659585add88
6
+ metadata.gz: bfe7e1897b05b7017624a03b8659919383dde9f0aabc86f4e8afe86ea4835a092bc0c719be29a0f1b641de133702229aa9a07fa1b766f99bda2e091b5f20d699
7
+ data.tar.gz: 3c04f324a254bf565d47ac2039141ee596c3dc1f98f39c3c7001fa51bdbf90f968520a3e9ed9ee4a2274301ffcc9a07d732e44c1593f0eccf2af36aee082890c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.0] - 2025-12-7
4
+
5
+ - Documentation cleanup
6
+
3
7
  ## [0.4.0] - 2025-12-7
4
8
 
5
9
  - Move sitemap generation to Wytch core (`Wytch::SitemapView` and `Wytch::SitemapHelper`)
data/lib/wytch/builder.rb CHANGED
@@ -3,28 +3,15 @@
3
3
  require "fileutils"
4
4
 
5
5
  module Wytch
6
- # Builds the static site by rendering all pages to the output directory.
7
- #
8
- # The Builder is responsible for the production build process:
9
- # 1. Loading site configuration and content
10
- # 2. Rendering each page to HTML
11
- # 3. Copying static files from public/
12
- # 4. Integrating Vite-built assets
6
+ # Builds the static site.
13
7
  #
14
8
  # @example Building via CLI
15
9
  # $ wytch build
16
- #
17
- # @example Building programmatically
18
- # Wytch::Builder.new.build
19
10
  class Builder
20
- # @return [String] the output directory for built files
21
11
  OUTPUT_DIR = "build"
22
12
 
23
13
  # Builds the entire site.
24
14
  #
25
- # Sets RACK_ENV to "production", loads the site configuration,
26
- # renders all pages to HTML files, and copies static assets.
27
- #
28
15
  # @return [void]
29
16
  def build
30
17
  ENV["RACK_ENV"] = "production"
@@ -51,19 +38,12 @@ module Wytch
51
38
 
52
39
  private
53
40
 
54
- # Copies files from public/ to the output directory.
55
- #
56
- # @return [void]
57
41
  def copy_public_files
58
42
  return unless Dir.exist?("public")
59
43
 
60
44
  FileUtils.cp_r "public/.", OUTPUT_DIR, verbose: true
61
45
  end
62
46
 
63
- # Reports on Vite assets in the output directory.
64
- # Vite builds directly to build/assets, so no copying is needed.
65
- #
66
- # @return [void]
67
47
  def copy_vite_assets
68
48
  vite_output = File.join(OUTPUT_DIR, "assets")
69
49
  return unless Dir.exist?(vite_output)
data/lib/wytch/cli.rb CHANGED
@@ -114,10 +114,6 @@ module Wytch
114
114
 
115
115
  private
116
116
 
117
- # Converts a snake_case name to PascalCase.
118
- #
119
- # @param name [String] the name to classify
120
- # @return [String] the PascalCase version
121
117
  def classify(name)
122
118
  name.split("_").map(&:capitalize).join
123
119
  end
@@ -29,24 +29,14 @@ module Wytch
29
29
 
30
30
  private
31
31
 
32
- # Creates a Page instance from a content file.
33
- #
34
- # @param file_path [String] path to the content file, relative to content_dir
35
- # @return [Page] the loaded page
36
32
  def load_page(file_path)
37
33
  page_class.new(file_path:)
38
34
  end
39
35
 
40
- # Returns the configured page class.
41
- #
42
- # @return [Class] the page class to instantiate
43
36
  def page_class
44
37
  Object.const_get(Wytch.site.page_class)
45
38
  end
46
39
 
47
- # Returns the content directory path.
48
- #
49
- # @return [String] the content directory
50
40
  def content_dir
51
41
  Wytch.site.content_dir
52
42
  end
data/lib/wytch/server.rb CHANGED
@@ -55,9 +55,6 @@ module Wytch
55
55
 
56
56
  private
57
57
 
58
- # Builds the Rack application stack.
59
- #
60
- # @return [Rack::Builder] the configured Rack app
61
58
  def app
62
59
  base_app = lambda { |env|
63
60
  path = env["PATH_INFO"]
data/lib/wytch/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Wytch
4
4
  # The current version of Wytch.
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ view WytchSite::ApiClassView
4
+
5
+ @metadata[:title] = "Wytch::SitemapView"
6
+ @metadata[:yard_path] = "Wytch::SitemapView"