Skip to content

Commit

Permalink
use chevron for doc_header.md
Browse files Browse the repository at this point in the history
  • Loading branch information
htfab committed May 6, 2024
1 parent 7d09faa commit bd7e1da
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 139 deletions.
19 changes: 19 additions & 0 deletions docs/doc_header.md.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: |
![Tiny Tapeout Logo](pics/ttlogo.png){width=15cm}
{{name}} Datasheet
subtitle: Project Repository [{{repo}}]({{repo}})
documentclass: scrartcl
date: \today{}
geometry: "left=2cm,right=2cm,top=2cm,bottom=2.5cm"
fontsize: 14pt
mainfont: Latin Modern Sans
header-includes:
- \hypersetup{colorlinks=true,
urlcolor=blue,
linkcolor=[rgb]{0,0,0.5},
allbordercolors={0 0 0},
pdfborderstyle={/S/U/W 1} }
---

\pagebreak
35 changes: 0 additions & 35 deletions docs/doc_template.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/hugo_index_template.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/hugo_template.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/project_preview.md

This file was deleted.

10 changes: 8 additions & 2 deletions documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def load_doc_template(self, name: str) -> str:
return doc.content + "\n"

def write_datasheet(self, markdown_file: str, pdf_file: Optional[str] = None):
doc_header = self.load_doc_template("doc_header.md")
doc_header = self.load_doc_template("doc_header.md.mustache")
doc_chip_map = self.load_doc_template("../../docs/chip_map.md")
doc_template = self.load_doc_template("doc_template.md.mustache")
doc_pinout = self.load_doc_template("PINOUT.md")
Expand All @@ -71,7 +71,13 @@ def write_datasheet(self, markdown_file: str, pdf_file: Optional[str] = None):
with open(markdown_file, "w") as fh:
repo = git.Repo(".")
fh.write(
doc_header.format(name=self.config["name"], repo=get_first_remote(repo))
chevron.render(
doc_header,
{
"name": self.config["name"],
"repo": get_first_remote(repo),
},
)
)
fh.write(doc_chip_map)
fh.write("# Projects\n")
Expand Down

0 comments on commit bd7e1da

Please sign in to comment.