Skip to content

Commit

Permalink
feat: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
anasmuhmd committed Jul 28, 2024
1 parent 02fd59f commit d79c195
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions examples/templates/github/publish_gist.fabric
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
fabric {
plugin_versions = {
"blackstork/github" = ">= 0.4 < 1.0 || 0.4.0-rev0"
}
}

document "example" {
meta {
name = "example_document"
}
publish github_gist "mygist" {
format = "md"
description = "sample description"
filename = ""
gist_id = ""
config {
github_token = env.GITHUB_TOKEN
}
}

title = "Doc Title"

content frontmatter {
content = {
title = "FM Title"
description = "FM Description"
js_code = <<-EOT
var doNotTrack = false;
if (!doNotTrack) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
}
EOT
css_code = <<-EOT
a {
font-family: Verdana;
}
EOT

js_sources = ["https://buttons.github.io/buttons.js", "/static/local.js"]
css_sources = ["/static/main.css", "https://localhost.localhost/some.css"]
}
format = "yaml"
}

content title {
value = "TOC"
}

content toc {}

content title {
value = "Subtitle 0"
}

section {
title = "Section 1"

content title {
value = "Section TOC"
}

content toc {
start_level = 1
end_level = 4
ordered = true
}

content text {
value = "Text value 1"
}

content title {
value = "Subtitle 1"
}

content text {
value = "Text value 2"
}

section {
title = "Subsection 1"

content text {
value = "Text value 3"
}
}

content title {
value = "Subtitle 2"
}
}

section {
title = "Section 2"

section {
title = "Subsection 2"

content text {
value = "Text value 4"
}
}
}
}

0 comments on commit d79c195

Please sign in to comment.