luoma 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +2 -0
- data/.rdoc_options +16 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +69 -0
- data/Steepfile +41 -0
- data/certs/jgrp.pem +27 -0
- data/docs/configuration.md +180 -0
- data/docs/custom_filters.md +3 -0
- data/docs/custom_tags.md +3 -0
- data/docs/expressions.md +3 -0
- data/docs/extension_types.md +41 -0
- data/docs/filter_reference.md +1702 -0
- data/docs/index.md +73 -0
- data/docs/luoma_for_template_authors.md +3 -0
- data/docs/markdown.md +111 -0
- data/docs/predicate_reference.md +3 -0
- data/docs/static_analysis.md +3 -0
- data/docs/tag_reference.md +352 -0
- data/docs/template_loaders.md +177 -0
- data/docs/undefined_variables.md +3 -0
- data/docs-requirements.txt +11 -0
- data/docs_/cycle.md +17 -0
- data/docs_/font_rendering_example.md +157 -0
- data/docs_/header_block_example.md +51 -0
- data/docs_/increment_and_decrement.md +49 -0
- data/docs_/logo_style_example.md +40 -0
- data/docs_/migration.md +11 -0
- data/docs_/notes.md +19 -0
- data/lib/luoma/cache.rb +80 -0
- data/lib/luoma/chain_hash.rb +54 -0
- data/lib/luoma/context.rb +227 -0
- data/lib/luoma/drop.rb +84 -0
- data/lib/luoma/drops/block.rb +33 -0
- data/lib/luoma/drops/expression.rb +29 -0
- data/lib/luoma/drops/html_safe.rb +36 -0
- data/lib/luoma/drops/range.rb +69 -0
- data/lib/luoma/drops/undefined.rb +119 -0
- data/lib/luoma/environment.rb +479 -0
- data/lib/luoma/errors.rb +79 -0
- data/lib/luoma/escape.rb +35 -0
- data/lib/luoma/expression.rb +1271 -0
- data/lib/luoma/filter.rb +97 -0
- data/lib/luoma/filters/array.rb +372 -0
- data/lib/luoma/filters/date.rb +19 -0
- data/lib/luoma/filters/default.rb +16 -0
- data/lib/luoma/filters/json.rb +14 -0
- data/lib/luoma/filters/math.rb +84 -0
- data/lib/luoma/filters/size.rb +13 -0
- data/lib/luoma/filters/slice.rb +52 -0
- data/lib/luoma/filters/sort.rb +113 -0
- data/lib/luoma/filters/string.rb +186 -0
- data/lib/luoma/fnv.rb +15 -0
- data/lib/luoma/lexer.rb +106 -0
- data/lib/luoma/lexer_legacy.rb +396 -0
- data/lib/luoma/lexer_unified.rb +279 -0
- data/lib/luoma/loader.rb +50 -0
- data/lib/luoma/loaders/choice_loader.rb +20 -0
- data/lib/luoma/loaders/file_system_loader.rb +75 -0
- data/lib/luoma/loaders/mixins.rb +52 -0
- data/lib/luoma/markup.rb +109 -0
- data/lib/luoma/parser.rb +252 -0
- data/lib/luoma/parser_unified.rb +979 -0
- data/lib/luoma/predicates/blank.rb +19 -0
- data/lib/luoma/predicates/defined.rb +10 -0
- data/lib/luoma/predicates/empty.rb +15 -0
- data/lib/luoma/predicates/type.rb +35 -0
- data/lib/luoma/static_analysis.rb +427 -0
- data/lib/luoma/tags/assign.rb +63 -0
- data/lib/luoma/tags/break.rb +23 -0
- data/lib/luoma/tags/capture.rb +43 -0
- data/lib/luoma/tags/case.rb +137 -0
- data/lib/luoma/tags/comment.rb +17 -0
- data/lib/luoma/tags/continue.rb +23 -0
- data/lib/luoma/tags/define.rb +42 -0
- data/lib/luoma/tags/else.rb +30 -0
- data/lib/luoma/tags/for.rb +108 -0
- data/lib/luoma/tags/if.rb +109 -0
- data/lib/luoma/tags/import.rb +91 -0
- data/lib/luoma/tags/include.rb +77 -0
- data/lib/luoma/tags/output.rb +20 -0
- data/lib/luoma/tags/raw.rb +26 -0
- data/lib/luoma/tags/render.rb +92 -0
- data/lib/luoma/tags/with.rb +55 -0
- data/lib/luoma/template.rb +178 -0
- data/lib/luoma/token.rb +84 -0
- data/lib/luoma/version.rb +5 -0
- data/lib/luoma.rb +75 -0
- data/sig/luoma/cache.rbs +44 -0
- data/sig/luoma/chain_hash.rbs +26 -0
- data/sig/luoma/context.rbs +115 -0
- data/sig/luoma/drop.rbs +44 -0
- data/sig/luoma/drops/block.rbs +10 -0
- data/sig/luoma/drops/expression.rbs +10 -0
- data/sig/luoma/drops/html_safe.rbs +14 -0
- data/sig/luoma/drops/range.rbs +15 -0
- data/sig/luoma/drops/undefined.rbs +27 -0
- data/sig/luoma/environment.rbs +212 -0
- data/sig/luoma/errors.rbs +67 -0
- data/sig/luoma/escape.rbs +15 -0
- data/sig/luoma/expression.rbs +514 -0
- data/sig/luoma/filter.rbs +66 -0
- data/sig/luoma/filters/array.rbs +74 -0
- data/sig/luoma/filters/date.rbs +9 -0
- data/sig/luoma/filters/default.rbs +8 -0
- data/sig/luoma/filters/json.rbs +7 -0
- data/sig/luoma/filters/math.rbs +37 -0
- data/sig/luoma/filters/size.rbs +6 -0
- data/sig/luoma/filters/slice.rbs +10 -0
- data/sig/luoma/filters/sort.rbs +17 -0
- data/sig/luoma/filters/string.rbs +103 -0
- data/sig/luoma/fnv.rbs +3 -0
- data/sig/luoma/lexer.rbs +42 -0
- data/sig/luoma/lexer_legacy.rbs +81 -0
- data/sig/luoma/lexer_unified.rbs +49 -0
- data/sig/luoma/loader.rbs +40 -0
- data/sig/luoma/loaders/choice_loader.rbs +9 -0
- data/sig/luoma/loaders/file_system_loader.rbs +19 -0
- data/sig/luoma/loaders/mixins.rbs +16 -0
- data/sig/luoma/markup.rbs +68 -0
- data/sig/luoma/parser.rbs +105 -0
- data/sig/luoma/parser_unified.rbs +150 -0
- data/sig/luoma/predicates/blank.rbs +6 -0
- data/sig/luoma/predicates/defined.rbs +6 -0
- data/sig/luoma/predicates/empty.rbs +6 -0
- data/sig/luoma/predicates/type.rbs +21 -0
- data/sig/luoma/static_analysis.rbs +141 -0
- data/sig/luoma/tags/assign.rbs +12 -0
- data/sig/luoma/tags/break.rbs +11 -0
- data/sig/luoma/tags/capture.rbs +14 -0
- data/sig/luoma/tags/case.rbs +36 -0
- data/sig/luoma/tags/comment.rbs +11 -0
- data/sig/luoma/tags/continue.rbs +11 -0
- data/sig/luoma/tags/define.rbs +16 -0
- data/sig/luoma/tags/else.rbs +17 -0
- data/sig/luoma/tags/for.rbs +26 -0
- data/sig/luoma/tags/if.rbs +45 -0
- data/sig/luoma/tags/import.rbs +13 -0
- data/sig/luoma/tags/include.rbs +13 -0
- data/sig/luoma/tags/output.rbs +13 -0
- data/sig/luoma/tags/raw.rbs +11 -0
- data/sig/luoma/tags/render.rbs +13 -0
- data/sig/luoma/tags/with.rbs +15 -0
- data/sig/luoma/template.rbs +117 -0
- data/sig/luoma/token.rbs +81 -0
- data/sig/luoma.rbs +11 -0
- data/zensical.toml +363 -0
- data.tar.gz.sig +0 -0
- metadata +233 -0
- metadata.gz.sig +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
module Luoma
|
|
2
|
+
type t_block = Array[String | Luoma::Markup]
|
|
3
|
+
|
|
4
|
+
class Template
|
|
5
|
+
@env: Environment
|
|
6
|
+
|
|
7
|
+
@source: String
|
|
8
|
+
|
|
9
|
+
@nodes: t_block
|
|
10
|
+
|
|
11
|
+
@globals: t_namespace?
|
|
12
|
+
|
|
13
|
+
@name: String
|
|
14
|
+
|
|
15
|
+
@overlay: t_namespace?
|
|
16
|
+
|
|
17
|
+
@up_to_date: untyped
|
|
18
|
+
|
|
19
|
+
@lines: Array[String]?
|
|
20
|
+
|
|
21
|
+
attr_reader env: Environment
|
|
22
|
+
|
|
23
|
+
attr_reader source: String
|
|
24
|
+
|
|
25
|
+
attr_reader nodes: t_block
|
|
26
|
+
|
|
27
|
+
attr_reader globals: t_namespace?
|
|
28
|
+
|
|
29
|
+
attr_reader name: String
|
|
30
|
+
|
|
31
|
+
attr_reader overlay: t_namespace?
|
|
32
|
+
|
|
33
|
+
attr_reader up_to_date: untyped
|
|
34
|
+
|
|
35
|
+
# (Environment,
|
|
36
|
+
# String,
|
|
37
|
+
# t_block,
|
|
38
|
+
# ?globals: t_namespace?,
|
|
39
|
+
# ?name: String?,
|
|
40
|
+
# ?overlay: t_namespace?,
|
|
41
|
+
# ?up_to_date: Proc::_Callable?) -> void
|
|
42
|
+
def initialize: (Environment env, String source, t_block nodes, ?globals: t_namespace?, ?name: String?, ?overlay: t_namespace?, ?up_to_date: untyped?) -> void
|
|
43
|
+
|
|
44
|
+
# (t_namespace?) -> String
|
|
45
|
+
def render: (?t_namespace? data) -> String
|
|
46
|
+
|
|
47
|
+
# (RenderContext, String, ?isolated: bool) -> String
|
|
48
|
+
def render_with_context: (RenderContext context, String buffer, ?isolated: bool) -> String
|
|
49
|
+
|
|
50
|
+
# (t_namespace) -> Template
|
|
51
|
+
def with_globals: (t_namespace namespace) -> Template
|
|
52
|
+
|
|
53
|
+
def lines: () -> Array[String]
|
|
54
|
+
|
|
55
|
+
def up_to_date?: () -> bool
|
|
56
|
+
|
|
57
|
+
# (t_namespace?) -> t_namespace?
|
|
58
|
+
def make_globals: (t_namespace? namespace) -> t_namespace?
|
|
59
|
+
|
|
60
|
+
# Statically analyze this template and report variable, tag and filter usage.
|
|
61
|
+
#
|
|
62
|
+
# (?include_partials: bool) -> Luoma::StaticAnalysis::Result
|
|
63
|
+
def analyze: (?include_partials: bool) -> Luoma::StaticAnalysis::Result
|
|
64
|
+
|
|
65
|
+
# Return an array of variable names used in this template, without path segments.
|
|
66
|
+
#
|
|
67
|
+
# (?include_partials: bool) -> Array[String]
|
|
68
|
+
def variables: (?include_partials: bool) -> Array[String]
|
|
69
|
+
|
|
70
|
+
# Return an array of variables used in this template, including path segments.
|
|
71
|
+
#
|
|
72
|
+
# (?include_partials: bool) -> Array[String]
|
|
73
|
+
def variable_paths: (?include_partials: bool) -> Array[String]
|
|
74
|
+
|
|
75
|
+
# Return an array of variables used in this template, each as an array of segments.
|
|
76
|
+
#
|
|
77
|
+
# (?include_partials: bool) -> Array[Segments]
|
|
78
|
+
def variable_segments: (?include_partials: bool) -> Array[untyped]
|
|
79
|
+
|
|
80
|
+
# Return an array of global variables used in this template, without path segments.
|
|
81
|
+
#
|
|
82
|
+
# (?include_partials: bool) -> Array[String]
|
|
83
|
+
def global_variables: (?include_partials: bool) -> Array[String]
|
|
84
|
+
|
|
85
|
+
# Return an array of global variables used in this template, including path segments.
|
|
86
|
+
#
|
|
87
|
+
# (?include_partials: bool) -> Array[String]
|
|
88
|
+
def global_variable_paths: (?include_partials: bool) -> Array[String]
|
|
89
|
+
|
|
90
|
+
# Return an array of global variables used in this template, each as an array of segments.
|
|
91
|
+
#
|
|
92
|
+
# (?include_partials: bool) -> Array[Segments]
|
|
93
|
+
def global_variable_segments: (?include_partials: bool) -> Array[untyped]
|
|
94
|
+
|
|
95
|
+
# Return the names of all filters used in this template.
|
|
96
|
+
#
|
|
97
|
+
# (?include_partials: bool) -> Array[String]
|
|
98
|
+
def filter_names: (?include_partials: bool) -> Array[String]
|
|
99
|
+
|
|
100
|
+
# Return the names of all tags used in this template.
|
|
101
|
+
#
|
|
102
|
+
# (?include_partials: bool) -> Array[String]
|
|
103
|
+
def tag_names: (?include_partials: bool) -> Array[String]
|
|
104
|
+
|
|
105
|
+
# Return an array of comment nodes found in this template.
|
|
106
|
+
#
|
|
107
|
+
# Comment nodes have `token` and `text` attributes. Use `template.comments.map(&:text)`
|
|
108
|
+
# to get an array of comment strings. Each comment string includes leading and trailing
|
|
109
|
+
# whitespace.
|
|
110
|
+
#
|
|
111
|
+
# Note that this method does not try to load included or render templates when looking.
|
|
112
|
+
# for comment nodes.
|
|
113
|
+
#
|
|
114
|
+
# () -> Array[Comment]
|
|
115
|
+
def comments: () -> Array[Comment]
|
|
116
|
+
end
|
|
117
|
+
end
|
data/sig/luoma/token.rbs
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
module Luoma
|
|
2
|
+
type t_token = [t_token_kind, Integer, Integer]
|
|
3
|
+
|
|
4
|
+
type t_token_kind = (
|
|
5
|
+
:token_add |
|
|
6
|
+
:token_and |
|
|
7
|
+
:token_arrow |
|
|
8
|
+
:token_assign |
|
|
9
|
+
:token_colon |
|
|
10
|
+
:token_comma |
|
|
11
|
+
:token_comment |
|
|
12
|
+
:token_comment_end |
|
|
13
|
+
:token_comment_start |
|
|
14
|
+
:token_contains |
|
|
15
|
+
:token_div |
|
|
16
|
+
:token_dot |
|
|
17
|
+
:token_double_dot |
|
|
18
|
+
:token_double_escaped |
|
|
19
|
+
:token_double_quote |
|
|
20
|
+
:token_double_quoted |
|
|
21
|
+
:token_else |
|
|
22
|
+
:token_eq |
|
|
23
|
+
:token_false |
|
|
24
|
+
:token_float |
|
|
25
|
+
:token_ge |
|
|
26
|
+
:token_gt |
|
|
27
|
+
:token_ident |
|
|
28
|
+
:token_if |
|
|
29
|
+
:token_in |
|
|
30
|
+
:token_int |
|
|
31
|
+
:token_interpolation_end |
|
|
32
|
+
:token_interpolation_start |
|
|
33
|
+
:token_lbrace |
|
|
34
|
+
:token_lbracket |
|
|
35
|
+
:token_le |
|
|
36
|
+
:token_lparen |
|
|
37
|
+
:token_lt |
|
|
38
|
+
:token_mod |
|
|
39
|
+
:token_mul |
|
|
40
|
+
:token_ne |
|
|
41
|
+
:token_nil |
|
|
42
|
+
:token_not |
|
|
43
|
+
:token_null |
|
|
44
|
+
:token_or_else |
|
|
45
|
+
:token_or |
|
|
46
|
+
:token_out_end |
|
|
47
|
+
:token_out_start |
|
|
48
|
+
:token_pipe |
|
|
49
|
+
:token_question |
|
|
50
|
+
:token_rbrace |
|
|
51
|
+
:token_rbracket |
|
|
52
|
+
:token_rparen |
|
|
53
|
+
:token_single_escaped |
|
|
54
|
+
:token_single_quote |
|
|
55
|
+
:token_single_quoted |
|
|
56
|
+
:token_sub |
|
|
57
|
+
:token_tag_end |
|
|
58
|
+
:token_tag_name |
|
|
59
|
+
:token_tag_start |
|
|
60
|
+
:token_text |
|
|
61
|
+
:token_triple_dot |
|
|
62
|
+
:token_true |
|
|
63
|
+
:token_wc |
|
|
64
|
+
:token_eoi |
|
|
65
|
+
:token_unknown |
|
|
66
|
+
:token_hash |
|
|
67
|
+
:token_span |
|
|
68
|
+
:token_blank |
|
|
69
|
+
:token_empty |
|
|
70
|
+
:token_for |
|
|
71
|
+
:token_with |
|
|
72
|
+
:token_as
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
TOKEN_KIND_MAP: Hash[t_token_kind, String]
|
|
76
|
+
|
|
77
|
+
def self.get_token_value: (t_token token, String source) -> String
|
|
78
|
+
|
|
79
|
+
def self.span: (t_token start, t_token stop) -> t_token
|
|
80
|
+
|
|
81
|
+
end
|
data/sig/luoma.rbs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Luoma
|
|
2
|
+
VERSION: String
|
|
3
|
+
|
|
4
|
+
DEFAULT_ENVIRONMENT: Environment
|
|
5
|
+
|
|
6
|
+
#: (String, ?globals: Hash[String, untyped]?) -> Template
|
|
7
|
+
def self.parse: (untyped source, ?globals: untyped?) -> untyped
|
|
8
|
+
|
|
9
|
+
#: (String, ?Hash[String, untyped]?) -> String
|
|
10
|
+
def self.render: (untyped source, ?untyped? data) -> untyped
|
|
11
|
+
end
|
data/zensical.toml
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
# ============================================================================
|
|
2
|
+
#
|
|
3
|
+
# The configuration produced by default is meant to highlight the features
|
|
4
|
+
# that Zensical provides and to serve as a starting point for your own
|
|
5
|
+
# projects.
|
|
6
|
+
#
|
|
7
|
+
# ============================================================================
|
|
8
|
+
|
|
9
|
+
[project]
|
|
10
|
+
|
|
11
|
+
# The site_name is shown in the page header and the browser window title
|
|
12
|
+
#
|
|
13
|
+
# Read more: https://zensical.org/docs/setup/basics/#site_name
|
|
14
|
+
site_name = "Luoma - Ruby"
|
|
15
|
+
|
|
16
|
+
# The site_description is included in the HTML head and should contain a
|
|
17
|
+
# meaningful description of the site content for use by search engines.
|
|
18
|
+
#
|
|
19
|
+
# Read more: https://zensical.org/docs/setup/basics/#site_description
|
|
20
|
+
site_description = "A modern template engine."
|
|
21
|
+
|
|
22
|
+
# The site_author attribute. This is used in the HTML head element.
|
|
23
|
+
#
|
|
24
|
+
# Read more: https://zensical.org/docs/setup/basics/#site_author
|
|
25
|
+
site_author = "James"
|
|
26
|
+
|
|
27
|
+
# The site_url is the canonical URL for your site. When building online
|
|
28
|
+
# documentation you should set this.
|
|
29
|
+
# Read more: https://zensical.org/docs/setup/basics/#site_url
|
|
30
|
+
site_url = "https://jg-rp.github.io/luoma-ruby/"
|
|
31
|
+
|
|
32
|
+
# The copyright notice appears in the page footer and can contain an HTML
|
|
33
|
+
# fragment.
|
|
34
|
+
#
|
|
35
|
+
# Read more: https://zensical.org/docs/setup/basics/#copyright
|
|
36
|
+
copyright = """
|
|
37
|
+
Copyright © 2026 The authors
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
nav = [
|
|
42
|
+
{ "Docs" = [
|
|
43
|
+
{ "Introduction" = "index.md" },
|
|
44
|
+
{ "Setup" = "configuration.md" },
|
|
45
|
+
"template_loaders.md",
|
|
46
|
+
"extension_types.md",
|
|
47
|
+
"undefined_variables.md",
|
|
48
|
+
"template_loaders.md",
|
|
49
|
+
"static_analysis.md",
|
|
50
|
+
{ "Template syntax" = "luoma_for_template_authors.md"}
|
|
51
|
+
]},
|
|
52
|
+
|
|
53
|
+
{ "Tags" = ["tag_reference.md", "custom_tags.md"] },
|
|
54
|
+
{ "Filters" = ["filter_reference.md", "custom_filters.md"] },
|
|
55
|
+
{ "Expressions" = ["expressions.md"] },
|
|
56
|
+
{ "Predicates" = ["predicate_reference.md"] }
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
# With the "extra_css" option you can add your own CSS styling to customize
|
|
60
|
+
# your Zensical project according to your needs. You can add any number of
|
|
61
|
+
# CSS files.
|
|
62
|
+
#
|
|
63
|
+
# The path provided should be relative to the "docs_dir".
|
|
64
|
+
#
|
|
65
|
+
# Read more: https://zensical.org/docs/customization/#additional-css
|
|
66
|
+
#
|
|
67
|
+
#extra_css = ["stylesheets/extra.css"]
|
|
68
|
+
|
|
69
|
+
# With the `extra_javascript` option you can add your own JavaScript to your
|
|
70
|
+
# project to customize the behavior according to your needs.
|
|
71
|
+
#
|
|
72
|
+
# The path provided should be relative to the "docs_dir".
|
|
73
|
+
#
|
|
74
|
+
# Read more: https://zensical.org/docs/customization/#additional-javascript
|
|
75
|
+
#extra_javascript = ["javascripts/extra.js"]
|
|
76
|
+
|
|
77
|
+
# ----------------------------------------------------------------------------
|
|
78
|
+
# Section for configuring theme options
|
|
79
|
+
# ----------------------------------------------------------------------------
|
|
80
|
+
[project.theme]
|
|
81
|
+
|
|
82
|
+
# change this to "classic" to use the traditional Material for MkDocs look.
|
|
83
|
+
#variant = "classic"
|
|
84
|
+
|
|
85
|
+
# Zensical allows you to override specific blocks, partials, or whole
|
|
86
|
+
# templates as well as to define your own templates. To do this, uncomment
|
|
87
|
+
# the custom_dir setting below and set it to a directory in which you
|
|
88
|
+
# keep your template overrides.
|
|
89
|
+
#
|
|
90
|
+
# Read more:
|
|
91
|
+
# - https://zensical.org/docs/customization/#extending-the-theme
|
|
92
|
+
#
|
|
93
|
+
#custom_dir = "overrides"
|
|
94
|
+
|
|
95
|
+
# With the "favicon" option you can set your own image to use as the icon
|
|
96
|
+
# browsers will use in the browser title bar or tab bar. The path provided
|
|
97
|
+
# must be relative to the "docs_dir".
|
|
98
|
+
#
|
|
99
|
+
# Read more:
|
|
100
|
+
# - https://zensical.org/docs/setup/logo-and-icons/#favicon
|
|
101
|
+
# - https://developer.mozilla.org/en-US/docs/Glossary/Favicon
|
|
102
|
+
#
|
|
103
|
+
#favicon = "images/favicon.png"
|
|
104
|
+
|
|
105
|
+
# Zensical supports more than 60 different languages. This means that the
|
|
106
|
+
# labels and tooltips that Zensical's templates produce are translated.
|
|
107
|
+
# The "language" option allows you to set the language used. This language
|
|
108
|
+
# is also indicated in the HTML head element to help with accessibility
|
|
109
|
+
# and guide search engines and translation tools.
|
|
110
|
+
#
|
|
111
|
+
# The default language is "en" (English). It is possible to create
|
|
112
|
+
# sites with multiple languages and configure a language selector. See
|
|
113
|
+
# the documentation for details.
|
|
114
|
+
#
|
|
115
|
+
# Read more:
|
|
116
|
+
# - https://zensical.org/docs/setup/language/
|
|
117
|
+
#
|
|
118
|
+
language = "en"
|
|
119
|
+
|
|
120
|
+
# Zensical provides a number of feature toggles that change the behavior
|
|
121
|
+
# of the documentation site.
|
|
122
|
+
features = [
|
|
123
|
+
# Zensical includes an announcement bar. This feature allows users to
|
|
124
|
+
# dismiss it when they have read the announcement.
|
|
125
|
+
# https://zensical.org/docs/setup/header/#announcement-bar
|
|
126
|
+
"announce.dismiss",
|
|
127
|
+
|
|
128
|
+
# If you have a repository configured and turn on this feature, Zensical
|
|
129
|
+
# will generate an edit button for the page. This works for common
|
|
130
|
+
# repository hosting services.
|
|
131
|
+
# https://zensical.org/docs/setup/repository/#content-actions
|
|
132
|
+
#"content.action.edit",
|
|
133
|
+
|
|
134
|
+
# If you have a repository configured and turn on this feature, Zensical
|
|
135
|
+
# will generate a button that allows the user to view the Markdown
|
|
136
|
+
# code for the current page.
|
|
137
|
+
# https://zensical.org/docs/setup/repository/#content-actions
|
|
138
|
+
#"content.action.view",
|
|
139
|
+
|
|
140
|
+
# Code annotations allow you to add an icon with a tooltip to your
|
|
141
|
+
# code blocks to provide explanations at crucial points.
|
|
142
|
+
# https://zensical.org/docs/authoring/code-blocks/#code-annotations
|
|
143
|
+
"content.code.annotate",
|
|
144
|
+
|
|
145
|
+
# This feature turns on a button in code blocks that allow users to
|
|
146
|
+
# copy the content to their clipboard without first selecting it.
|
|
147
|
+
# https://zensical.org/docs/authoring/code-blocks/#code-copy-button
|
|
148
|
+
"content.code.copy",
|
|
149
|
+
|
|
150
|
+
# Code blocks can include a button to allow for the selection of line
|
|
151
|
+
# ranges by the user.
|
|
152
|
+
# https://zensical.org/docs/authoring/code-blocks/#code-selection-button
|
|
153
|
+
"content.code.select",
|
|
154
|
+
|
|
155
|
+
# Zensical can render footnotes as inline tooltips, so the user can read
|
|
156
|
+
# the footnote without leaving the context of the document.
|
|
157
|
+
# https://zensical.org/docs/authoring/footnotes/#footnote-tooltips
|
|
158
|
+
"content.footnote.tooltips",
|
|
159
|
+
|
|
160
|
+
# If you have many content tabs that have the same titles (e.g., "Python",
|
|
161
|
+
# "JavaScript", "Cobol"), this feature causes all of them to switch to
|
|
162
|
+
# at the same time when the user chooses their language in one.
|
|
163
|
+
# https://zensical.org/docs/authoring/content-tabs/#linked-content-tabs
|
|
164
|
+
"content.tabs.link",
|
|
165
|
+
|
|
166
|
+
# With this feature enabled users can add tooltips to links that will be
|
|
167
|
+
# displayed when the mouse pointer hovers the link.
|
|
168
|
+
# https://zensical.org/docs/authoring/tooltips/#improved-tooltips
|
|
169
|
+
"content.tooltips",
|
|
170
|
+
|
|
171
|
+
# With this feature enabled, Zensical will automatically hide parts
|
|
172
|
+
# of the header when the user scrolls past a certain point.
|
|
173
|
+
# https://zensical.org/docs/setup/header/#automatic-hiding
|
|
174
|
+
# "header.autohide",
|
|
175
|
+
|
|
176
|
+
# Turn on this feature to expand all collapsible sections in the
|
|
177
|
+
# navigation sidebar by default.
|
|
178
|
+
# https://zensical.org/docs/setup/navigation/#navigation-expansion
|
|
179
|
+
# "navigation.expand",
|
|
180
|
+
|
|
181
|
+
# This feature turns on navigation elements in the footer that allow the
|
|
182
|
+
# user to navigate to a next or previous page.
|
|
183
|
+
# https://zensical.org/docs/setup/footer/#navigation
|
|
184
|
+
"navigation.footer",
|
|
185
|
+
|
|
186
|
+
# When section index pages are enabled, documents can be directly attached
|
|
187
|
+
# to sections, which is particularly useful for providing overview pages.
|
|
188
|
+
# https://zensical.org/docs/setup/navigation/#section-index-pages
|
|
189
|
+
"navigation.indexes",
|
|
190
|
+
|
|
191
|
+
# When instant navigation is enabled, clicks on all internal links will be
|
|
192
|
+
# intercepted and dispatched via XHR without fully reloading the page.
|
|
193
|
+
# https://zensical.org/docs/setup/navigation/#instant-navigation
|
|
194
|
+
"navigation.instant",
|
|
195
|
+
|
|
196
|
+
# With instant prefetching, your site will start to fetch a page once the
|
|
197
|
+
# user hovers over a link. This will reduce the perceived loading time
|
|
198
|
+
# for the user.
|
|
199
|
+
# https://zensical.org/docs/setup/navigation/#instant-prefetching
|
|
200
|
+
"navigation.instant.prefetch",
|
|
201
|
+
|
|
202
|
+
# In order to provide a better user experience on slow connections when
|
|
203
|
+
# using instant navigation, a progress indicator can be enabled.
|
|
204
|
+
# https://zensical.org/docs/setup/navigation/#progress-indicator
|
|
205
|
+
#"navigation.instant.progress",
|
|
206
|
+
|
|
207
|
+
# When navigation paths are activated, a breadcrumb navigation is rendered
|
|
208
|
+
# above the title of each page
|
|
209
|
+
# https://zensical.org/docs/setup/navigation/#navigation-path
|
|
210
|
+
"navigation.path",
|
|
211
|
+
|
|
212
|
+
# When pruning is enabled, only the visible navigation items are included
|
|
213
|
+
# in the rendered HTML, reducing the size of the built site by 33% or more.
|
|
214
|
+
# https://zensical.org/docs/setup/navigation/#navigation-pruning
|
|
215
|
+
#"navigation.prune",
|
|
216
|
+
|
|
217
|
+
# When sections are enabled, top-level sections are rendered as groups in
|
|
218
|
+
# the sidebar for viewports above 1220px, but remain as-is on mobile.
|
|
219
|
+
# https://zensical.org/docs/setup/navigation/#navigation-sections
|
|
220
|
+
"navigation.sections",
|
|
221
|
+
|
|
222
|
+
# When tabs are enabled, top-level sections are rendered in a menu layer
|
|
223
|
+
# below the header for viewports above 1220px, but remain as-is on mobile.
|
|
224
|
+
# https://zensical.org/docs/setup/navigation/#navigation-tabs
|
|
225
|
+
"navigation.tabs",
|
|
226
|
+
|
|
227
|
+
# When sticky tabs are enabled, navigation tabs will lock below the header
|
|
228
|
+
# and always remain visible when scrolling down.
|
|
229
|
+
# https://zensical.org/docs/setup/navigation/#sticky-navigation-tabs
|
|
230
|
+
#"navigation.tabs.sticky",
|
|
231
|
+
|
|
232
|
+
# A back-to-top button can be shown when the user, after scrolling down,
|
|
233
|
+
# starts to scroll up again.
|
|
234
|
+
# https://zensical.org/docs/setup/navigation/#back-to-top-button
|
|
235
|
+
"navigation.top",
|
|
236
|
+
|
|
237
|
+
# When anchor tracking is enabled, the URL in the address bar is
|
|
238
|
+
# automatically updated with the active anchor as highlighted in the table
|
|
239
|
+
# of contents.
|
|
240
|
+
# https://zensical.org/docs/setup/navigation/#anchor-tracking
|
|
241
|
+
"navigation.tracking",
|
|
242
|
+
|
|
243
|
+
# When search highlighting is enabled and a user clicks on a search result,
|
|
244
|
+
# Zensical will highlight all occurrences after following the link.
|
|
245
|
+
# https://zensical.org/docs/setup/search/#search-highlighting
|
|
246
|
+
"search.highlight",
|
|
247
|
+
|
|
248
|
+
# When anchor following for the table of contents is enabled, the sidebar
|
|
249
|
+
# is automatically scrolled so that the active anchor is always visible.
|
|
250
|
+
# https://zensical.org/docs/setup/navigation/#anchor-following
|
|
251
|
+
# "toc.follow",
|
|
252
|
+
|
|
253
|
+
# When navigation integration for the table of contents is enabled, it is
|
|
254
|
+
# always rendered as part of the navigation sidebar on the left.
|
|
255
|
+
# https://zensical.org/docs/setup/navigation/#navigation-integration
|
|
256
|
+
#"toc.integrate",
|
|
257
|
+
]
|
|
258
|
+
|
|
259
|
+
# ----------------------------------------------------------------------------
|
|
260
|
+
# You can configure your own logo to be shown in the header using the "logo"
|
|
261
|
+
# option in the "theme" subsection. The logo must be a relative path to a file
|
|
262
|
+
# in your "docs_dir", e.g., to use `docs/assets/logo.png` you would set:
|
|
263
|
+
# ----------------------------------------------------------------------------
|
|
264
|
+
#logo = "assets/logo.png"
|
|
265
|
+
|
|
266
|
+
# ----------------------------------------------------------------------------
|
|
267
|
+
# If you don't have a dedicated project logo, you can use a built-in icon from
|
|
268
|
+
# the icon sets shipped in Zensical. Please note that the setting lives in a
|
|
269
|
+
# different subsection, and that the above take precedence over the icon.
|
|
270
|
+
#
|
|
271
|
+
# Read more:
|
|
272
|
+
# - https://zensical.org/docs/setup/logo-and-icons
|
|
273
|
+
# - https://github.com/zensical/ui/tree/master/dist/.icons
|
|
274
|
+
# ----------------------------------------------------------------------------
|
|
275
|
+
#[project.theme.icon]
|
|
276
|
+
#logo = "lucide/smile"
|
|
277
|
+
|
|
278
|
+
# ----------------------------------------------------------------------------
|
|
279
|
+
# In the "font" subsection you can configure the fonts used. By default, fonts
|
|
280
|
+
# are loaded from Google Fonts, giving you a wide range of choices from a set
|
|
281
|
+
# of suitably licensed fonts. There are options for a normal text font and for
|
|
282
|
+
# a monospaced font used in code blocks.
|
|
283
|
+
# ----------------------------------------------------------------------------
|
|
284
|
+
#[project.theme.font]
|
|
285
|
+
#text = "Inter"
|
|
286
|
+
#code = "Jetbrains Mono"
|
|
287
|
+
|
|
288
|
+
# ----------------------------------------------------------------------------
|
|
289
|
+
# In the "palette" subsection you can configure options for the color scheme.
|
|
290
|
+
# You can configure different color schemes, e.g., to turn on dark mode,
|
|
291
|
+
# that the user can switch between. Each color scheme can be further
|
|
292
|
+
# customized.
|
|
293
|
+
#
|
|
294
|
+
# Read more:
|
|
295
|
+
# - https://zensical.org/docs/setup/colors/
|
|
296
|
+
# ----------------------------------------------------------------------------
|
|
297
|
+
[[project.theme.palette]]
|
|
298
|
+
scheme = "default"
|
|
299
|
+
toggle.icon = "lucide/sun"
|
|
300
|
+
toggle.name = "Switch to dark mode"
|
|
301
|
+
primary = "red"
|
|
302
|
+
accent = "red"
|
|
303
|
+
|
|
304
|
+
[[project.theme.palette]]
|
|
305
|
+
scheme = "slate"
|
|
306
|
+
toggle.icon = "lucide/moon"
|
|
307
|
+
toggle.name = "Switch to light mode"
|
|
308
|
+
primary = "red"
|
|
309
|
+
accent = "red"
|
|
310
|
+
|
|
311
|
+
# ----------------------------------------------------------------------------
|
|
312
|
+
# The "extra" section contains miscellaneous settings.
|
|
313
|
+
# ----------------------------------------------------------------------------
|
|
314
|
+
#[[project.extra.social]]
|
|
315
|
+
#icon = "fontawesome/brands/github"
|
|
316
|
+
#link = "https://github.com/user/repo"
|
|
317
|
+
|
|
318
|
+
# ----------------------------------------------------------------------------
|
|
319
|
+
# In this section you can configure the Markdown extensions that are used when
|
|
320
|
+
# rendering your documentation. We enable the most useful extensions by default,
|
|
321
|
+
# but you can customize this list to your needs.
|
|
322
|
+
#
|
|
323
|
+
# Read more:
|
|
324
|
+
# - https://zensical.org/docs/setup/extensions/
|
|
325
|
+
# ----------------------------------------------------------------------------
|
|
326
|
+
[project.markdown_extensions.abbr]
|
|
327
|
+
[project.markdown_extensions.admonition]
|
|
328
|
+
[project.markdown_extensions.attr_list]
|
|
329
|
+
[project.markdown_extensions.def_list]
|
|
330
|
+
[project.markdown_extensions.footnotes]
|
|
331
|
+
[project.markdown_extensions.md_in_html]
|
|
332
|
+
[project.markdown_extensions.toc]
|
|
333
|
+
permalink = true
|
|
334
|
+
[project.markdown_extensions.pymdownx.arithmatex]
|
|
335
|
+
generic = true
|
|
336
|
+
[project.markdown_extensions.pymdownx.betterem]
|
|
337
|
+
[project.markdown_extensions.pymdownx.caret]
|
|
338
|
+
[project.markdown_extensions.pymdownx.details]
|
|
339
|
+
[project.markdown_extensions.pymdownx.emoji]
|
|
340
|
+
emoji_generator = "zensical.extensions.emoji.to_svg"
|
|
341
|
+
emoji_index = "zensical.extensions.emoji.twemoji"
|
|
342
|
+
|
|
343
|
+
[project.markdown_extensions.pymdownx.highlight]
|
|
344
|
+
anchor_linenums = true
|
|
345
|
+
line_spans = "__span"
|
|
346
|
+
pygments_lang_class = true
|
|
347
|
+
|
|
348
|
+
[project.markdown_extensions.pymdownx.inlinehilite]
|
|
349
|
+
[project.markdown_extensions.pymdownx.keys]
|
|
350
|
+
[project.markdown_extensions.pymdownx.magiclink]
|
|
351
|
+
[project.markdown_extensions.pymdownx.mark]
|
|
352
|
+
[project.markdown_extensions.pymdownx.smartsymbols]
|
|
353
|
+
[project.markdown_extensions.pymdownx.superfences]
|
|
354
|
+
custom_fences = [
|
|
355
|
+
{ name = "mermaid", class = "mermaid", format = "pymdownx.superfences.fence_code_format" }
|
|
356
|
+
]
|
|
357
|
+
|
|
358
|
+
[project.markdown_extensions.pymdownx.tabbed]
|
|
359
|
+
alternate_style = true
|
|
360
|
+
combine_header_slug = true
|
|
361
|
+
[project.markdown_extensions.pymdownx.tasklist]
|
|
362
|
+
custom_checkbox = true
|
|
363
|
+
[project.markdown_extensions.pymdownx.tilde]
|
data.tar.gz.sig
ADDED
|
Binary file
|