Gangmax Blog

Add 'about' Page in Octopress

It needs 2 steps to add the “About” page in Octopress:

Create the “about” page

rake new_page["about"]

This will create a new file at “source/about/index.markdown”, that’s the file you’re going to edit.

Add the link

After the page content is ready, you may want to add an “About” link in the navigation bar erea to get this page. To archive this, edit the file “source/_includes/custom/navigation.html”, by edding the 3rd line below:

<ul class="main-navigation">
<li><a href="{{ root_url }}/">Blog</a></li>
<li><a href="{{ root_url }}/blog/archives">Archives</a></li>
<li><a href="{{ root_url }}/about">About</a></li>

After “rake generate”, the “source/about/index.markdown” will generate “public/about/index.html”, that’s the file whose content will be displayed to the browser.

And this process corrects me one wrong concept: I used to think that it’s the “_deploy” directory which holds the content of the generated artifacts to the browser. So I was searching the generated artifact corresponding to the “source/about/index.markdown” page after I ran “rake generate”, but I got nothing, which confused me, until I realize my knowledge was only partial right.

After running “rake generate”, the published artifacts are generated in the “public” directory other than the “_deploy” directory, the content will be only copied to the “_deploy” directory after running “rake deploy”. That’s why I couldn’t find the content. Before executing “rake deploy”, the content in “_deploy” doesn’t include my last updated content. That’s why I can’t find the “about” page there.