/
config.scriban
95 lines (80 loc) · 2.62 KB
/
config.scriban
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Site Settings
author = "Alexandre Mutel"
title = "xoofx"
description = "xoofx website"
basepath = ""
baseurl = baseurl ?? "https://xoofx.github.io"
# Use `base` as a default layout
layout = "base"
# Github repository
github_user = "xoofx"
github_repo_url = "https://github.com/xoofx/xoofx.github.io/"
with cards.twitter
enable = true
card = "summary_large_image"
user = "xoofx"
image = "/images/twitter-banner.png"
end
# Resources bundle
with bundle
bootstrap = resource "npm:bootstrap" "5.3.1"
bootstrap_icons = resource "npm:bootstrap-icons" "1.10.5"
tocbot = resource "npm:tocbot" "4.21.1"
anchorjs = resource "npm:anchor-js" "5.0.0"
prismjs = resource "npm:prismjs" "1.29.0"
# css files
css tocbot "/dist/tocbot.css"
css bootstrap_icons "/font/bootstrap-icons.min.css"
css bootstrap "/dist/css/bootstrap.min.css"
css "/css/prism.css"
css "/css/main.css"
# js files
js anchorjs "/anchor.min.js"
js bootstrap "/dist/js/bootstrap.bundle.min.js"
js tocbot "/dist/tocbot.min.js"
js prismjs "/prism.js"
js prismjs "/components/prism-shell-session.min.js"
js prismjs "/components/prism-clike.min.js"
js prismjs "/components/prism-c.min.js"
js prismjs "/components/prism-cpp.min.js"
js prismjs "/components/prism-csharp.min.js"
js prismjs "/components/prism-nasm.min.js"
js "/js/prism-stark.js"
js "/js/github-comments.js"
js "/js/xoofx.js"
# copy font files
content bootstrap_icons "/font/fonts/bootstrap-icons.*" "/css/fonts/"
# concatenate css/js files
concat = true
minify = true
end
with attributes
# match "/blog/**/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*.md" {
# url: "/:section/:year/:month/:day/:title:output_ext"
#}
end
with builtins
# render tags from a post
func render_tags(post)
if !post.tags; ret null; end;
result = post.tags.size == 1 ? '<i class="bi bi-tag"></i>' : '<i class="bi bi-tags"></i>'
for tag in post.tags
result = result + (for.first?'':', ') + '<a href="' + site.taxonomies["tags"].terms[tag].url + '">' + tag + '</a>'
end
ret result
end
end
with markdown
# Use Bootstrap img_fluid for all Markdown image links
options.css_img_attr = "img-fluid"
end
with taxonomies
tags = {singular: 'tag', url: '/blog/tag/', map: { "C#": "csharp" }}
end
# Setup Google Analytics
with tracking.google
id = "G-0DVR9ML8KY"
end
# Configure some HTML defaults
html.head.title = do; ret page.title + " | " + site.title; end
html.attributes = 'lang="en" itemscope itemtype="http://schema.org/WebPage"'