mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Rewrite documentation with MkDocs
This commit is contained in:
@ -21,20 +21,19 @@
|
||||
#
|
||||
#
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from core.markdown import markdown
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Output the fully rendered doc/SYNTAX.md file"
|
||||
help = "Output the fully rendered SYNTAX.md file"
|
||||
|
||||
def handle(self, *args, **options):
|
||||
root_path = os.path.dirname(
|
||||
os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
|
||||
)
|
||||
with open(os.path.join(root_path) + "/doc/SYNTAX.md", "r") as md:
|
||||
root_path = Path(settings.BASE_DIR)
|
||||
with open(root_path / "core/fixtures/SYNTAX.md", "r") as md:
|
||||
result = markdown(md.read())
|
||||
print(result, end="")
|
||||
|
Reference in New Issue
Block a user