From charlesreid1

(Created page with "This is a guide to using Octopress for a (mostly) non-blog site. NOTE: This does not prevent you from using the blog features of Octopress. Fixed content can be served by Octopr...")
 
Line 21: Line 21:
</pre>
</pre>


Now we can either make a new index page with Markdown, or we can make an HTML page by hand.
==Make New Index==
 
We can either make a new index page with Markdown, or we can make an HTML page by hand.


The first way looks like this:
The first way looks like this:
Line 47: Line 49:
<pre>
<pre>
cp /path/to/my/index.html source/.
cp /path/to/my/index.html source/.
</pre>
==Update Navbar==
The navbar "blog" button will still point to the index, so update it to point to the new blog index (or get rid of the blog button altogether, if you don't want it). Edit the file <code>source/_includes/custom/navigation.html</code> and add a "Home" button to point to <code>/</code>. Update "Blog" to point to <code>/blog</code>.
==Update Config==
One last thing you'll have to do is tell Octopress that you've moved the blog index. Edit the <code>Rakefile</code> and change:
<pre>
blog_index_dir  = 'source'
</pre>
to:
<pre>
blog_index_dir  = 'source/blog'
</pre>
</pre>

Revision as of 02:14, 14 April 2014

This is a guide to using Octopress for a (mostly) non-blog site.

NOTE: This does not prevent you from using the blog features of Octopress. Fixed content can be served by Octopress alongside blog content. It just describes how to reorganize content to be less blog-centric.

Non-Blog Landing Page

The first thing to do when deploying a non-blog site with Octopress is fixing the landing page so that it doesn't try and show the latest blog posts. This is straightforward to do.

Move Blog Index

First, we don't want to blow away our existing blog index, because we may want to keep using the blog feature. Assuming you're in your project's octopress directory,

cd cantera-source/octopress/

you can move the existing blog index from source to source/blog:

mv source/index.html source/blog/index.html

Make New Index

We can either make a new index page with Markdown, or we can make an HTML page by hand.

The first way looks like this:

touch source/index.markdown

and index.markdown should look like this:

---
layout: default
---

# Howdy

Welcome to the index.

(Or you can use whatever layout you want.)

If you have your own HTML file, you can just put it there:

cp /path/to/my/index.html source/.

Update Navbar

The navbar "blog" button will still point to the index, so update it to point to the new blog index (or get rid of the blog button altogether, if you don't want it). Edit the file source/_includes/custom/navigation.html and add a "Home" button to point to /. Update "Blog" to point to /blog.

Update Config

One last thing you'll have to do is tell Octopress that you've moved the blog index. Edit the Rakefile and change:

blog_index_dir  = 'source'

to:

blog_index_dir  = 'source/blog'