bridgetown-stoa 0.1.0 → 0.2.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: 4a78f506b84ad2518d27d4f7cb6cfc133fcd3dae4dadd2622d3f3698ede1dbc3
4
- data.tar.gz: d567d1a4059a6da89a02d9124a47230557042332983e2a13cdaeb7cbb1e4fb83
3
+ metadata.gz: 0511ef53344c59a9838fed10c80f00359b0a789d415b621e7607478040ffe7cb
4
+ data.tar.gz: 21f47c907b9100fa4f8d869bc72f703fc184dd21e317b3940aa405017df4605e
5
5
  SHA512:
6
- metadata.gz: 3039e265e94aa9571ee8d8846cb988f2dc73bc75f2f8391e393db22684faea404747728e76c3434acff558faa576ea40d39769180f0e59e6395b419717b41795
7
- data.tar.gz: c331e8d344ac1f991822edebd681a86e64e07cf7ee745bb343f447314bd397e5e5944d131a296ef9f5e7dba180485f30d23037b09e42cba51d410639bd02fe44
6
+ metadata.gz: 2c2bccceca7a78df90d4fffd4846db7201fb28d1ab661582f71c352a83e9864535e93090d86fa79921cf0e093473306ae0f08e7f7f93c242a194a5416e664f8a
7
+ data.tar.gz: 83755738874401da2cf61b08d56f9943517942d84376c328018eaf47c338a6118a3e751c356971e8f6a46994e53d2d88d4c0c9940d10a1f981c0856ceefd3fc2
data/CHANGELOG.md CHANGED
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  - ...
11
11
 
12
+ ## [0.2.0] - 2026-05-22
13
+
14
+ ### Added
15
+ - Tailwind v4 source partial at `frontend/styles/bridgetown-stoa.css`, shipped via a companion `bridgetown-stoa` npm package. Defines `--color-stoa-*` and `--font-stoa-*` design tokens (light + dark) in an `@theme` block, sets up class-strategy dark mode via `@custom-variant dark`, and applies a baseline `html` style. Host sites `@import "bridgetown-stoa"` and `@source` the layouts from their `frontend/styles/index.css`.
16
+ - `script/release` now also runs `npm publish` after the gem release, and pre-flights `npm whoami` so it bails before the gem push if credentials are missing.
17
+
18
+ ### Fixed
19
+ - `bridgetown-stoa/layout` no longer prepends `"Index | "` to `<title>` on the home page when `src/index.md` has no explicit `title:` front-matter. (#8)
20
+
12
21
  ## [0.1.0] - 2026-05-22
13
22
 
14
23
  ### Changed
data/README.md CHANGED
@@ -22,6 +22,29 @@ Then `bundle install` and add to `config/initializers.rb`:
22
22
  init :"bridgetown-stoa"
23
23
  ```
24
24
 
25
+ ### Styles (Tailwind v4)
26
+
27
+ Stoa ships its styles as a Tailwind v4 source partial in a companion npm package (`bridgetown-stoa`), so they compose with your site's Tailwind pipeline (tree-shaken, token-overrideable).
28
+
29
+ ```shell
30
+ npm install bridgetown-stoa
31
+ ```
32
+
33
+ Then in `frontend/styles/index.css`, after `@import "tailwindcss";`, add two lines:
34
+
35
+ ```css
36
+ @import "tailwindcss";
37
+ @source "../../node_modules/bridgetown-stoa/layouts/**/*.serb";
38
+ @import "bridgetown-stoa";
39
+ ```
40
+
41
+ - `@source` tells Tailwind to scan Stoa's layouts for utility-class usage.
42
+ - `@import "bridgetown-stoa"` pulls in the `@theme` tokens (`--color-stoa-*`, `--font-stoa-*`) and a small `@layer base` that styles `html` with the theme colors.
43
+
44
+ Override any token by redeclaring it in your own `@theme` block after the import.
45
+
46
+ Stoa uses Tailwind's **class-strategy dark mode** (`html.dark`). Toggle the `dark` class on `<html>` to switch themes; a default JS toggle that follows `prefers-color-scheme` will ship in a later release.
47
+
25
48
  ## Usage
26
49
 
27
50
  One layout is registered: `bridgetown-stoa/layout`. Apply it via front matter:
@@ -14,10 +14,11 @@ Gem::Specification.new do |spec|
14
14
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features)/!) }
15
15
  spec.test_files = spec.files.grep(%r!^test/!)
16
16
  spec.require_paths = ["lib"]
17
- # Uncomment this if you wish to supply a companion NPM package and/or command features:
17
+ # TODO: enable the `npm_add` metadata below once the npm companion is
18
+ # published. While the package is unpublished, Bridgetown's init-time
19
+ # registry lookup 404s loudly during every test run.
18
20
  # spec.metadata = {
19
21
  # "npm_add" => "bridgetown-stoa@#{BridgetownStoa::VERSION}",
20
- # "bridgetown_features" => "true"
21
22
  # }
22
23
 
23
24
  spec.required_ruby_version = ">= 3.2"
@@ -0,0 +1,34 @@
1
+ /* bridgetown-stoa: Tailwind v4 source partial. Import after `@import "tailwindcss"`. */
2
+
3
+ @custom-variant dark (&:where(.dark, .dark *));
4
+
5
+ @theme {
6
+ --color-stoa-bg: oklch(98% 0.002 264);
7
+ --color-stoa-surface: oklch(100% 0 0);
8
+ --color-stoa-fg: oklch(20% 0.012 264);
9
+ --color-stoa-muted: oklch(50% 0.012 264);
10
+ --color-stoa-border: oklch(92% 0.005 264);
11
+ --color-stoa-accent: oklch(55% 0.18 264);
12
+ --color-stoa-accent-fg: oklch(98% 0.002 264);
13
+
14
+ --font-stoa-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
15
+ --font-stoa-mono: ui-monospace, "SF Mono", Menlo, "Cascadia Code", monospace;
16
+ }
17
+
18
+ @layer base {
19
+ .dark {
20
+ --color-stoa-bg: oklch(17% 0.012 264);
21
+ --color-stoa-surface: oklch(22% 0.012 264);
22
+ --color-stoa-fg: oklch(94% 0.005 264);
23
+ --color-stoa-muted: oklch(65% 0.012 264);
24
+ --color-stoa-border: oklch(28% 0.012 264);
25
+ --color-stoa-accent: oklch(72% 0.16 264);
26
+ --color-stoa-accent-fg: oklch(15% 0.012 264);
27
+ }
28
+
29
+ html {
30
+ background: var(--color-stoa-bg);
31
+ color: var(--color-stoa-fg);
32
+ font-family: var(--font-stoa-sans);
33
+ }
34
+ }
@@ -4,7 +4,10 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>
7
- {% if resource.data.title %}{{ resource.data.title }} | {% end %}{{ site.metadata.title }}
7
+ {% if resource.data.title != "Index" %}
8
+ {{ resource.data.title }} |
9
+ {% end %}
10
+ {{ site.metadata.title }}
8
11
  </title>
9
12
  {% if resource.data.description %}
10
13
  <meta name="description" content="{{ resource.data.description }}">
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownStoa
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "bridgetown-stoa",
3
+ "version": "0.2.0",
4
+ "description": "Tailwind v4 source partial and layouts for the Stoa Bridgetown documentation theme.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Guided-Rails/bridgetown-stoa.git"
9
+ },
10
+ "homepage": "https://github.com/Guided-Rails/bridgetown-stoa",
11
+ "main": "frontend/styles/bridgetown-stoa.css",
12
+ "style": "frontend/styles/bridgetown-stoa.css",
13
+ "exports": {
14
+ ".": "./frontend/styles/bridgetown-stoa.css",
15
+ "./layouts/*": "./layouts/*"
16
+ },
17
+ "files": [
18
+ "frontend/styles/",
19
+ "layouts/",
20
+ "README.md",
21
+ "LICENSE.txt"
22
+ ],
23
+ "peerDependencies": {
24
+ "tailwindcss": "^4.0.0"
25
+ }
26
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-stoa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Hashim
@@ -80,9 +80,11 @@ files:
80
80
  - README.md
81
81
  - Rakefile
82
82
  - bridgetown-stoa.gemspec
83
+ - frontend/styles/bridgetown-stoa.css
83
84
  - layouts/bridgetown-stoa/layout.serb
84
85
  - lib/bridgetown-stoa.rb
85
86
  - lib/bridgetown-stoa/version.rb
87
+ - package.json
86
88
  homepage: https://github.com/Guided-Rails/bridgetown-stoa
87
89
  licenses:
88
90
  - MIT