-
Derive source code
git clone git@github.com:aYukiYoshida/tips.git
-
Install packages
mise install
-
Install dependencies
mise run setup
For full documentation visit mkdocs.org.
-
Create a new project
poetry run mkdocs new [dir-name]
-
Start the live-reloading docs server
poetry run mkdocs serve
-
Build the documentation site.
poetry run mkdocs build
-
Deploy the built documentation site on Github Pages.
poetry run mkdocs gh-deploy
-
Print help message and exit.
poetry run mkdocs -h
-
Create a new project (only at first time; not required)
npx zenn init
-
Create a new article
npx zenn new:article
-
Start the live-reloading docs server
npx zenn preview --port 3000
The following commands for Qiita do not need to be executed manually because the articles of Qiita are managed by the GitHub Actions. These are provided for reference only.
-
Create a new project (only at first time; not required)
npx qiita init
-
Create a new article
npx qiita new <BASE_NAME>
-
Start the live-reloading docs server
npx qiita preview
mkdocs.yml # The configuration file.
docs/ # Articles for MkDocs
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
articles # Articles for Zenn
books # Books for Zenn
public # Articles for Qiita
- Zenn の記事を新規に作成する。もしくは、既存の記事を更新する。
- Zenn の記事の新規作成もしくは、更新についてコミットする。
- 前述のコミットを main ブランチに push する。
- main ブランチでの変更が検知され Zenn が提供する機能により自動でデプロイされる。
- main ブランチでの変更により sync-articles-from-zenn-to-qiita のワークフローが実行される。以下の処理が実行される。
- Zenn の記事が Qiita に変換する。
- 同期する Qiita の記事が存在しない場合は、新規に作成され、その id が Zenn の記事の末尾に追記される。この Zenn の記事の変更について、コミットする。
- 新規作成もしくは、更新によらず Qiita の記事の変更について、コミットする。
- Qiita の記事を公開する。このとき Qiita CLI により front matter が更新される。この Qiita の記事の変更については、自動でコミットされる。
-
Convert article of Zenn to that of Qiita
npm run z2q <ARTICLE_ID>
- MkDocs
- Zenn
- Qiita