Skip to content

Commit 0f13b42

Browse files
authored
Devcontainer doc (#11)
* chore: fix items numbers * docs: add readme about devcontainer
1 parent caa27b0 commit 0f13b42

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/setup.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,22 @@ jobs:
3232
* [GitHub Releases(PDF)](https://github.com/${{ github.repository }}/releases)
3333
3434
## Write and deploy a slide
35-
1. Run `npm run new` and specify a name of directory (e.g.:\`my-slide/slides.md\`) to create new sub-project (including the following steps)
36-
* Create a directory (e.g.: \`my-slide\`)
37-
* Create \`slides.md\` in the directory and write slidev to the file (e.g.:\`my-slide/slides.md\`)
38-
* The file name must be \`slides.md\` because it's hardcoded in [\`package.json\`](./package.json)
39-
3. (Optional) Create a sub directory for slidev's assets if you want use it in the slide (e.g.:\`my-slide/public\`, \`my-slide/components\`)
40-
4. Commit it and create a tag with the name of the directory (e.g.: \`my-slide\`)
35+
1. Run \`npm install\`
36+
2. Run \`npm run new\` and specify a name of directory (e.g.:\`my-slide\`) to create new sub-project
37+
* \`npm run new\` command will create \`my-slide/slides.md\` and \`my-slide/public/\`
38+
* \`my-slide/slides.md\` is an entry point for slidev. (Filename `slides.md` must not be changed because its name is hardcoded in some scripts in \`package.json\`)
39+
* Static files in \`my-slide/public\` can be refered from slide
40+
* e.g.: \`my-slide/public/image.png\` can be refered as \`/image.png\` from \`my-slide/slides.md\`
41+
3. Commit subdirectory (e.g.: \`my-slide/\`) and create a tag with the name of the directory (e.g.: \`my-slide\`)
42+
43+
### Set up environment to write a slide
44+
This repository has devcontainer setting, so you can create Codespace from [Your Codespaces](https://github.com/${{ github.repository }}/codespaces) and write slidev on it.
45+
There are two kinds of devcontainer.
46+
47+
| Configuration | Description |
48+
|:----------------|:------------|
49+
| [Slidev Dev](./.devcontainer/devcontainer.json) | Use \`mcr.microsoft.com/vscode/devcontainers/universal:2-linux\` |
50+
| [Slidev Dev (ja)](./.devcontainer/slidev-dev-ja) | \`Slidev Dev\` + cjk font (fonts-noto-cjk) |
4151
4252
### Enable OGP on GitHub Pages (Experimental)
4353

0 commit comments

Comments
 (0)