@conduction/docusaurus-preset 0.1.1 → 1.0.1

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.
package/README.md CHANGED
@@ -139,9 +139,18 @@ This is how product sites such as `mydash.conduction.nl/docs/...` adopt the bran
139
139
 
140
140
  ## Releasing
141
141
 
142
- Releases auto-publish on push to `main`. The [.github/workflows/publish-packages.yml](../.github/workflows/publish-packages.yml) workflow compares the version in this `package.json` against what's on `registry.npmjs.org`. Bump the version, push, the workflow publishes. No bump means no publish — the workflow exits cleanly. Tag pushes (`v*`) and manual `workflow_dispatch` runs (with an optional dry-run flag) are accepted for explicit republishes and emergency holds.
142
+ Releases auto-publish on push to `main`, driven by [semantic-release](https://semantic-release.gitbook.io/) reading [conventional-commit](https://www.conventionalcommits.org/) messages. The [.github/workflows/publish-packages.yml](../.github/workflows/publish-packages.yml) workflow walks every commit since the last `@conduction/docusaurus-preset-v*` tag and decides what to ship:
143
143
 
144
- The diagram primitives ship inside the same tarball under `src/diagrams/`, so there is exactly one npm release per push.
144
+ | Commit prefix | Release |
145
+ | --- | --- |
146
+ | `feat:` | minor bump |
147
+ | `fix:` | patch bump |
148
+ | `feat!:` or `BREAKING CHANGE:` footer | major bump |
149
+ | anything else (`chore:`, `docs:`, `refactor:`, …) | no release |
150
+
151
+ Path filtering via [semantic-release-monorepo](https://github.com/pmowrer/semantic-release-monorepo) restricts the commit scan to commits that touched files inside `docusaurus-preset/`. Edits to `preview/`, `sites/`, `brand/`, etc. never trigger a release. The diagram primitives ship inside the same tarball under `src/diagrams/`, so there is exactly one npm release per qualifying push.
152
+
153
+ A manual `workflow_dispatch` is also accepted, with an optional `dry_run` flag that runs `semantic-release --dry-run` (no publish, no tag, no release) — useful for sanity-checking the next-version decision before merging a feature branch.
145
154
 
146
155
  **One-time setup**: configure the npm Trusted Publisher (OIDC) link.
147
156
 
@@ -159,16 +168,17 @@ That's it. There is no token to generate, no secret to install, no expiry to tra
159
168
  **Per release:**
160
169
 
161
170
  ```bash
162
- # Bump the preset version. The diagrams source ships inside the preset,
163
- # so there is one version to bump.
164
- $EDITOR docusaurus-preset/package.json # "version": "0.2.0"
171
+ # Make a change inside docusaurus-preset/ and commit with a conventional prefix.
172
+ $EDITOR docusaurus-preset/src/components/Hero.jsx
165
173
 
166
- git add docusaurus-preset/package.json
167
- git commit -m "Bump @conduction/docusaurus-preset to 0.2.0"
168
- git push origin main # the workflow detects the bump and publishes
174
+ git add docusaurus-preset/src/components/Hero.jsx
175
+ git commit -m "feat: add tagline slot to Hero"
176
+ git push origin main # semantic-release decides + publishes
169
177
  ```
170
178
 
171
- The workflow runs `npm publish --workspace @conduction/docusaurus-preset --access public`. Watch the run on the Actions tab. If it fails, fix the issue, bump the patch (`0.2.1`), push again npm rejects re-publishing the same version, so a single failed run can't block a corrected re-bump.
179
+ `package.json#version` on `main` stays stale on purpose — semantic-release uses the `@conduction/docusaurus-preset-v*` tag stream as its source of truth and bumps `package.json` in-place during the publish run without committing it back. The version on npm and the GitHub Releases page are authoritative; the field in `main`'s `package.json` only matters during a publish.
180
+
181
+ If a publish fails mid-run, fix the issue and push another commit — `semantic-release` will retry the bump on the next run. npm rejects re-publishing the same version, so the next attempt picks the following patch.
172
182
 
173
183
  ## License
174
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/docusaurus-preset",
3
- "version": "0.1.1",
3
+ "version": "1.0.1",
4
4
  "description": "Conduction brand preset for Docusaurus 3. Tokens, theme, navbar, footer, i18n config for nl/en/de/fr, and the React component library that powers conduction.nl and the Conduction product sites.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -103,6 +103,18 @@ export default function ContentDetailHero({
103
103
  )}
104
104
 
105
105
  {title && <h1 className={styles.title}>{title}</h1>}
106
+
107
+ <div className={styles.cover}>
108
+ <span className={styles.watermark} aria-hidden="true" />
109
+ {cover && cover.src
110
+ ? <img src={cover.src} alt={cover.alt || ''} className={styles.coverImg} />
111
+ : (
112
+ <HexThumbnail size="xl" tone={cover && cover.tone || 'cobalt'}>
113
+ {cover && cover.icon}
114
+ </HexThumbnail>
115
+ )}
116
+ </div>
117
+
106
118
  {summary && <p className={styles.summary}>{summary}</p>}
107
119
 
108
120
  {(author || date || duration) && (
@@ -120,17 +132,6 @@ export default function ContentDetailHero({
120
132
  {duration && <span className={styles.duration}>{duration}</span>}
121
133
  </div>
122
134
  )}
123
-
124
- <div className={styles.cover}>
125
- <span className={styles.watermark} aria-hidden="true" />
126
- {cover && cover.src
127
- ? <img src={cover.src} alt={cover.alt || ''} className={styles.coverImg} />
128
- : (
129
- <HexThumbnail size="xl" tone={cover && cover.tone || 'cobalt'}>
130
- {cover && cover.icon}
131
- </HexThumbnail>
132
- )}
133
- </div>
134
135
  </section>
135
136
  );
136
137
  }
@@ -40,7 +40,6 @@
40
40
  color: var(--c-cobalt-900);
41
41
  margin: 0;
42
42
  line-height: 1.1;
43
- max-width: 24ch;
44
43
  }
45
44
  @media (max-width: 700px) { .title { font-size: 32px; } }
46
45