mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-30 04:08:46 +00:00
fix xml
This commit is contained in:
@@ -12,6 +12,13 @@
|
|||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-description {
|
||||||
|
max-width: 65ch;
|
||||||
|
margin: 0.75rem 0 0;
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 1.05rem;
|
||||||
|
}
|
||||||
|
|
||||||
.archive-list {
|
.archive-list {
|
||||||
max-width: 65ch;
|
max-width: 65ch;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
https://www.andwati.com/* https://andwati.com/:splat 301
|
||||||
/security.txt /.well-known/security.txt 301
|
/security.txt /.well-known/security.txt 301
|
||||||
|
/index.xml /rss.xml 301
|
||||||
|
|||||||
+112
-74
@@ -1,134 +1,172 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom">
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title><xsl:value-of select="/rss/channel/title"/> - RSS Feed</title>
|
<title><xsl:value-of select="/rss/channel/title"/> — RSS Feed</title>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-color: #f9fafb;
|
--bg-color: #e9e9e2;
|
||||||
--text-color: #1a1a1a;
|
--surface-color: #dedecf;
|
||||||
--text-muted: #6b7280;
|
--text-color: #17181c;
|
||||||
--accent-color: #10b981;
|
--text-muted: #68675f;
|
||||||
--hover-color: #059669; /* deeper emerald */
|
--accent-color: #b42318;
|
||||||
--card-bg: #ffffff;
|
--accent-hover: #8e1b12;
|
||||||
--border-color: rgba(0, 0, 0, 0.05);
|
--border-color: rgba(23, 24, 28, 0.16);
|
||||||
|
|
||||||
|
--font-sans: Georgia, 'Source Serif 4', serif;
|
||||||
|
--font-display: Georgia, 'IBM Plex Serif', serif;
|
||||||
|
--font-mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--bg-color: #0a0a0a;
|
--bg-color: #131311;
|
||||||
--text-color: #f9fafb;
|
--surface-color: #1b1a17;
|
||||||
--text-muted: #a1a1aa;
|
--text-color: #e9e7de;
|
||||||
--accent-color: #10b981;
|
--text-muted: #8b8a80;
|
||||||
--hover-color: #34d399; /* lighter emerald */
|
--accent-color: #ff5a46;
|
||||||
--card-bg: #141414;
|
--accent-hover: #ff7c6b;
|
||||||
--border-color: rgba(255, 255, 255, 0.1);
|
--border-color: rgba(233, 231, 222, 0.14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
body {
|
body {
|
||||||
font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
font-family: var(--font-sans);
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 2rem;
|
padding: 3rem 1.5rem;
|
||||||
max-width: 800px;
|
}
|
||||||
margin-left: auto;
|
.wrap {
|
||||||
margin-right: auto;
|
max-width: 720px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: color 0.2s ease;
|
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
color: var(--hover-color);
|
color: var(--accent-hover);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 2.5rem;
|
||||||
padding-bottom: 2rem;
|
padding-bottom: 2rem;
|
||||||
border-bottom: 2px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
.header h1 {
|
.header h1 {
|
||||||
font-size: 2.5rem;
|
font-family: var(--font-display);
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
margin: 0 0 0.5rem 0;
|
margin: 0 0 0.5rem 0;
|
||||||
color: var(--accent-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
.header p {
|
.header p {
|
||||||
font-size: 1.2rem;
|
font-size: 1.05rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
opacity: 0.9;
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
.notice {
|
.notice {
|
||||||
background-color: var(--card-bg);
|
background: var(--surface-color);
|
||||||
padding: 1rem;
|
padding: 1rem 1.25rem;
|
||||||
border-radius: 8px;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
border-left: 4px solid var(--accent-color);
|
border-left: 4px solid var(--accent-color);
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
.notice strong {
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.35rem;
|
||||||
|
color: var(--accent-color);
|
||||||
}
|
}
|
||||||
.item {
|
.item {
|
||||||
background-color: var(--card-bg);
|
padding: 1.75rem 0;
|
||||||
padding: 1.5rem;
|
border-bottom: 1px solid var(--border-color);
|
||||||
border-radius: 8px;
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
}
|
}
|
||||||
.item h2 {
|
.item:first-child {
|
||||||
margin: 0 0 0.5rem 0;
|
padding-top: 0;
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
}
|
||||||
.item .meta {
|
.item .meta {
|
||||||
font-size: 0.9rem;
|
font-family: var(--font-mono);
|
||||||
opacity: 0.7;
|
font-size: 0.8rem;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--text-muted);
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.item h2 {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 0.5rem 0;
|
||||||
|
}
|
||||||
|
.item h2 a {
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
.item h2 a:hover {
|
||||||
|
color: var(--accent-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.item .excerpt {
|
||||||
|
color: var(--text-muted);
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
background-color: var(--accent-color);
|
align-items: center;
|
||||||
color: var(--bg-color);
|
gap: 0.35rem;
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.4rem 0.9rem;
|
||||||
border-radius: 4px;
|
border: 1px solid var(--accent-color);
|
||||||
font-weight: 600;
|
border-radius: 2px;
|
||||||
margin-top: 1rem;
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
letter-spacing: 0.03em;
|
||||||
|
color: var(--accent-color);
|
||||||
}
|
}
|
||||||
.btn:hover {
|
.btn:hover {
|
||||||
background-color: var(--hover-color);
|
background: var(--accent-color);
|
||||||
color: var(--bg-color);
|
color: var(--bg-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="header">
|
<div class="wrap">
|
||||||
<h1><xsl:value-of select="/rss/channel/title"/></h1>
|
<div class="header">
|
||||||
<p><xsl:value-of select="/rss/channel/description"/></p>
|
<h1><xsl:value-of select="/rss/channel/title"/></h1>
|
||||||
</div>
|
<p><xsl:value-of select="/rss/channel/description"/></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<strong>This is an RSS feed.</strong> Subscribe by copying the URL from your address bar into your news reader app.
|
<strong>RSS Feed</strong>
|
||||||
</div>
|
This is a feed, not a normal web page. Copy the URL from your address bar into a feed reader to subscribe.
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<xsl:for-each select="/rss/channel/item">
|
<xsl:for-each select="/rss/channel/item">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<h2>
|
<div class="meta">Published <xsl:value-of select="pubDate"/></div>
|
||||||
<a href="{link}">
|
<h2>
|
||||||
<xsl:value-of select="title"/>
|
<a href="{link}">
|
||||||
</a>
|
<xsl:value-of select="title"/>
|
||||||
</h2>
|
</a>
|
||||||
<div class="meta">
|
</h2>
|
||||||
Published: <xsl:value-of select="pubDate"/>
|
<div class="excerpt">
|
||||||
|
<xsl:value-of select="substring(description, 1, 220)"/>…
|
||||||
|
</div>
|
||||||
|
<a href="{link}" class="btn">Read article →</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</xsl:for-each>
|
||||||
<xsl:value-of select="substring(description, 1, 250)"/>...
|
</div>
|
||||||
</div>
|
|
||||||
<a href="{link}" class="btn">Read article →</a>
|
|
||||||
</div>
|
|
||||||
</xsl:for-each>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?xml-stylesheet type="text/xsl" href="{{ get_url(path="rss.xsl", trailing_slash=false) }}"?>
|
<?xml-stylesheet type="text/xsl" href="{{ get_url(path="rss.xsl", trailing_slash=false) }}"?>
|
||||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
|
||||||
<channel>
|
<channel>
|
||||||
<title>{{ config.title }}</title>
|
<title>{{ config.title }}</title>
|
||||||
<link>{{ config.base_url }}</link>
|
<link>{{ config.base_url }}</link>
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
<author>{{ page.extra.author | default(value=config.extra.author) | default(value="Unknown") }}</author>
|
<author>{{ page.extra.author | default(value=config.extra.author) | default(value="Unknown") }}</author>
|
||||||
<link>{{ page.permalink | safe }}</link>
|
<link>{{ page.permalink | safe }}</link>
|
||||||
<guid>{{ page.permalink | safe }}</guid>
|
<guid>{{ page.permalink | safe }}</guid>
|
||||||
<description xml:base="{{ page.permalink | safe }}">{{ page.content }}</description>
|
<description xml:base="{{ page.permalink | safe }}">{{ page.description | default(value=config.description) }}</description>
|
||||||
|
<content:encoded>{{ page.content }}</content:encoded>
|
||||||
</item>
|
</item>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</channel>
|
</channel>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{% extends "base.html" %} {% block title %}Tag: {{ term.name }} | {{ config.title }}{% endblock
|
{% extends "base.html" %} {% block title %}Tag: {{ term.name }} | {{ config.title }}{% endblock
|
||||||
title %} {% block description %}Posts tagged "{{ term.name }}" on {{ config.title }}{% endblock
|
title %} {% block description %}{{ config.extra.tag_descriptions[term.slug] | default(value='Posts tagged "' ~ term.name ~ '" on ' ~ config.title) }}{% endblock
|
||||||
description %} {% block canonical %}{{ term.permalink }}{% endblock canonical %} {% block og_title
|
description %} {% block canonical %}{{ term.permalink }}{% endblock canonical %} {% block og_title
|
||||||
%}Tag: {{ term.name }} | {{ config.title }}{% endblock og_title %} {% block og_description %}Posts
|
%}Tag: {{ term.name }} | {{ config.title }}{% endblock og_title %} {% block og_description %}{{
|
||||||
tagged "{{ term.name }}" on {{ config.title }}{% endblock og_description %} {% block og_url %}{{
|
config.extra.tag_descriptions[term.slug] | default(value='Posts tagged "' ~ term.name ~ '" on ' ~ config.title) }}{% endblock og_description %} {% block og_url %}{{
|
||||||
term.permalink }}{% endblock og_url %} {% block head %}
|
term.permalink }}{% endblock og_url %} {% block head %}
|
||||||
{% set tag_ld_name = 'Posts tagged "' ~ term.name ~ '" | ' ~ config.title %}
|
{% set tag_ld_name = 'Posts tagged "' ~ term.name ~ '" | ' ~ config.title %}
|
||||||
{% set tag_ld_description = 'Posts tagged "' ~ term.name ~ '" on ' ~ config.title %}
|
{% set tag_ld_description = config.extra.tag_descriptions[term.slug] | default(value='Posts tagged "' ~ term.name ~ '" on ' ~ config.title) %}
|
||||||
<!-- SEO: Tag CollectionPage JSON-LD -->
|
<!-- SEO: Tag CollectionPage JSON-LD -->
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
@@ -51,6 +51,9 @@ term.permalink }}{% endblock og_url %} {% block head %}
|
|||||||
<div class="post-detail">
|
<div class="post-detail">
|
||||||
<header class="post-header list-page-header">
|
<header class="post-header list-page-header">
|
||||||
<h1 class="post-title list-page-title"><span class="term-hash">#</span>{{ term.name }}</h1>
|
<h1 class="post-title list-page-title"><span class="term-hash">#</span>{{ term.name }}</h1>
|
||||||
|
{% if config.extra.tag_descriptions[term.slug] %}
|
||||||
|
<p class="tag-description">{{ config.extra.tag_descriptions[term.slug] }}</p>
|
||||||
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="archive-list">
|
<div class="archive-list">
|
||||||
|
|||||||
@@ -93,6 +93,14 @@ post_nav_prev_label = "Previous"
|
|||||||
post_nav_next_label = "Next"
|
post_nav_next_label = "Next"
|
||||||
share_label = "Share:"
|
share_label = "Share:"
|
||||||
|
|
||||||
|
# Per-tag descriptions (used on /tags/<slug>/ pages instead of the generic
|
||||||
|
# "Posts tagged X" line — keyed by tag slug, not display name)
|
||||||
|
[extra.tag_descriptions]
|
||||||
|
linux = "Practical notes on running Arch-based Linux distributions, from WiFi hotspot quirks to database setup."
|
||||||
|
subresource-integrity = "How Subresource Integrity (SRI) hashes protect a site from tampered third-party scripts and stylesheets."
|
||||||
|
garuda = "Setup notes for Garuda Linux, an Arch-based distribution built for performance."
|
||||||
|
cors = "Notes on Cross-Origin Resource Sharing (CORS) and how browsers enforce cross-origin security policies."
|
||||||
|
|
||||||
# 404 page
|
# 404 page
|
||||||
notfound_status = "Status: Not Found"
|
notfound_status = "Status: Not Found"
|
||||||
notfound_title = "Document Not Found"
|
notfound_title = "Document Not Found"
|
||||||
|
|||||||
Reference in New Issue
Block a user