Files
cocoa-eh-hugo-theme/exampleSite/public/posts/index.xml
Nishanth Shanmugham d4353d39e9 Update example site
2015-10-31 16:20:28 -05:00

68 lines
4.6 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 Nishanth Shanmugham</title>
<link>http://localhost:1313/posts/</link>
<description>Recent content in Posts on Nishanth Shanmugham</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-US</language>
<lastBuildDate>Tue, 25 Aug 2015 17:09:14 -0500</lastBuildDate>
<atom:link href="http://localhost:1313/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Use @ instead of HEAD</title>
<link>http://localhost:1313/posts/use-at-instead-of-head/</link>
<pubDate>Tue, 25 Aug 2015 17:09:14 -0500</pubDate>
<guid>http://localhost:1313/posts/use-at-instead-of-head/</guid>
<description>&lt;p&gt;I recently discovered that from git version &lt;a href=&#34;https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.5.txt#L100&#34;&gt;1.8.5&lt;/a&gt; onwards, &lt;code&gt;@&lt;/code&gt; can replace &lt;code&gt;HEAD&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;nv&#34;&gt;$ &lt;/span&gt;git reset --hard @~2
&lt;span class=&#34;nv&#34;&gt;$ &lt;/span&gt;git rebase -i @~10
&lt;span class=&#34;nv&#34;&gt;$ &lt;/span&gt;git diff @~2..@~3
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;And also in most scenarios &lt;code&gt;HEAD&lt;/code&gt; can be left out completely, so you can say:&lt;/p&gt;
&lt;p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;nv&#34;&gt;$ &lt;/span&gt;git reset -- @&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;instead of:&lt;/p&gt;
&lt;p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;span class=&#34;nv&#34;&gt;$ &lt;/span&gt;git reset -- HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;It takes some getting used to, but it&amp;rsquo;s definitely faster than typing &lt;code&gt;HEAD&lt;/code&gt;.&lt;/p&gt;
</description>
</item>
<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>