Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"name": "mkdocs_simple_gen",
"type": "python",
"request": "launch",
"program": "/home/vscode/.local/bin/mkdocs_simple_gen",
"program": "${workspaceFolder}/mkdocs_simple_plugin/generator.py",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
Expand Down
6 changes: 4 additions & 2 deletions mkdocs_simple_plugin/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"""
import os
import tempfile
import sys

import click
import yaml
Expand Down Expand Up @@ -120,7 +121,8 @@ def setup_config(config_file="mkdocs.yml"):
except yaml.YAMLError as exc:
print(exc)
raise
write_config(config_file, config)
if config != local_config:
write_config(config_file, config)
return config


Expand All @@ -146,4 +148,4 @@ def main(config_file, build, serve, mkdocs_args):
# pylint doesn't know how to parse the click decorators,
# so disable no-value-for-parameter on main
# pylint: disable=no-value-for-parameter
main(['--help'])
main(sys.argv)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ pyfakefs==5.2.2
pymdown-extensions==10.0.1
PyYAML==6.0
hatch==1.7.0
typing-extensions==4.5.0