This repository manage my slidev resources.
- Run
npm install
- Run
npm run new
and specify a name of directory (e.g.:my-slide
) to create new sub-projectnpm run new
command will createmy-slide/slides.md
andmy-slide/public/
my-slide/slides.md
is an entry point for slidev. (Filenameslides.md
must not be changed because its name is hardcoded in some scripts inpackage.json
)- Static files in
my-slide/public
can be refered from slide- e.g.:
my-slide/public/image.png
can be refered as/image.png
frommy-slide/slides.md
- e.g.:
- Commit subdirectory (e.g.:
my-slide/
) and create a tag with the name of the directory (e.g.:my-slide
)
This repository has devcontainer setting, so you can create Codespace from Your Codespaces and write slidev on it.
There are two kinds of devcontainer.
Configuration | Description |
---|---|
Slidev Dev | Use mcr.microsoft.com/vscode/devcontainers/universal:2-linux |
Slidev Dev (ja) | Slidev Dev + cjk font (fonts-noto-cjk) |
Adding githubPages.ogp=true
to frontmatter enables OGP on GitHub Pages.
...
githubPages:
ogp: true
...
Parameters of OGP are from a front-matter in slidev entry file.
ogp property | front-matter | default value |
---|---|---|
og:title | title | Slidev Presentation |
og:type | - | website |
og:url | - | ${url_ghpages} |
og:image | - | ${url_ghpages}/preview.png |
og:description | info | (empty) |
Preview image of og:image
is generate from the first page of PDF file.
If your slide encounters font issue, you need to add a step to install your language's font to the release action.
For example (to install Japanese font):
...
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Install Japanese font # Insert these 2 lines
run: sudo apt install -y fonts-noto # to install Japanese font
- uses: actions/checkout@v3
...
This repository is licensed under the MIT License. See LICENSE for the full license text.