Skip to content

2023-11-19

MkDocs 建て付け時のメモ

MkDocs 関連でやったこと

  • brew update
    • 固まったので brew install --cask flutterbrew doctor からの
      xcode-select --install
  • pip install -U mkdocs
    • テンプレ出力は GitHub Actions でやるので実質不要
  • pip install mkdocs-material
  • pip install mkdocs-awesome-pages-plugin
  • GitHub Actions 側の build 設定
  • 設定全般
    mkdocs.yml
    site_name: getter.io のメモ帳
    theme:
      palette:
        scheme: slate
        primary: red
      font:
        text: Kosugi
      name: material
      language: "ja"
      features:
        - navigation.instant
        - navigation.instant.prefetch
        - navigation.sections
        - navigation.top
        - navigation.tracking
    extra:
      search:
        language: "jp"
      consent:
        title: Cookie consent
        description:
          We use cookies to recognize your repeated visits and preferences, as well
          as to measure the effectiveness of our documentation and whether users
          find what they're searching for. With your consent, you're helping us to
          make our documentation better.
    extra_css:
      - css/custom.css
      - https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css
    extra_javascript:
      - https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js
      - js/config.js
    markdown_extensions:
      - admonition
      - pymdownx.details
      - pymdownx.keys
      - pymdownx.highlight
      - pymdownx.tabbed:
          alternate_style: true
      - pymdownx.superfences:
          custom_fences:
            - name: mermaid
              class: mermaid
              format: !!python/name:pymdownx.superfences.fence_code_format
    plugins:
      - search
      - awesome-pages