aboutsummaryrefslogtreecommitdiff
path: root/build/rss-click/index.html
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-07-02 14:22:21 -0400
committerBradley Taunt <bt@btxx.org>2024-07-02 14:22:21 -0400
commit3f6a9546ec13063d0d5bdf21d30a93d3e8aa6050 (patch)
tree947985c4eda1bceb1910bc01739c32fd0baad181 /build/rss-click/index.html
parent14074019d62d98885c4c764401a9e7e1fd129f79 (diff)
Rebuild changes based off latest barfHEADmaster
Diffstat (limited to 'build/rss-click/index.html')
-rw-r--r--build/rss-click/index.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/build/rss-click/index.html b/build/rss-click/index.html
new file mode 100644
index 0000000..cb08480
--- /dev/null
+++ b/build/rss-click/index.html
@@ -0,0 +1,69 @@
+<!doctype html>
+<html lang="en">
+<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;}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>
+ <a href="#menu">Menu &darr;</a>
+</nav>
+
+<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;
+ &#60;&#47;xsl:attribute&#62;
+ &#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>
+<footer role="contentinfo">
+ <h2>Menu Navigation</h2>
+ <ul id="menu">
+ <li><a href="/">Home</a></li>
+ <li><a href="/projects">Projects</a></li>
+ <li><a href="/uses">Uses</a></li>
+ <li><a href="/wiki">Wiki</a></li>
+ <li><a href="/resume">Resume</a></li>
+ <li><a href="/colophon">Colophon</a></li>
+ <li><a href="/now">Now</a></li>
+ <li><a href="/donate">Donate</a></li>
+ <li><a href="/atom.xml">RSS</a></li>
+ <li><a href="#top">&uarr; Top of the page</a></li>
+ </ul>
+ <small>
+ Built with <a href="https://barf.btxx.org">barf</a>. <br>
+ Feeds: <a href="/atom.xml">Atom</a> & <a href="/rss.xml">RSS</a><br>
+ Maintained with ♥ for the web. <br>
+ Proud supporter of <a href="https://usefathom.com/ref/DKHJVX">Fathom</a> &amp; <a href="https://nextdns.io/?from=74d3p3h8">NextDNS</a>. <br>
+ The content for this site is <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>.<br> The <a href="https://git.sr.ht/~bt/bt.ht">code for this site</a> is <a href="https://git.sr.ht/~bt/bt.ht/tree/master/item/LICENSE">MIT</a>.
+ </small>
+</footer> \ No newline at end of file