mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Let's use pymdownx.snippets for the move
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
// Allow inline HTML
|
||||
"MD033": false,
|
||||
|
||||
// First line heading
|
||||
"MD041": false,
|
||||
|
||||
// Disable named references validation
|
||||
"MD052": false
|
||||
}
|
||||
|
||||
1
docs/about/contributing.md
Normal file
1
docs/about/contributing.md
Normal file
@@ -0,0 +1 @@
|
||||
--8<-- "CONTRIBUTING.md"
|
||||
@@ -4,19 +4,11 @@ import re
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from mkdocs.structure.files import File, Files
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from mkdocs.config.defaults import MkDocsConfig
|
||||
from mkdocs.structure.nav import Page
|
||||
|
||||
|
||||
def on_files(files: Files, config: MkDocsConfig) -> None:
|
||||
f = File('about/contributing.md', config.docs_dir, config.site_dir, config.use_directory_urls)
|
||||
f.abs_src_path = str(Path(config.config_file_path).parent.joinpath('CONTRIBUTING.md'))
|
||||
files.append(f)
|
||||
|
||||
|
||||
def _get_language_of_translation_file(path: Path) -> str:
|
||||
with path.open(encoding='utf-8') as f:
|
||||
translation_line = f.readline()
|
||||
|
||||
Reference in New Issue
Block a user