Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/resources/extensions/quarto/docusaurus/docusaurus_writer.lua
12923 views
1
-- docusaurus_writer.lua
2
-- Copyright (C) 2020-2023 Posit Software, PBC
3
4
-- function Writer(doc, opts)
5
-- doc = quarto._quarto.ast.walk(doc, {
6
-- CodeBlock = code_block,
7
-- })
8
-- assert(doc ~= nil)
9
10
-- -- insert react preamble if we have it
11
-- if #reactPreamble > 0 then
12
-- local preamble = table.concat(reactPreamble, "\n")
13
-- doc.blocks:insert(1, pandoc.RawBlock("markdown", preamble .. "\n"))
14
-- end
15
16
-- local extensions = {
17
-- yaml_metadata_block = true,
18
-- pipe_tables = true,
19
-- footnotes = true,
20
-- tex_math_dollars = true,
21
-- header_attributes = true,
22
-- raw_html = true,
23
-- all_symbols_escapable = true,
24
-- backtick_code_blocks = true,
25
-- fenced_code_blocks = true,
26
-- space_in_atx_header = true,
27
-- intraword_underscores = true,
28
-- lists_without_preceding_blankline = true,
29
-- shortcut_reference_links = true,
30
-- }
31
32
-- return pandoc.write(doc, {
33
-- format = 'markdown_strict',
34
-- extensions = extensions
35
-- }, opts)
36
-- end
37
38