@conduction/docusaurus-preset 1.0.0 → 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
|
|
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
|
-
|
|
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
|
-
#
|
|
163
|
-
|
|
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/
|
|
167
|
-
git commit -m "
|
|
168
|
-
git push origin main #
|
|
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
|
-
|
|
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": "1.0.
|
|
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
|
}
|