aboutsummaryrefslogtreecommitdiff
path: root/build/rss-click
diff options
context:
space:
mode:
Diffstat (limited to 'build/rss-click')
-rw-r--r--build/rss-click/index.html17
1 files changed, 2 insertions, 15 deletions
diff --git a/build/rss-click/index.html b/build/rss-click/index.html
index 5913050..dd0ab24 100644
--- a/build/rss-click/index.html
+++ b/build/rss-click/index.html
@@ -3,11 +3,12 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="color-scheme" content="dark light">
<link rel="icon" href="data:,">
<title>Clickable Links Inside XML</title>
<link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
<link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" />
-<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
+<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}blockquote{background:rgba(0,0,0,0.1);border-left:4px solid;padding-left:5px;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
</head>
<nav>
@@ -16,29 +17,20 @@
<main>
<h1 id="clickable-links-inside-xml">Clickable Links Inside XML</h1>
-
<p>2022-06-20</p>
-
<p>With the recent patch to the Shinobi Website project, I thought it would be best to share my experience implementing clickable links inside a rendered XML RSS file directly through a browser. This is made possible thanks to the awesome power of XSL formatting.</p>
-
<p>Before we begin, it should be noted that both Safari for macOS and <em>all</em> browsers on iOS do NOT support the ability to render XML files. Instead you are required to download the feeds as static files to your system. Major bummmer. Hopefully this will be fixed in the near future.</p>
-
<h2 id="the-code">The Code</h2>
-
<p>Rendering your entry links as interactive URLs is fairly intuitive. You just need to:</p>
-
<ol>
<li><p>Tell the file which tag it needs to render as the &#8220;a:link&#8221; element</p></li>
<li><p>Set the inner child attribute to &#8220;href&#8221;</p></li>
<li><p>Set the value of that attribute to use the entry&#8217;s <code>link</code> parameter</p>
-
<p><a href="/xsl:attribute">&#47;xsl:attribute</a>
<a href="/xsl:element">&#47;xsl:element</a></p></li>
</ol>
-
<p>In the instance above I am rendering the entry title as a clickable element which will direct users to the specific entry URL. You could simply render the full entry link URL text as the interactive link if you prefer. Something like:</p>
-
<pre><code>&#60;xsl:element name="a"&#62;
&#60;xsl:attribute name="href"&#62;
&#60;xsl:value-of select="link"&#47;&#62;
@@ -46,15 +38,10 @@
&#60;pre&#62;&#60;xsl:value-of select="link"&#47;&#62;&#60;&#47;pre&#62;
&#60;&#47;xsl:element&#62;
</code></pre>
-
<h2 id="live-example">Live Example</h2>
-
<p>In a supported browser, you can see the code in action here: <a href="https://pblog.bt.ht/feed.xml">https:&#47;&#47;pblog.bt.ht&#47;feed.xml</a></p>
-
<p>That&#8217;s really all there is to it.</p>
-
<h2 id="refs">Refs</h2>
-
<ol>
<li><a href="https://shinobi.bt.ht/posts/patch-3.txt">https:&#47;&#47;shinobi.bt.ht&#47;posts&#47;patch-3.txt</a></li>
</ol>