Contents Menu Expand Light mode Dark mode Auto light/dark mode
read sphinx ドキュメント
read sphinx ドキュメント
  • デバッグ
  • BuildPhase
    • INITIALIZATION
    • READING
    • CONSISTENCY_CHECK
    • RESOLVING
    • WRITING
  • conf.py
  • Docutils
    • nodes
    • directive
    • roll
    • doctree
    • Transform
  • Environment
    • 初期化
    • sphinx.project.Project
    • domaindata
    • EnvironmentCollector
  • Builder
    • HTMLBuilder
  • Theme
    • basicテーマ
    • furo
    • customize
    • テーマの作成
  • Extension
    • 組み込み拡張
      • autodoc
      • graphviz
      • inheritance_diagram
    • 外部拡張
      • myst_parser
      • blockdiag
      • ablog
      • nbsphinx
    • 拡張の作り方
      • Directive
  • Command
    • sphinx-autobuild
  • Internationalization(i18n)
    • workflow
    • build
  • Language Server

BuildPhase¶

  • https://www.sphinx-doc.org/ja/master/extdev/index.html#build-phases

  • https://www.sphinx-doc.org/ja/master/extdev/appapi.html#events

from enum import IntEnum


class BuildPhase(IntEnum):
    """Build phase of Sphinx application."""
    INITIALIZATION = 1
    READING = 2
    CONSISTENCY_CHECK = 3
    RESOLVING = 3
    WRITING = 4
  • INITIALIZATION
    • sphinx.application.Sphinx
    • extension の import と setup
    • sphinx.application.Sphinx._init_env
      • sphinx.application.Sphinx._init_builder

Reading¶

blockdiag rst sphinx md myst_parser doctree environment
  • READING
    • sphinx.util.i18n.CatalogRepository
    • prepare
      • conf.py の更新チェック
      • template の更新チェック
      • env の更新チェック
    • event
    • foreach docname
      • if doc changed and not removed
      • run source parsers: text -> docutils.document
      • apply transforms based on priority: docutils.document -> docutils.document
    • merge(if running in parallel mode, this event will be emitted for each process)
    • updated
    • 中間ファイル
      • Environment
      • .doctree

Check, Resolve, Writing¶

blockdiag environment doctree theme HtmlBuilder html css js
  • CONSISTENCY_CHECK
    • document isn't included in any toctree
  • RESOLVING
    • prepare_writing
  • WRITING
    • write
Next
INITIALIZATION
Previous
デバッグ
Copyright © 2021, ousttrue | Created using Sphinx and @pradyunsg's Furo theme. | ソースコードを表示
コンテンツ
  • BuildPhase
    • Reading
    • Check, Resolve, Writing