added documentation for setting up a landing page with Octopress

This commit is contained in:
Brandon Mathis 2011-08-16 01:50:22 -04:00
parent 75c76fcfd4
commit 6e6759c605

View File

@ -15,6 +15,25 @@ Shortly after the 2.0 release Octopress added the `source/_includes/custom` dire
post/ # post metadata, sharing & comment partials post/ # post metadata, sharing & comment partials
_layouts/ # layouts for pages, posts & category archives _layouts/ # layouts for pages, posts & category archives
<h2 id="landing_page">Landing Page vs Blog Index</h2>
By default Octopress generates your blog's post index at your site's root directory.
If you'd rather publish your blog index somewhere else like `blog/index.html` do this in your terminal.
``` sh
mv source/index.html source/blog/index.html
rake new_page[index.html]
```
Next you'll want to update your `Rakefile` to be sure your new blog index is preserved when you [update Octopress](/docs/updating).
``` ruby
blog_index_dir = 'source/blog'
```
Remember to update the main navigation for your site, since currently the blog link points to `/`. Skip down to the section on [changing navigation](#changing_navigation), add a 'home' link and update the 'blog' link to point to `/blog/`.
Finally, `source/index.html` can become the landing page of your wildest dreams.
## Changing the &lt;HEAD&gt; ## Changing the &lt;HEAD&gt;
If you want to add to the `<HEAD>`take a look at `/source/_includes/custom/head.html`. If you want to add to the `<HEAD>`take a look at `/source/_includes/custom/head.html`.
@ -25,7 +44,6 @@ If you want to add to the `<HEAD>`take a look at `/source/_includes/custom/head.
Here you can easily change or remove the [Google Webfonts](http://google.com/webfonts), insert javascripts, etc. Here you can easily change or remove the [Google Webfonts](http://google.com/webfonts), insert javascripts, etc.
### Changing the sidebar ### Changing the sidebar
Octopress integrates with some [3rd party services](/docs/configuring/#third_party) like Twitter, Pinboard and Delicious which appear in the sidebar. Octopress integrates with some [3rd party services](/docs/configuring/#third_party) like Twitter, Pinboard and Delicious which appear in the sidebar.
In the `_config.yml` you can rearrange these, create custom sidebars for each layout, and add your own sidebar sections. In the `_config.yml` you can rearrange these, create custom sidebars for each layout, and add your own sidebar sections.
@ -67,7 +85,7 @@ The header title and subtitle should be configured in the `_config.yml` If you w
{% render_partial ../.themes/classic/source/_includes/custom/header.html raw %} {% render_partial ../.themes/classic/source/_includes/custom/header.html raw %}
{% endcodeblock %} {% endcodeblock %}
### Changing the Navigation <h3 id="changing_navigation">Changing the Navigation</h3>
To change or add links to the main navigation, edit `/source/_includes/custom/navigation.html` which looks like this: To change or add links to the main navigation, edit `/source/_includes/custom/navigation.html` which looks like this: