Skip to content

Commit a35b593

Browse files
committed
refactor: layout
1 parent e9f2cbc commit a35b593

File tree

6 files changed

+28
-13
lines changed

6 files changed

+28
-13
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,21 @@ jobs:
3636
node-version: 20.x
3737
- uses: actions/setup-python@v5
3838
with:
39-
python-version: '3.12'
39+
python-version: "3.12"
4040
- name: Install MyST Markdown
4141
run: npm install -g mystmd
4242
- name: Build plugin
4343
run: |
4444
npm install
4545
npm run build
46+
cp dist/plugin.mjs docs/
4647
- name: Build HTML Assets
4748
run: myst build --html
49+
working-directory: docs
4850
- name: Upload artifact
4951
uses: actions/upload-pages-artifact@v3
5052
with:
51-
path: "./_build/html"
53+
path: "./docs/_build/html"
5254
- name: Deploy to GitHub Pages
5355
id: deployment
5456
uses: actions/deploy-pages@v4

content/index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Blog Plugin
2+
3+
:::{blog-posts}
4+
:::
5+

myst.yml renamed to docs/myst.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ version: 1
33
project:
44
title: JS Plugin
55
plugins:
6-
- dist/plugin.mjs
6+
- plugin.mjs
77
toc:
8-
- file: content/index.md
8+
- file: index.md
9+
- title: Posts
10+
children:
11+
- pattern: posts/*.md
912
site:
1013
template: book-theme
1114
options:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Hello world!
3+
subtitle: I'm a blog post
4+
date: "2025-01-01"
5+
---
6+
7+
This is post one!

docs/posts/2025-02-01-follow-up.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Hello again!
3+
subtitle: I'm also a blog post
4+
date: "2025-02-01"
5+
---
6+
7+
This is post two!

0 commit comments

Comments
 (0)