bloggie 0.4.0 → 0.4.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/AGENTS.md +1 -1
- package/README.md +5 -5
- package/package.json +1 -1
- package/scripts/create.js +1 -1
- package/scripts/update.js +1 -1
- package/template/README.md +1 -1
- package/template/package.json +1 -1
- package/template/src/pages/posts/how-this-blog-works/index.mdx +2 -3
- package/template/src/pages/posts/how-this-blog-works/slides.mdx +1 -2
package/AGENTS.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This folder is Bloggie: the layouts, components, slide kit and editor, styles, checks and e2e runner that a blog builds
|
|
4
4
|
with. In a blog it is the npm package `bloggie` (`node_modules/bloggie/`), or, in a blog made with `--git`, the
|
|
5
5
|
`bloggie/` folder, kept as a git subtree of https://github.com/bhoov/bloggie; the blog's own `AGENTS.md` covers posts
|
|
6
|
-
and figures. `template/` is the starter blog that `scripts/create.js` copies (`
|
|
6
|
+
and figures. `template/` is the starter blog that `scripts/create.js` copies (`npx bloggie`), and the demo site
|
|
7
7
|
(`.github/workflows/demo.yml`). `create/` is the npm package `create-bloggie`, which runs `scripts/create.js`.
|
|
8
8
|
|
|
9
9
|
- An engine file imports only engine files, the blog's site data (`src/site.js`, `src/references.json`,
|
package/README.md
CHANGED
|
@@ -28,14 +28,14 @@ Every post downloads as a single HTML file that works offline.
|
|
|
28
28
|
## Start
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
|
|
32
|
-
#
|
|
31
|
+
npx bloggie my-blog # start a new blog in my-blog/ and install its packages
|
|
32
|
+
# npx bloggie my-blog --title "My blog" --author "Ada Lovelace"
|
|
33
33
|
# OR add metadata later to `src/site.js`
|
|
34
34
|
cd my-blog && npm run dev # http://localhost:4321/
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
The new blog is your own git repository; Bloggie, the engine, is an npm package, and `npm run bloggie:update` installs its latest version.
|
|
38
|
-
To contribute to Bloggie's engine, you can instead have bloggie as a git subtree inside your blog using `
|
|
38
|
+
To contribute to Bloggie's engine, you can instead have bloggie as a git subtree inside your blog using `npx bloggie my-blog --git`, saved to your blog's `bloggie/` folder. See [Contributing](#contributing).
|
|
39
39
|
|
|
40
40
|
Use Node 22 or later.
|
|
41
41
|
See the example post, "How this blog works", for features.
|
|
@@ -133,7 +133,7 @@ Once, in the repository's Settings → Pages, set the source to GitHub Actions.
|
|
|
133
133
|
|
|
134
134
|
## Contributing
|
|
135
135
|
|
|
136
|
-
The easiest way to contribute is to start your blog with `
|
|
136
|
+
The easiest way to contribute is to start your blog with `npx bloggie my-blog --git`.
|
|
137
137
|
The blogging engine is then placed into your blog's `bloggie/` folder, a git subtree of this repository, and you work on your blog as usual.
|
|
138
138
|
When you have an idea that would improve the engine for every blog, make the change in `bloggie/`, commit it, and run:
|
|
139
139
|
|
|
@@ -150,7 +150,7 @@ Once the pull request is merged, `npm run bloggie:update` brings it into your bl
|
|
|
150
150
|
|
|
151
151
|
In a blog that uses Bloggie as an npm package, make the change in a clone of this repository instead (`gh repo fork bhoov/bloggie --clone`), and open the pull request from there.
|
|
152
152
|
|
|
153
|
-
This repository is the engine; `template/` is the starter blog that `
|
|
153
|
+
This repository is the engine; `template/` is the starter blog that `npx bloggie` copies and the demo site shows.
|
|
154
154
|
To check a change to the starter blog, make one with `node scripts/create.js ../demo --copy-engine` and run `npm run build` there.
|
|
155
155
|
`AGENTS.md` has the engine's rules.
|
|
156
156
|
|
package/package.json
CHANGED
package/scripts/create.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// `
|
|
2
|
+
// `npx bloggie <folder>`: a new blog in <folder> (default my-blog). npm fetches
|
|
3
3
|
// Bloggie and runs this file from it. The blog is the starter in template/: the example post, src/site.js, AGENTS.md,
|
|
4
4
|
// the deploy workflow. This dates the example post today, names the blog, makes the folder a git repository with one
|
|
5
5
|
// commit, and runs `npm install`.
|
package/scripts/update.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// `npm run bloggie:update` (node bloggie/scripts/update.js) in a blog that keeps Bloggie as its bloggie/ folder (made
|
|
2
|
-
// with `
|
|
2
|
+
// with `npx bloggie <folder> --git`): merge Bloggie's main into bloggie/. Only bloggie/ must be committed;
|
|
3
3
|
// work in progress elsewhere in the blog stays as it is (scripts/subtree.js). On a conflict it changes nothing and
|
|
4
4
|
// says how to merge by hand.
|
|
5
5
|
//
|
package/template/README.md
CHANGED
|
@@ -23,4 +23,4 @@ Once, in the repository's Settings → Pages, set the source to GitHub Actions.
|
|
|
23
23
|
## Update Bloggie
|
|
24
24
|
|
|
25
25
|
The engine is the npm package `bloggie`, and `npm run bloggie:update` installs its latest version.
|
|
26
|
-
In a blog made with `
|
|
26
|
+
In a blog made with `npx bloggie <folder> --git`, the engine is the `bloggie/` folder instead, and `npm run bloggie:update` merges its latest version from GitHub; commit your changes to `bloggie/` first.
|
package/template/package.json
CHANGED
|
@@ -23,12 +23,11 @@ import slideEditor from './media/slide-editor.png'
|
|
|
23
23
|
<h2 id="start">Start in two commands</h2>
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
npx
|
|
26
|
+
npx bloggie my-blog
|
|
27
27
|
cd my-blog && npm run dev # http://localhost:4321/
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
The first command
|
|
31
|
-
`--allow-git=root` lets npm 12 and later fetch Bloggie from GitHub.
|
|
30
|
+
The first command makes the blog in `my-blog/`, dates this post today, and installs its packages.
|
|
32
31
|
Add `--title "My blog" --author "Ada Lovelace"` to it to name the blog, or set these later in `src/site.js`.
|
|
33
32
|
You need Node 22 or later and git.
|
|
34
33
|
|