Files
cocoa-eh-hugo-theme/exampleSite/public/posts/index.xml
Nishanth Shanmugham b9f26b600a Add example site
* Revert back to using author in params
2015-08-25 00:01:18 -05:00

38 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Posts on Hugo Themes</title>
<link>http://localhost:1313/posts/</link>
<description>Recent content in Posts on Hugo Themes</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-US</language>
<lastBuildDate>Sat, 22 Aug 2015 15:45:30 -0700</lastBuildDate>
<atom:link href="http://localhost:1313/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Redirect webpages using HTML</title>
<link>http://localhost:1313/posts/redirect-webpages-html/</link>
<pubDate>Sat, 22 Aug 2015 15:45:30 -0700</pubDate>
<guid>http://localhost:1313/posts/redirect-webpages-html/</guid>
<description>
&lt;p&gt;Webpage redirection is great for automatically redirecting people visiting an old URL to a new URL where the content has moved to. It can be done using JavaScript, but there is also a convenient HTML-only solution.&lt;/p&gt;
&lt;p&gt;To redirect visitors reaching &lt;code&gt;yourwebsite.com/blog&lt;/code&gt; to &lt;code&gt;yourwebsite.com/posts&lt;/code&gt;, add this to the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of the HTML at &lt;code&gt;yourwebsite.com/blog&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;http-equiv=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;refresh&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;content=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;0;url=&amp;#39;/posts&amp;#39;&amp;quot;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;&amp;lt;link&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;rel=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;canonical&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/posts&amp;quot;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;h3 id=&#34;walkthrough:afdc852818bb97af4efb4d34b2fcce3b&#34;&gt;walkthrough&lt;/h3&gt;
&lt;p&gt;Setting &lt;code&gt;http-equiv=&amp;quot;refresh&amp;quot;&lt;/code&gt; in the first line performs the actual redirect. The number in the &lt;code&gt;content&lt;/code&gt; attribute specified in seconds tells the browser how long to wait before redirecting. In this example, &lt;code&gt;0&lt;/code&gt; redirects immediately. Increasing the wait may be useful for briefly displaying a 404 page before automatically switching to the home page. The &lt;code&gt;url&lt;/code&gt; specfies the destination for the redirect. In this example, we wanted to switch to &lt;code&gt;/posts&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The second line is optional; it helps search engines know which the preferred version of the page is. Usually, this is the redirect destination.&lt;/p&gt;
</description>
</item>
</channel>
</rss>