diff --git a/Makefile b/Makefile index c375760..accac77 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ PANDOC_FLAGS += --metadata=include-auto PANDOC_FLAGS += --lua-filter=utils/pandoc_filters/replace_variables.lua PANDOC_FLAGS += --lua-filter=utils/pandoc_filters/remove_md_links.lua PANDOC_FLAGS += --filter pandoc-crossref +PANDOC_FLAGS += --metadata-file=variables.yml PANDOC_LATEX_FLAGS += --top-level-division=chapter PANDOC_LATEX_FLAGS += --pdf-engine=xelatex diff --git a/mkdocs.yml b/mkdocs.yml index ee1a1d4..443e8ef 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,34 +1,6 @@ -site_name: 香山开源处理器用户手册 -theme: - name: material - features: - - navigation.indexes - -extra_css: - - stylesheets/extra.css - -markdown_extensions: - - admonition - - pymdownx.details - - pymdownx.superfences - - footnotes - - abbr - - pymdownx.snippets - - attr_list - - md_in_html - - def_list - - markdown_grid_tables - - markdown_captions # for image caption, use alt as caption - - table_captions: # for table caption, use Table: xxxx - numbering: false - - remove_references - - remove_include - - replace_variables: - variables: - processor_name: "昆明湖 V2R2" - -plugins: +INHERIT: utils/mkdocs-base.yml +site_name: 香山开源处理器用户手册 nav: - 前言: index.md diff --git a/pandoc-main.md b/pandoc-main.md index 0bc4b5d..0f431d8 100644 --- a/pandoc-main.md +++ b/pandoc-main.md @@ -8,8 +8,6 @@ title-line2: "用户手册" # title-line3: "User Guide" author: "香山团队·北京开源芯片研究院" date: "\\today" -replace_variables: - processor_name: "昆明湖 V2R2" figureTitle: "图" tableTitle: "表" listingTitle: "代码" diff --git a/utils b/utils index ea49e94..da521f5 160000 --- a/utils +++ b/utils @@ -1 +1 @@ -Subproject commit ea49e942999fec4acae36c2f72829a967dc53ab2 +Subproject commit da521f51b82212cdc08faef49bb138891e511e61 diff --git a/variables.yml b/variables.yml new file mode 100644 index 0000000..5ffaa20 --- /dev/null +++ b/variables.yml @@ -0,0 +1,2 @@ +replace_variables: + processor_name: "昆明湖 V2R2"