Skip to content

Instantly share code, notes, and snippets.

@JanMiksovsky
Created September 7, 2024 16:34
Show Gist options
  • Save JanMiksovsky/08cf9392e19c217a599a47246229ac6c to your computer and use it in GitHub Desktop.
Save JanMiksovsky/08cf9392e19c217a599a47246229ac6c to your computer and use it in GitHub Desktop.
title template
Cool document
coolPage.ori

This document is so cool that it specifies its own template.

(document) => `<html>
<head>
<title>${ document/title }</title>
</head>
<body>
<h1>COOL PAGE</h1>
${ document/@text }
</body>
</html>`
(document) => .(document/template)(document)
@JanMiksovsky
Copy link
Author

To run:

$ ori example.ori coolDoc.md
<html>
  <head>
    <title>Cool document</title>
  </head>
  <body>
    <h1>COOL PAGE</h1>
    
This document is so cool that it specifies its own template.

  </body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment