mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +02:00
38 lines
3.0 KiB
XML
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>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>To redirect visitors reaching <code>yourwebsite.com/blog</code> to <code>yourwebsite.com/posts</code>, add this to the <code>&lt;head&gt;</code> section of the HTML at <code>yourwebsite.com/blog</code>:</p>
|
|
|
|
<p><div class="highlight"><pre><span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">&quot;refresh&quot;</span> <span class="na">content=</span><span class="s">&quot;0;url=&#39;/posts&#39;&quot;</span> <span class="nt">/&gt;</span>
|
|
<span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;canonical&quot;</span> <span class="na">href=</span><span class="s">&quot;/posts&quot;</span> <span class="nt">/&gt;</span>
|
|
</pre></div>
|
|
</p>
|
|
|
|
<h3 id="walkthrough:afdc852818bb97af4efb4d34b2fcce3b">walkthrough</h3>
|
|
|
|
<p>Setting <code>http-equiv=&quot;refresh&quot;</code> in the first line performs the actual redirect. The number in the <code>content</code> attribute specified in seconds tells the browser how long to wait before redirecting. In this example, <code>0</code> redirects immediately. Increasing the wait may be useful for briefly displaying a 404 page before automatically switching to the home page. The <code>url</code> specfies the destination for the redirect. In this example, we wanted to switch to <code>/posts</code>.</p>
|
|
|
|
<p>The second line is optional; it helps search engines know which the preferred version of the page is. Usually, this is the redirect destination.</p>
|
|
</description>
|
|
</item>
|
|
|
|
</channel>
|
|
</rss> |