Update website to use Zola 0.22 with new code block syntax highlighting
This commit is contained in:
parent
00718c5b61
commit
fd0addf61c
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
- name: 🕸 Install Zola
|
- name: 🕸 Install Zola
|
||||||
uses: taiki-e/install-action@v2
|
uses: taiki-e/install-action@v2
|
||||||
with:
|
with:
|
||||||
tool: zola@0.20.0
|
tool: zola@0.22.0
|
||||||
|
|
||||||
- name: 🔍 Check if `website/other` directory changed
|
- name: 🔍 Check if `website/other` directory changed
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@v3
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
public/
|
public/
|
||||||
static/fonts/
|
static/fonts/
|
||||||
static/syntax-highlighting.css
|
|
||||||
static/text-balancer.js
|
static/text-balancer.js
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,9 @@ feed_filenames = ["rss.xml"]
|
||||||
compile_sass = true
|
compile_sass = true
|
||||||
minify_html = false
|
minify_html = false
|
||||||
|
|
||||||
[markdown]
|
[markdown.highlighting]
|
||||||
highlight_code = true
|
error_on_missing_language = false
|
||||||
highlight_theme = "css"
|
theme = "gruvbox-dark-soft"
|
||||||
highlight_themes_css = [
|
|
||||||
{ theme = "kronuz", filename = "syntax-highlighting.css" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Put all your custom variables here
|
# Put all your custom variables here
|
||||||
|
|
|
||||||
|
|
@ -21,86 +21,27 @@ pre {
|
||||||
|
|
||||||
// Container for the element (span or table) containing the lines of code
|
// Container for the element (span or table) containing the lines of code
|
||||||
code {
|
code {
|
||||||
background: initial;
|
background: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
display: block;
|
display: block;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
padding: 20px;
|
padding: 10px 20px;
|
||||||
width: 0;
|
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
width: 0;
|
||||||
|
|
||||||
// Language name in top right corner
|
.giallo-l {
|
||||||
&[data-lang] {
|
display: inline-block;
|
||||||
padding-top: 28px;
|
min-height: 1lh;
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: attr(data-lang);
|
|
||||||
color: rgba(var(--color-seaside-rgb), 0.5);
|
|
||||||
text-transform: lowercase;
|
|
||||||
font-family: "Inter Variable", sans-serif;
|
|
||||||
font-size: 0.75em;
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: italic;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
pointer-events: none;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
line-height: 28px;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-indent: 20px;
|
|
||||||
background: rgba(0, 0, 0, 0.25);
|
|
||||||
|
|
||||||
&[data-lang="sh"] {
|
|
||||||
content: "Shell";
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-lang="rs"] {
|
|
||||||
content: "Rust";
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-lang="js"] {
|
|
||||||
content: "JavaScript";
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-lang="ts"] {
|
|
||||||
content: "TypeScript";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Code blocks with line numbers
|
.giallo-ln {
|
||||||
&[data-linenos] table {
|
display: inline-block;
|
||||||
border-spacing: 0;
|
user-select: none;
|
||||||
margin: -20px;
|
text-align: right;
|
||||||
|
margin-left: -10px;
|
||||||
tr {
|
padding-right: 16px;
|
||||||
&:first-child td {
|
min-width: 3ch;
|
||||||
padding-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child td {
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
&:first-child {
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 10px;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
vertical-align: top;
|
|
||||||
text-align: right;
|
|
||||||
background: rgba(0, 0, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
{%- set title = page.title -%}
|
{%- set title = page.title -%}
|
||||||
{%- set meta_article_type = true -%}
|
{%- set meta_article_type = true -%}
|
||||||
{%- set meta_description = page.extra.summary | default(value = page.content | striptags | safe | linebreaksbr | replace(from = "<br>", to = " ") | replace(from = " ", to = " ") | trim | truncate(length = 200)) -%}
|
{%- set meta_description = page.extra.summary | default(value = page.content | striptags | safe | linebreaksbr | replace(from = "<br>", to = " ") | replace(from = " ", to = " ") | trim | truncate(length = 200)) -%}
|
||||||
{%- set linked_css = ["/syntax-highlighting.css"] -%}
|
|
||||||
{%- set css = ["/template/book.css", "/layout/reading-material.css", "/component/code-snippet.css"] -%}
|
{%- set css = ["/template/book.css", "/layout/reading-material.css", "/component/code-snippet.css"] -%}
|
||||||
{%- set js = ["/js/book.js"] -%}
|
{%- set js = ["/js/book.js"] -%}
|
||||||
{%- endblock head -%}
|
{%- endblock head -%}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue