mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 09:22:53 +00:00
fix xml
This commit is contained in:
@@ -12,6 +12,13 @@
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.tag-description {
|
||||
max-width: 65ch;
|
||||
margin: 0.75rem 0 0;
|
||||
color: var(--text-muted);
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.archive-list {
|
||||
max-width: 65ch;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
https://www.andwati.com/* https://andwati.com/:splat 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"?>
|
||||
<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:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
<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 name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<style>
|
||||
:root {
|
||||
--bg-color: #f9fafb;
|
||||
--text-color: #1a1a1a;
|
||||
--text-muted: #6b7280;
|
||||
--accent-color: #10b981;
|
||||
--hover-color: #059669; /* deeper emerald */
|
||||
--card-bg: #ffffff;
|
||||
--border-color: rgba(0, 0, 0, 0.05);
|
||||
--bg-color: #e9e9e2;
|
||||
--surface-color: #dedecf;
|
||||
--text-color: #17181c;
|
||||
--text-muted: #68675f;
|
||||
--accent-color: #b42318;
|
||||
--accent-hover: #8e1b12;
|
||||
--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) {
|
||||
:root {
|
||||
--bg-color: #0a0a0a;
|
||||
--text-color: #f9fafb;
|
||||
--text-muted: #a1a1aa;
|
||||
--accent-color: #10b981;
|
||||
--hover-color: #34d399; /* lighter emerald */
|
||||
--card-bg: #141414;
|
||||
--border-color: rgba(255, 255, 255, 0.1);
|
||||
--bg-color: #131311;
|
||||
--surface-color: #1b1a17;
|
||||
--text-color: #e9e7de;
|
||||
--text-muted: #8b8a80;
|
||||
--accent-color: #ff5a46;
|
||||
--accent-hover: #ff7c6b;
|
||||
--border-color: rgba(233, 231, 222, 0.14);
|
||||
}
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-family: var(--font-sans);
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 2rem;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 3rem 1.5rem;
|
||||
}
|
||||
.wrap {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
a {
|
||||
color: var(--accent-color);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--hover-color);
|
||||
color: var(--accent-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
.header {
|
||||
margin-bottom: 3rem;
|
||||
margin-bottom: 2.5rem;
|
||||
padding-bottom: 2rem;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 2.5rem;
|
||||
font-family: var(--font-display);
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 0.5rem 0;
|
||||
color: var(--accent-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
.header p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.05rem;
|
||||
margin: 0;
|
||||
opacity: 0.9;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.notice {
|
||||
background-color: var(--card-bg);
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 2rem;
|
||||
background: var(--surface-color);
|
||||
padding: 1rem 1.25rem;
|
||||
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 {
|
||||
background-color: var(--card-bg);
|
||||
padding: 1.5rem;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 1.5rem;
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 1.75rem 0;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
.item h2 {
|
||||
margin: 0 0 0.5rem 0;
|
||||
font-size: 1.5rem;
|
||||
.item:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
.item .meta {
|
||||
font-size: 0.9rem;
|
||||
opacity: 0.7;
|
||||
font-family: var(--font-mono);
|
||||
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;
|
||||
}
|
||||
.btn {
|
||||
display: inline-block;
|
||||
background-color: var(--accent-color);
|
||||
color: var(--bg-color);
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
margin-top: 1rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.4rem 0.9rem;
|
||||
border: 1px solid var(--accent-color);
|
||||
border-radius: 2px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.03em;
|
||||
color: var(--accent-color);
|
||||
}
|
||||
.btn:hover {
|
||||
background-color: var(--hover-color);
|
||||
background: var(--accent-color);
|
||||
color: var(--bg-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1><xsl:value-of select="/rss/channel/title"/></h1>
|
||||
<p><xsl:value-of select="/rss/channel/description"/></p>
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<div class="header">
|
||||
<h1><xsl:value-of select="/rss/channel/title"/></h1>
|
||||
<p><xsl:value-of select="/rss/channel/description"/></p>
|
||||
</div>
|
||||
|
||||
<div class="notice">
|
||||
<strong>This is an RSS feed.</strong> Subscribe by copying the URL from your address bar into your news reader app.
|
||||
</div>
|
||||
<div class="notice">
|
||||
<strong>RSS Feed</strong>
|
||||
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">
|
||||
<xsl:for-each select="/rss/channel/item">
|
||||
<div class="item">
|
||||
<h2>
|
||||
<a href="{link}">
|
||||
<xsl:value-of select="title"/>
|
||||
</a>
|
||||
</h2>
|
||||
<div class="meta">
|
||||
Published: <xsl:value-of select="pubDate"/>
|
||||
<div class="items">
|
||||
<xsl:for-each select="/rss/channel/item">
|
||||
<div class="item">
|
||||
<div class="meta">Published <xsl:value-of select="pubDate"/></div>
|
||||
<h2>
|
||||
<a href="{link}">
|
||||
<xsl:value-of select="title"/>
|
||||
</a>
|
||||
</h2>
|
||||
<div class="excerpt">
|
||||
<xsl:value-of select="substring(description, 1, 220)"/>…
|
||||
</div>
|
||||
<a href="{link}" class="btn">Read article →</a>
|
||||
</div>
|
||||
<div>
|
||||
<xsl:value-of select="substring(description, 1, 250)"/>...
|
||||
</div>
|
||||
<a href="{link}" class="btn">Read article →</a>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?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>
|
||||
<title>{{ config.title }}</title>
|
||||
<link>{{ config.base_url }}</link>
|
||||
@@ -16,7 +16,8 @@
|
||||
<author>{{ page.extra.author | default(value=config.extra.author) | default(value="Unknown") }}</author>
|
||||
<link>{{ page.permalink | safe }}</link>
|
||||
<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>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% 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
|
||||
%}Tag: {{ term.name }} | {{ config.title }}{% endblock og_title %} {% block og_description %}Posts
|
||||
tagged "{{ term.name }}" on {{ config.title }}{% endblock og_description %} {% block og_url %}{{
|
||||
%}Tag: {{ term.name }} | {{ config.title }}{% endblock og_title %} {% block og_description %}{{
|
||||
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 %}
|
||||
{% 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 -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
@@ -51,6 +51,9 @@ term.permalink }}{% endblock og_url %} {% block head %}
|
||||
<div class="post-detail">
|
||||
<header class="post-header list-page-header">
|
||||
<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>
|
||||
|
||||
<div class="archive-list">
|
||||
|
||||
@@ -93,6 +93,14 @@ post_nav_prev_label = "Previous"
|
||||
post_nav_next_label = "Next"
|
||||
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
|
||||
notfound_status = "Status: Not Found"
|
||||
notfound_title = "Document Not Found"
|
||||
|
||||
Reference in New Issue
Block a user