Started meta data
This commit is contained in:
parent
e337b5675f
commit
2ed77ee711
11
convert.py
11
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"""<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
@ -33,7 +38,9 @@ def convert_markdown_to_html(md_path: Path, html_path: Path):
|
|||
<div>
|
||||
<small>
|
||||
<span>© 2025 Kyler Olsen</span>
|
||||
<a href="/">Home</a>
|
||||
<a href="/">Home</a> |
|
||||
<a href="/">Prev</a>
|
||||
<a href="/">Next</a>
|
||||
</small>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 11 Advanced Topics
|
||||
Prev: Generic Programming
|
||||
Next: Standard Library
|
||||
---
|
||||
|
||||
## 11. Advanced Topics
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 4 Basic Operation
|
||||
Prev: Primitive Types
|
||||
Next: Functions
|
||||
---
|
||||
|
||||
## 4. Basic Operations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | C Complete Operator Reference
|
||||
Prev: Complete Trait Reference
|
||||
Next: Grammar Summary
|
||||
---
|
||||
|
||||
## Appendix C: Complete Operator Reference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | B Complete Trait Reference
|
||||
Prev: Standard Library
|
||||
Next: Complete Operator Reference
|
||||
---
|
||||
|
||||
## Appendix B: Complete Trait Reference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 6 Control Flow
|
||||
Prev: Functions
|
||||
Next: Data Structures
|
||||
---
|
||||
|
||||
## 6. Control Flow
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 7 Data Structures
|
||||
Prev: Control Flow
|
||||
Next: Type System
|
||||
---
|
||||
|
||||
## 7. Data Structures
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | G Examples & Tutorials
|
||||
Prev: Memory Management
|
||||
Next:
|
||||
---
|
||||
|
||||
## Appendix G: Examples & Tutorials
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 5 Functions
|
||||
Prev: Basic Operation
|
||||
Next: Control Flow
|
||||
---
|
||||
|
||||
## 5. Functions
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 10 Generic Programming
|
||||
Prev: Trait System
|
||||
Next: Advanced Topics
|
||||
---
|
||||
|
||||
## 10. Generic Programming
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | D Grammar Summary
|
||||
Prev: Complete Operator Reference
|
||||
Next: Module System
|
||||
---
|
||||
|
||||
## Appendix D: Grammar Summary
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
---
|
||||
Title: YREA SLS |
|
||||
Prev:
|
||||
Next:
|
||||
---
|
||||
|
||||
---
|
||||
Title: YREA SLS | Specs Home
|
||||
Prev:
|
||||
Next: Overview
|
||||
---
|
||||
|
||||
# Stack Language Specification
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 2 Lexical Structure
|
||||
Prev: Overview
|
||||
Next: Primitive Types
|
||||
---
|
||||
|
||||
## 2. Lexical Structure
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | F Memory Management
|
||||
Prev: Module System
|
||||
Next: Examples & Tutorials
|
||||
---
|
||||
|
||||
## Appendix F: Memory Management (Future)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | E Module System
|
||||
Prev: Grammar Summary
|
||||
Next: Memory Management
|
||||
---
|
||||
|
||||
## Appendix E: Module System (Future)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 1 Overview
|
||||
Prev: Lexical Structure
|
||||
Next: Index
|
||||
---
|
||||
|
||||
## 1. Overview
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 3 Primitive Types
|
||||
Prev: Lexical Structure
|
||||
Next: Basic Operation
|
||||
---
|
||||
|
||||
## 3. Primitive Types
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | A Standard Library
|
||||
Prev: Advanced Topics
|
||||
Next: Complete Trait Reference
|
||||
---
|
||||
|
||||
## Appendix A: Standard Library
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 9 Trait System
|
||||
Prev: Type System
|
||||
Next: Generic Programming
|
||||
---
|
||||
|
||||
## 9. Trait System
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
Title: YREA SLS | 8 Type System
|
||||
Prev: Data Structures
|
||||
Next: Trait System
|
||||
---
|
||||
|
||||
## 8. Type System
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue