Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Build and deploy
uses: shalzz/zola-deploy-action@74526e63f38f84b82476349bbcd886b82040ff98 # v0.22.1
uses: shalzz/zola-deploy-action@6dd77deda5de42ab2301e9de1fed784243bef64d # v0.23.3
env:
PAGES_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install and build
if: github.event.action != 'closed'
uses: shalzz/zola-deploy-action@74526e63f38f84b82476349bbcd886b82040ff98 # v0.22.1
uses: shalzz/zola-deploy-action@6dd77deda5de42ab2301e9de1fed784243bef64d # v0.23.3
env:
BUILD_ONLY: true
BUILD_FLAGS: --drafts
Expand Down
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ skip_prefixes = [
"https://www.freedesktop.org/",
"https://www.youtube.com/",
"https://youtu.be/",
"https://cloud-native.slack.com/",
]
#slugify
#search
Expand Down
4 changes: 1 addition & 3 deletions templates/_macros.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% macro render_header() %}
{% set section = get_section(path="_index.md") %}
<a href="{{ section.permalink | safe }}">
<div class="logo">
Expand All @@ -10,7 +9,7 @@
<nav>
{% for page in section.pages %}
{% set exclude_menu = config.extra.juice_exclude_menu | default(value=[]) %}
{% if exclude_menu is not containing(page.title) %}
{% if page.title not in exclude_menu %}
<a class="nav-item subtitle-text" href="{{ page.permalink | safe }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
Expand All @@ -24,4 +23,3 @@
{% endfor %}
{% endif %}
</nav>
{% endmacro render_header %}
19 changes: 9 additions & 10 deletions templates/imported.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{% import "_macros.html" as macros %}
{% extends "page.html" %}

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand All @@ -20,20 +19,20 @@

{% block toc %}
{% set response = load_data(url="https://raw.githubusercontent.com/bootc-dev/bootc/refs/heads/main/" ~ page.extra.fileimport ~ ".md") %}
{% set toc = response | markdown | linebreaksbr | split(pat="<br>") %}
{% set toc = response | markdown | newlines_to_br | split(pat="<br>") %}
{% set mapset = [] %}
{%- for elem in toc %}
{%- if elem is starting_with("<h") %}
{%- set mapset1 = elem | regex_replace(pattern=`<h(?P<level>\d) id="(?P<anchor>.*)">(?P<heading>.*)</h\d>`, rep=`$level,$anchor,$heading`) %}
{% set_global mapset = mapset | concat(with=mapset1) %}
{%- if elem is starting_with(pat="<h") %}
{%- set mapset1 = elem | regex_replace(pattern='<h(?P<level>\\d) id="(?P<anchor>.*)">(?P<heading>.*)</h\\d>', rep="$level,$anchor,$heading") %}
{% set_global mapset = [...mapset, mapset1] %}
{%- endif %}
{%- endfor %}
<div class="toc">
<div class="toc-sticky">
{%- for elem in mapset %}
{%- set id_val = elem | regex_replace(pattern=`(?P<id>\d*),(?P<anchor>.*),(?P<heading>.*)`, rep=`$id`) %}
{%- set anchor = elem | regex_replace(pattern=`(?P<id>\d*),(?P<anchor>.*),(?P<heading>.*)`, rep=`$anchor`) %}
{%- set heading = elem | regex_replace(pattern=`(?P<id>\d*),(?P<anchor>.*),(?P<heading>.*)`, rep=`$heading`) %}
{%- set id_val = elem | regex_replace(pattern='(?P<id>\\d*),(?P<anchor>.*),(?P<heading>.*)', rep="$id") %}
{%- set anchor = elem | regex_replace(pattern='(?P<id>\\d*),(?P<anchor>.*),(?P<heading>.*)', rep="$anchor") %}
{%- set heading = elem | regex_replace(pattern='(?P<id>\\d*),(?P<anchor>.*),(?P<heading>.*)', rep="$heading") %}
{%- if id_val == "1" -%}
<div class="toc-item">
<a href="#{{ anchor }}" class="subtext">{{ heading }}</a>
Expand All @@ -50,4 +49,4 @@
{%- endfor -%}
</div>
</div>
{% endblock toc %}
{% endblock toc %}
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h3 class="title-text text-center">
<div class="heading-text">Latest from the Blog</div>
<ul>
{% set blog = get_section(path="blog/_index.md") %}
{% for post in blog.pages | slice(end=3) %}
{% for post in blog.pages[:3] %}
<li>
<a href="{{ post.permalink | safe }}">
<strong class="title article-title">{{ post.title }}</strong>
Expand Down
4 changes: 1 addition & 3 deletions themes/juice/templates/_macros.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% macro render_header() %}
{% set section = get_section(path="_index.md") %}
<a href="{{ section.permalink | safe }}">
<div class="logo">
Expand All @@ -10,7 +9,7 @@
<nav>
{% for page in section.pages %}
{% set exclude_menu = config.extra.juice_exclude_menu | default(value=[]) %}
{% if exclude_menu is not containing(page.title) %}
{% if page.title not in exclude_menu %}
<a class="nav-item subtitle-text" href="{{ page.permalink | safe }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
Expand All @@ -20,4 +19,3 @@
{% endfor %}
{% endif %}
</nav>
{% endmacro render_header %}
9 changes: 4 additions & 5 deletions themes/juice/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% import "_macros.html" as macros %}
<!DOCTYPE html>
<html lang="{{ lang }}">

Expand All @@ -25,7 +24,7 @@
{% block header %}

<header class="pos-absolute" style="background-color: transparent">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>

<div class="hero">
Expand All @@ -37,12 +36,12 @@

<main>
{% block toc %}
{% if section.toc %}
{% if section is defined and section.toc %}
{% set toc = section.toc %}
{% elif page.toc %}
{% elif page is defined and page.toc %}
{% set toc = page.toc %}
{% endif %}
{% if toc %}
{% if toc is defined and toc %}
<div class="toc">
<div class="toc-sticky">
{% for h in toc %}
Expand Down
6 changes: 2 additions & 4 deletions themes/juice/templates/blog-page.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{% import "_macros.html" as macros %}
{% import "common.html" as common %}
{% extends "base.html" %}

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand All @@ -13,7 +11,7 @@
<div class="blog-meta">
<span class="blog-date">{{ page.date | date(format="%B %d, %Y") }}</span>
{% if page.extra.author %}
<span class="blog-author"> by {{ common::author(id=page.extra.author) }}</span>
<span class="blog-author"> by {{<author id={page.extra.author} config={config} />}}</span>
{% endif %}
</div>
{{ page.content | safe }}
Expand Down
2 changes: 1 addition & 1 deletion themes/juice/templates/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand Down
20 changes: 10 additions & 10 deletions themes/juice/templates/common.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{# render author information, including schema information #}
{% macro author(id) %}
{% component author(id, config) %}

<span itemprop="author" itemscope itemtype="http://schema.org/Person">
{% if config.extra.authors[id] -%}
Expand All @@ -9,30 +9,30 @@
{%- endif %}
</span>

{% endmacro author %}
{% endcomponent author %}

{# return the description of the page #}

{% macro description(page) -%}
{% component description(page) -%}
{% if page.description -%}
{{ page.description }}
{%- elif page.summary -%}
{{ page.summary | striptags }}
{%- endif %}
{%- endmacro description %}
{%- endcomponent description %}

{# generate absolute URL for image #}
{% macro abs_url(page, url) -%}
{% if ( url is starting_with("http://") ) or (url is starting_with("https://")) -%}
{% component abs_url(page, url) -%}
{% if ( url is starting_with(pat="http://") ) or (url is starting_with(pat="https://")) -%}
{{ url | safe }}
{%- elif url is starting_with("/") -%}
{%- elif url is starting_with(pat="/") -%}
{{ get_url(path=url) | safe }}
{%- else -%}
{{ get_url(path=page.path ~ url) | safe }}
{%- endif %}
{%- endmacro abs_url %}
{%- endcomponent abs_url %}

{# generate a link list item #}
{% macro link_list_item(label,href) -%}
{% component link_list_item(label, href) -%}
<a href="{{href}}" target="_blank">{{label}}</a>
{%- endmacro link_list_item %}
{%- endcomponent link_list_item %}
9 changes: 4 additions & 5 deletions themes/juice/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% import "_macros.html" as macros %}
<!DOCTYPE html>
<html lang="{{ lang }}">

Expand All @@ -24,7 +23,7 @@
{% block header %}

<header class="pos-absolute" style="background-color: transparent">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>

<div class="hero">
Expand Down Expand Up @@ -72,12 +71,12 @@ <h3 class="title-text">

<main>
{% block toc %}
{% if section.toc %}
{% if section is defined and section.toc %}
{% set toc = section.toc %}
{% elif page.toc %}
{% elif page is defined and page.toc %}
{% set toc = page.toc %}
{% endif %}
{% if toc %}
{% if toc is defined and toc %}
<div class="toc">
<div class="toc-sticky">
{% for h in toc %}
Expand Down
3 changes: 1 addition & 2 deletions themes/juice/templates/news-page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{% import "_macros.html" as macros %}
{% extends "base.html" %}

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand Down
2 changes: 1 addition & 1 deletion themes/juice/templates/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand Down
3 changes: 1 addition & 2 deletions themes/juice/templates/page.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{% import "_macros.html" as macros %}
{% extends "base.html" %}

{% block title %}{{ page.title }} | {{ super() }} {% endblock title %}

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand Down
3 changes: 1 addition & 2 deletions themes/juice/templates/section.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{% import "_macros.html" as macros %}
{% extends "base.html" %}

{% block title %}{{ section.title }} | {{ super() }} {% endblock title %}

{% block header %}
<header class="box-shadow">
{{ macros::render_header() }}
{% include "_macros.html" %}
</header>
{% endblock header %}

Expand Down
4 changes: 0 additions & 4 deletions themes/juice/templates/shortcodes/impshort.html

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion themes/juice/templates/shortcodes/issue.html

This file was deleted.