UniVRM/docfx
2021-09-09 14:01:26 +09:00
..
.vscode Articles 2021-09-06 20:02:04 +09:00
api filter を設定 2021-09-06 14:42:27 +09:00
articles 書き間違え 2021-09-09 14:01:26 +09:00
src/UniVRM copy csproj 2021-09-06 13:12:36 +09:00
.gitignore init 2021-09-06 13:02:30 +09:00
docfx.json filter を設定 2021-09-06 14:42:27 +09:00
filterConfig.yml filter を設定 2021-09-06 14:42:27 +09:00
index.md Articles 2021-09-06 20:02:04 +09:00
README.md watch-build 2021-09-06 15:34:29 +09:00
tasks.py Articles 2021-09-06 20:02:04 +09:00
toc.yml init 2021-09-06 13:02:30 +09:00
watch_build.py Articles 2021-09-06 20:02:04 +09:00

UniVRM Programming Document

UniVRM/docfx フォルダから gh-pages ブランチを作成する。

dependencies

  • docfx(2系)
  • python3
    • pip install invoke
    • pip install watchdog

記事の更新

  • index.md
  • articles フォルダを更新して articles/toc.yml にそれを反映する

docfx 作業記録

初期化

Project ROOT から

$ docfx init -o docfx -q

csproj をコピー

  • Unity の Editor を vscode に設定
  • Open C# project により slncsproj が生成される
  • Unity の csproj(vscode向け) を docfx/src/UniVRM にコピーする python スクリプト作った
$ pip install invoke
$ cd docfx
docfx$ invoke copy-csproj

コピーする際にパスを調整している。 docfx/src/UniVRM からの相対パスに改変。

Assets => ..\\..\\..\\Assets

csproj から meta情報を生成する

docfx$ docfx metadata

filter設定

preview

docfx$ docfx --serve

http://localhost:8080/

記事更新の反映

docfx$ docfx build

github actions

.github/workflows/docfx.yml

name: DocFX

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: windows-2019
    
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 1

      # build docfx site to docfx/_site
      - name: DocFX
        shell: cmd
        run: |
          choco install docfx -y
          docfx docfx\docfx.json          

      # push docfx/_site to gh-pages 
      - name: Publish Documentation on GitHub Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docfx/_site