diff --git a/convert.py b/convert.py index f8dfac3..8f28de4 100644 --- a/convert.py +++ b/convert.py @@ -11,13 +11,18 @@ def my_url_builder(label, base, end): def convert_markdown_to_html(md_path: Path, html_path: Path): html_path.parent.mkdir(parents=True, exist_ok=True) - html = markdown.markdown(md_path.read_text(encoding="utf-8"), extensions=[ + md = markdown.markdown(extensions=[ WikiLinkExtension(base_url='./', end_url='.html', build_url=my_url_builder), 'tables', 'fenced_code', 'sane_lists', 'prependnewline', + 'meta', ]) + html = md.convert(md_path.read_text(encoding="utf-8")) + title = md.Meta["Title"] + next_page = md.Meta["Next"] + prev_page = md.Meta["Prev"] html_page = f""" @@ -33,7 +38,9 @@ def convert_markdown_to_html(md_path: Path, html_path: Path):
© 2025 Kyler Olsen - Home + Home | + Prev + Next
diff --git a/docs/advanced_topics.md b/docs/advanced_topics.md index 051c63d..84bf7e2 100644 --- a/docs/advanced_topics.md +++ b/docs/advanced_topics.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 11 Advanced Topics +Prev: Generic Programming +Next: Standard Library +--- ## 11. Advanced Topics diff --git a/docs/basic_operations.md b/docs/basic_operations.md index c634519..0c5bd5a 100644 --- a/docs/basic_operations.md +++ b/docs/basic_operations.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 4 Basic Operation +Prev: Primitive Types +Next: Functions +--- ## 4. Basic Operations diff --git a/docs/complete_operator_reference.md b/docs/complete_operator_reference.md index 67477ee..a5f54a4 100644 --- a/docs/complete_operator_reference.md +++ b/docs/complete_operator_reference.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | C Complete Operator Reference +Prev: Complete Trait Reference +Next: Grammar Summary +--- ## Appendix C: Complete Operator Reference diff --git a/docs/complete_trait_reference.md b/docs/complete_trait_reference.md index 3d01823..fd6f83c 100644 --- a/docs/complete_trait_reference.md +++ b/docs/complete_trait_reference.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | B Complete Trait Reference +Prev: Standard Library +Next: Complete Operator Reference +--- ## Appendix B: Complete Trait Reference diff --git a/docs/control_flow.md b/docs/control_flow.md index 147ef1d..13e4e2f 100644 --- a/docs/control_flow.md +++ b/docs/control_flow.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 6 Control Flow +Prev: Functions +Next: Data Structures +--- ## 6. Control Flow diff --git a/docs/data_structures.md b/docs/data_structures.md index 9764ebb..0b73cd8 100644 --- a/docs/data_structures.md +++ b/docs/data_structures.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 7 Data Structures +Prev: Control Flow +Next: Type System +--- ## 7. Data Structures diff --git a/docs/examples_and_tutorials.md b/docs/examples_and_tutorials.md index 2f8d937..ebd8412 100644 --- a/docs/examples_and_tutorials.md +++ b/docs/examples_and_tutorials.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | G Examples & Tutorials +Prev: Memory Management +Next: +--- ## Appendix G: Examples & Tutorials diff --git a/docs/functions.md b/docs/functions.md index 057dd8c..8481304 100644 --- a/docs/functions.md +++ b/docs/functions.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 5 Functions +Prev: Basic Operation +Next: Control Flow +--- ## 5. Functions diff --git a/docs/generic_programming.md b/docs/generic_programming.md index 04b35df..fce1eef 100644 --- a/docs/generic_programming.md +++ b/docs/generic_programming.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 10 Generic Programming +Prev: Trait System +Next: Advanced Topics +--- ## 10. Generic Programming diff --git a/docs/grammar_summary.md b/docs/grammar_summary.md index 5575ccb..8eabf54 100644 --- a/docs/grammar_summary.md +++ b/docs/grammar_summary.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | D Grammar Summary +Prev: Complete Operator Reference +Next: Module System +--- ## Appendix D: Grammar Summary diff --git a/docs/index.md b/docs/index.md index b84f1ef..037e591 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,14 @@ +--- +Title: YREA SLS | +Prev: +Next: +--- + +--- +Title: YREA SLS | Specs Home +Prev: +Next: Overview +--- # Stack Language Specification diff --git a/docs/lexical_structure.md b/docs/lexical_structure.md index efb6406..1a2150e 100644 --- a/docs/lexical_structure.md +++ b/docs/lexical_structure.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 2 Lexical Structure +Prev: Overview +Next: Primitive Types +--- ## 2. Lexical Structure diff --git a/docs/memory_management.md b/docs/memory_management.md index 9e1b476..bbe7a70 100644 --- a/docs/memory_management.md +++ b/docs/memory_management.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | F Memory Management +Prev: Module System +Next: Examples & Tutorials +--- ## Appendix F: Memory Management (Future) diff --git a/docs/module_system.md b/docs/module_system.md index 6332ad6..3c9ce4c 100644 --- a/docs/module_system.md +++ b/docs/module_system.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | E Module System +Prev: Grammar Summary +Next: Memory Management +--- ## Appendix E: Module System (Future) diff --git a/docs/overview.md b/docs/overview.md index 1ad7530..369d8c2 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 1 Overview +Prev: Lexical Structure +Next: Index +--- ## 1. Overview diff --git a/docs/primitive_types.md b/docs/primitive_types.md index ccc94ab..c846bef 100644 --- a/docs/primitive_types.md +++ b/docs/primitive_types.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 3 Primitive Types +Prev: Lexical Structure +Next: Basic Operation +--- ## 3. Primitive Types diff --git a/docs/standard_library.md b/docs/standard_library.md index 8c19c78..1a117b8 100644 --- a/docs/standard_library.md +++ b/docs/standard_library.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | A Standard Library +Prev: Advanced Topics +Next: Complete Trait Reference +--- ## Appendix A: Standard Library diff --git a/docs/trait_system.md b/docs/trait_system.md index b5313be..7af6ae4 100644 --- a/docs/trait_system.md +++ b/docs/trait_system.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 9 Trait System +Prev: Type System +Next: Generic Programming +--- ## 9. Trait System diff --git a/docs/type_system.md b/docs/type_system.md index a924028..7717be7 100644 --- a/docs/type_system.md +++ b/docs/type_system.md @@ -1,3 +1,8 @@ +--- +Title: YREA SLS | 8 Type System +Prev: Data Structures +Next: Trait System +--- ## 8. Type System