mirror of
https://github.com/welpo/tabi.git
synced 2026-02-15 23:57:19 +01:00
Merge 742d9ea1fc into e04ed249d6
This commit is contained in:
commit
d1a1d43fb0
15 changed files with 180 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ title = "~/tabi"
|
||||||
description = "tabi es un tema accesible para Zola con búsqueda, soporte multilingüe, JavaScript opcional, una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales."
|
description = "tabi es un tema accesible para Zola con búsqueda, soporte multilingüe, JavaScript opcional, una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales."
|
||||||
generate_feeds = true
|
generate_feeds = true
|
||||||
taxonomies = [{name = "tags", feed = true}]
|
taxonomies = [{name = "tags", feed = true}]
|
||||||
build_search_index = true
|
build_search_index = false
|
||||||
|
|
||||||
[languages.ca]
|
[languages.ca]
|
||||||
title = "~/tabi"
|
title = "~/tabi"
|
||||||
|
|
@ -178,6 +178,8 @@ iine_icon = "thumbs_up" # See https://iine.to/#customise
|
||||||
# Unify like counts across all language versions of the same page.
|
# Unify like counts across all language versions of the same page.
|
||||||
# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language).
|
# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language).
|
||||||
iine_unified_languages = true
|
iine_unified_languages = true
|
||||||
|
# Enable iine like buttons on micro posts.
|
||||||
|
micro_iine = true
|
||||||
|
|
||||||
# Show "Jump to posts" link next to series' title.
|
# Show "Jump to posts" link next to series' title.
|
||||||
# By default, the link appears automatically when a series description exceeds 2000 characters.
|
# By default, the link appears automatically when a series description exceeds 2000 characters.
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ projects_path = "projects/_index.md"
|
||||||
max_projects = 3
|
max_projects = 3
|
||||||
show_projects_first = false
|
show_projects_first = false
|
||||||
social_media_card = "index.jpg"
|
social_media_card = "index.jpg"
|
||||||
|
micro_path = "micro/_index.md"
|
||||||
|
max_micro = 3
|
||||||
|
micro_section_name = "Latest thoughts"
|
||||||
|
show_micro = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
tabi is an accessible [Zola](https://www.getzola.org) theme with [search](@/blog/mastering-tabi-settings/index.md#search), [multi-language support](@/blog/faq-languages/index.md), [optional JavaScript](@/blog/javascript/index.md), a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs.
|
tabi is an accessible [Zola](https://www.getzola.org) theme with [search](@/blog/mastering-tabi-settings/index.md#search), [multi-language support](@/blog/faq-languages/index.md), [optional JavaScript](@/blog/javascript/index.md), a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs.
|
||||||
|
|
|
||||||
6
content/micro/2025-11-08-1430.md
Normal file
6
content/micro/2025-11-08-1430.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "Start microblogs to capture ideas"
|
||||||
|
date = 2025-11-08T14:30:00+08:00
|
||||||
|
+++
|
||||||
|
|
||||||
|
Why Microblog: Thoughts decay without capture; short posts reduce friction between idea and publication.
|
||||||
6
content/micro/2025-11-08-2211.md
Normal file
6
content/micro/2025-11-08-2211.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "Start writing"
|
||||||
|
date = 2025-11-08T22:11:53+08:00
|
||||||
|
+++
|
||||||
|
|
||||||
|
Writing clarifies thinking and compounds your expertise into searchable, permanent knowledge capital.
|
||||||
6
content/micro/2025-11-08-2226.md
Normal file
6
content/micro/2025-11-08-2226.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "SSG is simple"
|
||||||
|
date = 2025-11-08T22:26:37+08:00
|
||||||
|
+++
|
||||||
|
|
||||||
|
Why use SSG: Pre-rendered HTML eliminates servers, databases, and runtime vulnerabilities while maximizing speed.
|
||||||
6
content/micro/2025-11-08-2300.md
Normal file
6
content/micro/2025-11-08-2300.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "Just ship the code"
|
||||||
|
date = 2025-11-08T23:00:00+08:00
|
||||||
|
+++
|
||||||
|
|
||||||
|
Shipping code is better than perfect code. Ship it.
|
||||||
8
content/micro/_index.md
Normal file
8
content/micro/_index.md
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
+++
|
||||||
|
title = "Micro"
|
||||||
|
description = "Short blogs"
|
||||||
|
sort_by = "date"
|
||||||
|
template = "section.html"
|
||||||
|
paginate_by = 20
|
||||||
|
generate_feeds = true
|
||||||
|
+++
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
@use 'parts/_image-hover.scss';
|
@use 'parts/_image-hover.scss';
|
||||||
@use 'parts/_image-toggler.scss';
|
@use 'parts/_image-toggler.scss';
|
||||||
@use 'parts/_image.scss';
|
@use 'parts/_image.scss';
|
||||||
|
@use 'parts/_micro.scss';
|
||||||
@use 'parts/_misc.scss';
|
@use 'parts/_misc.scss';
|
||||||
@use 'parts/_multilingual_quote.scss';
|
@use 'parts/_multilingual_quote.scss';
|
||||||
@use 'parts/_pagination.scss';
|
@use 'parts/_pagination.scss';
|
||||||
|
|
|
||||||
65
sass/parts/_micro.scss
Normal file
65
sass/parts/_micro.scss
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
#micro-posts {
|
||||||
|
margin-top: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.micro-list {
|
||||||
|
.micro-entry {
|
||||||
|
border-bottom: 0.5px solid var(--divider-color);
|
||||||
|
padding: 1.3rem 0;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.micro-date {
|
||||||
|
display: inline-block;
|
||||||
|
transition: color 0.15s;
|
||||||
|
color: var(--meta-color);
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: transparent;
|
||||||
|
color: var(--primary-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.micro-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-bottom: 0.35rem;
|
||||||
|
|
||||||
|
.iine-button {
|
||||||
|
color: var(--meta-color);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.micro-text {
|
||||||
|
color: var(--text-color);
|
||||||
|
font-weight: 350;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0.5rem 0 1rem;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1100px) {
|
||||||
|
#micro-posts {
|
||||||
|
margin-top: 3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
29
scripts/new-micro.sh
Executable file
29
scripts/new-micro.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Quick micro post generator - eliminates title/date friction
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Get current timestamp
|
||||||
|
NOW=$(date +"%Y-%m-%dT%H:%M:%S%:z")
|
||||||
|
FILENAME=$(date +"%Y-%m-%d-%H%M")
|
||||||
|
TITLE=$(date +"%Y-%m-%d %H:%M")
|
||||||
|
|
||||||
|
# Get content from stdin or prompt
|
||||||
|
if [ -t 0 ]; then
|
||||||
|
echo "Enter micro post content (Ctrl+D when done):"
|
||||||
|
CONTENT=$(cat)
|
||||||
|
else
|
||||||
|
CONTENT=$(cat)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create post
|
||||||
|
cat > "content/micro/${FILENAME}.md" <<EOF
|
||||||
|
+++
|
||||||
|
title = "${TITLE}"
|
||||||
|
date = ${NOW}
|
||||||
|
+++
|
||||||
|
|
||||||
|
${CONTENT}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Created: content/micro/${FILENAME}.md"
|
||||||
|
|
@ -9,6 +9,8 @@ content="default-src 'self'
|
||||||
{%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%}
|
{%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%}
|
||||||
{%- if page -%}
|
{%- if page -%}
|
||||||
{%- set iine_enabled = macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%}
|
{%- set iine_enabled = macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%}
|
||||||
|
{%- elif section and section.extra.show_micro | default(value=false) and config.extra.micro_iine | default(value=false) -%}
|
||||||
|
{%- set iine_enabled = true -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if page -%}
|
{%- if page -%}
|
||||||
{%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%}
|
{%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%}
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,6 @@
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{# Add iine.js for the like button #}
|
{# Add iine.js for the like button #}
|
||||||
{%- if page and macros_settings::evaluate_setting_priority(setting="iine", page=page_s, section=section_s, default_global_value=false) == "true" -%}
|
{%- if (page and macros_settings::evaluate_setting_priority(setting="iine", page=page_s, section=section_s, default_global_value=false) == "true") or (section and section.extra.show_micro | default(value=false) and config.extra.micro_iine | default(value=false)) -%}
|
||||||
<script defer src="https://cdn.jsdelivr.net/gh/welpo/iine@main/iine.mini.js"></script>
|
<script defer src="https://cdn.jsdelivr.net/gh/welpo/iine@main/iine.mini.js"></script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
|
||||||
38
templates/partials/main_page_micro_list.html
Normal file
38
templates/partials/main_page_micro_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{% if section.extra.show_micro | default(value=false) %}
|
||||||
|
{% if section.extra.micro_path %}
|
||||||
|
{%- set micro_section = get_section(path=section.extra.micro_path) -%}
|
||||||
|
{%- if micro_section -%}
|
||||||
|
{%- set show_pages = micro_section.pages -%}
|
||||||
|
{%- set max_micro = section.extra.max_micro | default(value=5) -%}
|
||||||
|
{%- set section_name = section.extra.micro_section_name | default(value="Latest Thoughts") -%}
|
||||||
|
<div id="micro-posts">
|
||||||
|
<h1 class="title-container section-title bottom-divider">{{ section_name }}</h1>
|
||||||
|
<div class="micro-list">
|
||||||
|
{% for post in show_pages | slice(end=max_micro) %}
|
||||||
|
<div class="micro-entry">
|
||||||
|
<div class="micro-meta">
|
||||||
|
<a class="micro-date no-hover-padding" href="{{ post.permalink | safe }}">
|
||||||
|
<time datetime="{{ post.date | date(format='%Y-%m-%dT%H:%M:%S') }}">
|
||||||
|
{{ macros_format_date::format_date(date=post.date, short=true, language_strings=language_strings) }} · {{ post.date | date(format='%H:%M') }}
|
||||||
|
</time>
|
||||||
|
</a>
|
||||||
|
{%- if config.extra.micro_iine | default(value=false) -%}
|
||||||
|
{%- set slug = post.path -%}
|
||||||
|
{%- include "partials/iine_button.html" -%}
|
||||||
|
{%- endif -%}
|
||||||
|
</div>
|
||||||
|
<div class="micro-text">
|
||||||
|
{{ post.content | safe }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{%- if show_pages | length > max_micro -%}
|
||||||
|
<div class="all-posts">
|
||||||
|
<a href="{{ get_url(path=micro_section.path, lang=lang) }}/">All {{ section_name | lower }} <span class="arrow">⟶</span></a>
|
||||||
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
@ -52,6 +52,9 @@
|
||||||
{%- include "partials/main_page_posts_list.html" -%}
|
{%- include "partials/main_page_posts_list.html" -%}
|
||||||
{%- include "partials/main_page_projects_list.html" -%}
|
{%- include "partials/main_page_projects_list.html" -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{# Add micro posts section #}
|
||||||
|
{%- include "partials/main_page_micro_list.html" -%}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{%- include "partials/extra_features.html" -%}
|
{%- include "partials/extra_features.html" -%}
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,8 @@ iine_icon = "heart" # See https://iine.to/#customise
|
||||||
# Unify like counts across all language versions of the same page.
|
# Unify like counts across all language versions of the same page.
|
||||||
# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language).
|
# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language).
|
||||||
iine_unified_languages = true
|
iine_unified_languages = true
|
||||||
|
# Enable iine like buttons on micro posts.
|
||||||
|
micro_iine = false
|
||||||
|
|
||||||
# Show "Jump to posts" link next to series' title.
|
# Show "Jump to posts" link next to series' title.
|
||||||
# By default, the link appears automatically when a series description exceeds 2000 characters.
|
# By default, the link appears automatically when a series description exceeds 2000 characters.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue