Document and add configurable navigation links to Jekyll _config.yml

This commit is contained in:
Michael Rose 2013-06-06 11:37:58 -04:00
parent ed416643bb
commit 8f71c3ddd3
3 changed files with 48 additions and 5 deletions

View file

@ -54,7 +54,25 @@ minimal-mistakes/
### _config.yml
Variables you want to update are: site name, description, url, owner info, and your Google Anayltics tracking id and webmaster tool verifications. Most of these variables are used in the .html files found in *_includes* if you need to add or remove anything.
Most of the variables found here are used in the .html files found in *_includes* if you need to add or remove anything. A good place to start would be to change the title, tagline, description, and url of your site. When working locally comment out `url` or else you will get a bunch of broken links because they are absolute and prefixed with `{{ site.url }}` in the various `_includes` and `_layouts`. Just remember to uncomment `url` when building for deployment or pushing to **gh-pages**...
#### Owner/Author Information
Change your name, bio, and avatar photo (100x100 pixels or larger), Twitter url, email, and Google+ url. If you want to link to an external image on Gravatar or something similiar you'll need to edit the path in `author-bio.html` since it assumes it is located in \images.
Including a link to your Google+ profile has the added benefit of displaying [Google Authorship](https://plus.google.com/authorship) if you've went ahead and applied for it. Don't have a Google+ account? Just leave it blank and/or remove `<link rel="author" href="{{ site.owner.google_plus }}">` from `head.html`.
#### Google Analytics and Webmaster Tools
Your Google Analytics ID goes here along with meta tags for [Google Webmaster Tools](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=35179) and [Bing Webmaster Tools](https://ssl.bing.com/webmaster/configure/verify/ownershi) site verification.
#### Top Navigation Links
Edit page/post titles and URLs to include in the site's navigation. If you want to add links to other sites you can hardcode them into `navigation.html`.
#### Other Stuff
The rest is just your average Jekyll config settings. Nothing too crazy here...
### _includes
@ -76,6 +94,16 @@ image:
thumb: thumbnail-image.jpg #keep it square 200x200 px is good
```
The large texture images used in *Minimal Mistakes* are from [Love Textures](http://lovetextures.com), probably a good idea to swap these out with your own photos...
#### Categories
In the sample `_posts` folder you may have noticed `category: articles` in the front matter. I like keeping all posts grouped in the same folder. If you decide to rename or add categories you will need to modify the permalink in `articles.md` along with the filename (if renaming).
For example. Say you want to group all your posts under **blog** instead of articles. In your post add `category: blog` to the front matter, rename or duplicate `articles.md` to `blog.md` and change the permalink in that file to `permalink: /blog/index.html`.
If done correctly `/blog` should be a page listing all posts.
#### Thumbnails for OG and Twitter Cards
Post and page thumbnails work the same way. These are used by [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) meta tags found in *head.html*. If you don't assign a thumbnail the default graphic *(default-thumb.png)* is used. I'd suggest changing this to something more meaningful --- your logo or avatar are good options.
@ -108,6 +136,10 @@ Not sure if this only effects Kramdown or if it's an issue with Markdown in gene
<iframe width="560" height="315" src="http://www.youtube.com/embed/PWf4WUoMXwg" frameborder="0"> </iframe>
```
#### Twitter Cards
Twitter cards make it possible to attach images and post summaries to Tweets that link to your content. Summary Card meta tags have been added to `head.html` to support this, you just need to [validate and apply your domain](https://dev.twitter.com/docs/cards) to turn it on.
## License
This is [MIT](LICENSE) with no added caveats, so feel free to use this Jekyll theme on your site without linking back to me or using a disclaimer.

View file

@ -4,13 +4,14 @@ description: A responsive Jekyll theme with editorial design tendencies.
#Comment out url when working locally to resolve base urls correctly
url: http://mmistakes.github.io/minimal-mistakes
# Owner/author information goes here.
# Owner/author information
owner:
name: Michael Rose
avatar: bio-photo.jpg
bio: "Just another boring, time traveling, tattooed, designer from Buffalo New York."
email: michael@mademistakes.com
twitter: "mmistakes"
# For Google Authorship https://plus.google.com/authorship
google_plus: "https://plus.google.com/118238196859537351707/posts"
# Analytics and webmaster tools stuff goes here
@ -19,6 +20,16 @@ google_verify: UQj93ERU9zgECodaaXgVpkjrFn9UrDMEzVamacSoQ8Y
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify: D81F4C18A6CB3018F64D7C827D953DFD
# Internal pages/posts to include in top navigation
links:
- title: About
url: /about
- title: Articles
url: /articles
- title: Theme Setup
url: /theme-setup
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
future: true
pygments: true

View file

@ -5,9 +5,9 @@
<div class="top-navigation">
<nav role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
<ul>
<li><a href="{{ site.url }}/about">About</a></li>
<li><a href="{{ site.url }}/articles">Sample Posts</a></li>
<li><a href="{{ site.url }}/theme-setup">Theme Setup</a></li>
{% for link in site.links %}
<li><a href="{{ site.url }}{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
<li><i class="icon-feed"></i> <a href="{{ site.url }}/feed.xml" title="Atom/RSS feed">Feed</a>
</ul>
</nav>