Skip to content

Commit

Permalink
build: inherit config from base & use single file to pass variables
Browse files Browse the repository at this point in the history
  • Loading branch information
cebarobot committed Feb 24, 2025
1 parent 2c688e0 commit 5e7994b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 33 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 2 additions & 30 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions pandoc-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ title-line2: "用户手册"
# title-line3: "User Guide"
author: "香山团队·北京开源芯片研究院"
date: "\\today"
replace_variables:
processor_name: "昆明湖 V2R2"
figureTitle: ""
tableTitle: ""
listingTitle: "代码"
Expand Down
2 changes: 1 addition & 1 deletion utils
2 changes: 2 additions & 0 deletions variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
replace_variables:
processor_name: "昆明湖 V2R2"

0 comments on commit 5e7994b

Please sign in to comment.