Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcanouil/quarto-lua-env
lua-env is an extension for Quarto to provide access to LUA objects as metadata.
https://github.com/mcanouil/quarto-lua-env
metadata quarto quarto-extension quarto-filter quarto-pub quarto-shortcode quartopub
Last synced: 2 months ago
JSON representation
lua-env is an extension for Quarto to provide access to LUA objects as metadata.
- Host: GitHub
- URL: https://github.com/mcanouil/quarto-lua-env
- Owner: mcanouil
- License: mit
- Created: 2023-01-22T16:10:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-28T19:56:04.000Z (7 months ago)
- Last Synced: 2024-06-28T21:02:37.680Z (7 months ago)
- Topics: metadata, quarto, quarto-extension, quarto-filter, quarto-pub, quarto-shortcode, quartopub
- Language: Lua
- Homepage: https://m.canouil.dev/quarto-lua-env/
- Size: 36.1 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Lua Env Extension For Quarto
`lua-env` is an extension for [Quarto](https://quarto.org) to provide access to LUA objects as metadata.
## Installing
```bash
quarto add mcanouil/quarto-lua-env
```This will install the extension under the `_extensions` subdirectory.
If you're using version control, you will want to check in this directory.## Using
Add the following to your YAML header:
```yaml
filters:
- lua-env
```This will give you access to the `quarto` and several Pandoc LUA internal objects using any of the below shortcodes:
```markdown
{{< lua-env quarto.doc.input_file >}}{{< meta lua-env.quarto.doc.input_file >}}
```LUA objects currently available as metadata:
```yaml
lua-env:
quarto: "quarto"
pandoc:
PANDOC_STATE: "PANDOC_STATE"
FORMAT: "FORMAT"
PANDOC_READER_OPTIONS: "PANDOC_READER_OPTIONS"
PANDOC_WRITER_OPTIONS: "PANDOC_WRITER_OPTIONS"
PANDOC_VERSION: "PANDOC_VERSION"
PANDOC_API_VERSION: "PANDOC_API_VERSION"
PANDOC_SCRIPT_FILE: "PANDOC_SCRIPT_FILE"
```See [Pandoc LUA API - Global Variables](https://pandoc.org/lua-filters.html#global-variables) for more information about Pandoc global variables.
## Example
Here is the source code for a minimal example: [example.qmd](example.qmd).