- Notifications
You must be signed in to change notification settings - Fork3
Containers and actions for working with Markdown-based specifications.
License
TrustedComputingGroup/markdown
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Create a private repository based on theexample template repository,or set up the GitHub action in any repository using theinstructions below.
Write normal Markdown, with a YAML document metadata block at the top, containing the relevant metadata.
---title: "Document Title"version: 0.1revision: 1date: 2022/09/17type: SPECIFICATIONstatus: DRAFT...status can be any string, but if it isDRAFT then the tool will render a watermark on the PDF.
status: DRAFTYou can specify either thebluetop orgreentop (default) cover backgrounds with the following optional YAML metadata field:
template: bluetopor
template: greentopHorizontal separators are transformed by the workflow into page breaks for readability in both GitHub and PDF views.
---Provide a table of contents, list of figures, and list of tables anywhere(usually, after the disclaimers, change history, and document-style remarks)in the document with:
---\tableofcontents\listoffigures\listoftables---Tables in Markdown look like the following:
| **Revision** | **Date** | **Description** || ------------ | ---------- | --------------- || 0.1/1 | 2022/09/17 | Initial draft || Revision | Date | Description |
|---|---|---|
| 0.1/1 | 2022/09/17 | Initial draft |
TCG makes use of a gray box for "informative text." To write informative text in your Markdown source, use the block-quote syntax:
>Informative text goes here!>>It can be multiple paragraphs, if you wish.
It will look like this in the GitHub markdown view:
Informative text goes here!
It can be multiple paragraphs, if you wish.
The tool will insert the "Start of informative text" / "End of informative text" delimitersinto the informative text blocks automatically.
You can include diagrams usingMermaid syntax:
```mermaid {caption="Sequence Diagram A"}sequenceDiagramHost->>TPM: TPM2_Startuploop Measurements Host->>TPM: TPM2_PCR_ExtendendHost->>TPM: TPM2_QuoteTPM->>Host: <quoted PCRs>```
The code above generates a diagram that looks like this:
sequenceDiagramHost->>TPM: TPM2_Startuploop Measurements Host->>TPM: TPM2_PCR_ExtendendHost->>TPM: TPM2_QuoteTPM->>Host: <quoted PCRs>In the example above, "Sequence Diagram A" is the name shown in the figure caption and table of figures.To exclude the caption and table-of-figures entry, leave out the caption on the first line, i.e. just:
```mermaidMermaid supports the following types of diagrams:
- Sequence diagrams (as above)
- Flow charts
- Gantt charts
- UML class diagrams
- Git branch graphs
- Andmore
You can also include images if you check them into the root of the repository.Note: GitHub and Pandoc disagree somewhat on the paths to images,so the safest path to success is to keep the Markdown source and image filesall together in theroot of the repository.

produces:
In the example above, "Image B" is the name shown in the figure caption and table of figures.To exclude the caption and table-of-figures entry, leave the caption blank (i.e.,)
See the samples in the root directory for more examples.
Here is an example of a GitHub Action configuration that renders a Markdown file to PDF, attaches it to the workflow, and checks it into the repo (if not a pull request):
name:Renderon:push:branches: -mainpull_request:workflow_dispatch:jobs:render:runs-on:ubuntu-latestcontainer:image:ghcr.io/trustedcomputinggroup/pandoc:0.3.0name:Render PDFsteps: -name:Checkoutuses:actions/checkout@v3 -name:Renderuses:trustedcomputinggroup/markdown@v0.2.5with:input-md:main.mdoutput-pdf:spec.pdf -name:Upload samplesuses:actions/upload-artifact@masterwith:name:spec.pdfpath:spec.pdf -name:Check in latest renderuses:stefanzweifel/git-auto-commit-action@v4with:commit_message:Generate latest PDFfile_pattern:spec.pdfif:github.event_name != 'pull_request'
Either clone the repository and installPandoc and its dependencies, or
docker pull ghcr.io/trustedcomputinggroup/markdown:latest
When running Pandoc (either directly or usingdocker run), you'll have to pass all the arguments thatthe action does.
Send a PR! A GitHub Action in this repo will automatically run the tools with all your changes on top. You can find the rendered samples under "action validation" in the "checks" tab of your PR:
About
Containers and actions for working with Markdown-based specifications.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
