From 6d9897151762aca1bf5497b76767de98719bd487 Mon Sep 17 00:00:00 2001
From: Tom Johnson
Date: Sun, 17 May 2015 19:01:41 -0700
Subject: [PATCH] Made sidebar configurable based on product, platform, version
properties in configuration file. Also added ability to add series that link
together pages.
---
_config.yml | 58 +++-----
_data/sidebar.yml | 178 +++++++++++++++++++++++-
_data/tags.yml | 1 +
_data/topnav.yml | 21 +++
_includes/custom/acme_series.html | 19 +++
_includes/custom/conditions.html | 32 +++--
_includes/custom/homepage.md | 33 +++++
_includes/custom/links.html | 11 ++
_includes/pagination.html | 10 --
_includes/sidebar.html | 9 +-
_includes/topnav.html | 12 +-
_layouts/page.html | 21 +--
build_designer.sh | 2 +-
build_designer_pdf.sh | 6 +-
build_designer_prince.sh | 1 -
build_writer.sh | 3 +-
build_writer_pdf.sh | 7 +-
build_writer_prince.sh | 1 -
config_base.yml | 65 +++++++++
config_designer.yml | 19 +++
config_designer_pdf.yml | 19 +++
config_writer.yml | 22 +++
config_writer_pdf.yml | 6 +
configs/config_designer.yml | 90 ------------
configs/config_designer_pdf.yml | 77 ----------
configs/config_writer.yml | 87 ------------
configs/config_writer_pdf.yml | 77 ----------
css/customstyles.css | 11 +-
index.md | 39 +-----
pages/content_types/pages.md | 14 +-
pages/content_types/posts.md | 16 +++
pages/overview/config_setup.md | 82 +++++++----
pages/overview/getting_started.md | 52 ++++---
pages/overview/troubleshooting.md | 49 ++++++-
pages/publishing/gitcommands.md | 12 ++
pages/special-layouts/series.md | 92 ++++++++++++
pages/special-layouts/seriesdemo1.md | 21 +++
pages/special-layouts/seriesdemo2.md | 22 +++
pages/special-layouts/seriesdemo3.md | 23 +++
pages/tag-archives/tag-content-types.md | 7 +
40 files changed, 808 insertions(+), 519 deletions(-)
create mode 100644 _includes/custom/acme_series.html
create mode 100644 _includes/custom/homepage.md
delete mode 100644 _includes/pagination.html
delete mode 100644 build_designer_prince.sh
delete mode 100644 build_writer_prince.sh
create mode 100644 config_base.yml
create mode 100644 config_designer.yml
create mode 100644 config_designer_pdf.yml
create mode 100644 config_writer.yml
create mode 100644 config_writer_pdf.yml
delete mode 100644 configs/config_designer.yml
delete mode 100644 configs/config_designer_pdf.yml
delete mode 100644 configs/config_writer.yml
delete mode 100644 configs/config_writer_pdf.yml
create mode 100644 pages/content_types/posts.md
create mode 100644 pages/publishing/gitcommands.md
create mode 100644 pages/special-layouts/series.md
create mode 100644 pages/special-layouts/seriesdemo1.md
create mode 100644 pages/special-layouts/seriesdemo2.md
create mode 100644 pages/special-layouts/seriesdemo3.md
create mode 100644 pages/tag-archives/tag-content-types.md
diff --git a/_config.yml b/_config.yml
index f34c0bf..f94ac4b 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,57 +1,56 @@
-# the audience for this site. even if you're not single sourcing, you still need to define an audience here.
+project: documentation-theme-jekyll-designer
+
audience: designer
-# your project's title. appears in the top nav home button.
-title: Jekyll for Designers
+product: all
-# currently the version is used only in the print cover
-version: 2.0
+platform: all
+
+version: all
+
+topnav_title: Jekyll for Designers
+
+topnav_version: 2.0
-# appears above the sidebar (optional)
tagline: Guide for designers
-# You can leave the url empty so that you can upload the files into any domain. You just need to define the baseurl.
-url: "http://tomjohnson1492.github.io"
+baseurl: "/documentation-theme-jekyll/designer"
-# the subpath of your site. If you're publishing to the root directory, just type "". Usually set this as your project name.
-baseurl: "/documentation-theme-jekyll"
-
-# this is how you will preview the site on your local machine. leave as is.
-host: 127.0.0.1
-
-# specified here in case you have multiple sites and want to view them simultaneously in different tabs (you'll need different ports)
port: 4006
-# Add a feedback email for the top navigation bar
+host: 127.0.0.1
+
+url: "http://tomjohnson1492.github.io"
+
feedback_email: tomjohnson1492@gmail.com
-# whether you want the sidebar to use an accordion, so that other sections in the toc collapse when one section expands.
sidebar_accordion: true
-# Disqus shortname for commenting features. leave blank if you don't want a comment form.
disqus_shortname: idrbwjekyll
-# Insert your google analytics tracking number. leave blank if you don't want google analytics integration.
google_analytics: UA-408430-5
markdown: redcarpet
-# options for the redcarpet markdown processing. leave as is, especially the "with_toc_data" or the mini-toc won't appear.
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data"]
-# pygments requires you to install a gem on your machine. if you don't want this, use rouge instead.
highlighter: pygments
-# put all files or directories that you want to exclude from your project here.
+print: false
+
+floating_nav: true
+
+# suffix: index.html
+
exclude:
- _drafts
- bower_components
- .idea
- _site
-# these are defaults that get applied to each page or post's frontmatter. leave as is.
permalink: :title
+
defaults:
-
scope:
@@ -81,17 +80,6 @@ defaults:
sass:
sass_dir: _sass
-# this enables the tooltip collection.
collections:
tooltips:
- output: true
-
-# is this a print build? if so, put true. otherwise, false.
-print: false
-
-floating_nav: true
-
-# this option allows you to add a suffix to the permalinks in case you're publishing on a host such as Salesforce's site.com.
-# on Salesforce's site.com, uploaded files must have index.html to display correctly. Most likely just ignore or remove this section unless
-# you're publishing on Salesforce.
-# suffix: index.html
\ No newline at end of file
+ output: true
\ No newline at end of file
diff --git a/_data/sidebar.yml b/_data/sidebar.yml
index 1de5ce5..b3bb28f 100644
--- a/_data/sidebar.yml
+++ b/_data/sidebar.yml
@@ -7,241 +7,411 @@ entries:
subcategories:
- title: Overview
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
items:
- title: Cover
url: /titlepage/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
web: false
+ - title: Introduction
+ url: /
+ audience: writer, designer
+ platform: all
+ product: all
+ version: all
+ print: true
+
- title: Getting started
url: /getting_started/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Setting up the configuration files
url: /config_setup/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Supported features
url: /supported_features/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Troubleshooting
url: /troubleshooting/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
+
- title: Content types
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
items:
- title: Pages and posts
url: /pages/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Collections
url: /collections/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Formatting
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
items:
-
- title: Alerts
url: /alerts/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Images
url: /images/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Links
url: /links/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Syntax highlighting
url: /syntax_highlighting/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Videos
url: /videos/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Labels
url: /labels/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Icons
url: /icons/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Tables
url: /tables/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Tooltips
url: /adding_tooltips/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Navtabs
url: /navtabs/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Shortcuts for Jekyll syntax
url: /shortcuts_for_jekyll_syntax/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Single Sourcing
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
items:
- title: Conditional logic
url: /conditional_logic/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Content re-use
url: /content_reuse/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Excluding files
url: /excluding_files/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Publishing
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
items:
- title: Build arguments
url: /build_arguments/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Create a PDF
url: /create_pdf/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Creating a help API
url: /help_api/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Setting up iTerm profiles
url: /iterm_profiles/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
+ print: true
+
+ - title: Common Git commands
+ url: /git_commands/
+ audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Navigation
audience: writer
+ platform: all
+ product: all
+ version: all
print: true
items:
- title: Configuring sidebar and top navigation
url: /navigation/
audience: designer, writer
+ platform: all
+ product: all
+ version: all
print: true
- title: Tags
url: /tags/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Special Layouts
- audience: designer
+ audience: designer, writer
+ platform: all
+ product: all
+ version: all
+ print: true
print: false
items:
- title: Special layouts
url: /special_layouts/
audience: designer
+ platform: all
+ product: all
+ version: all
print: true
+ - title: Creating a series
+ url: /series/
+ audience: designer
+ platform: all
+ product: all
+ version: all
+ print: all
+
- title: FAQ layout
url: /faq/
audience: designer
+ platform: all
+ product: all
+ version: all
print: true
- title: KB layout
url: /kb_layout/
audience: designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Scroll
url: /scroll/
audience: designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Shuffle
url: /shuffle/
audience: designer
+ platform: all
+ product: all
+ version: all
print: true
- title: Tag archives
- audience: designer, w riter
+ audience: designer, writer
+ platform: all
+ product: all
+ version: all
print: false
+
items:
- title: Overview
- audience: writer, designer
url: /tag-archives-overview/
+ audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
thirdlevel: #demo's how to add a third level to the sidebar nav.
- title: Third level title
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
thirdlevelitems:
- title: Overview pages
url: /tag-overview/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
- title: Getting Started pages
url: /tag-getting-started/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
- title: Single Sourcing pages
url: /tag-single-sourcing/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
- title: Publishing pages
url: /tag-publishing/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
- title: Formatting pages
url: /tag-formatting/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
- title: Special layout pages
url: /tag-special-layouts/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
print: false
diff --git a/_data/tags.yml b/_data/tags.yml
index ece72cd..372132b 100644
--- a/_data/tags.yml
+++ b/_data/tags.yml
@@ -5,6 +5,7 @@ allowed-tags:
- publishing
- single-sourcing
- special-layouts
+ - content types
diff --git a/_data/topnav.yml b/_data/topnav.yml
index 1354988..7213679 100644
--- a/_data/topnav.yml
+++ b/_data/topnav.yml
@@ -7,14 +7,23 @@ topnav:
- title: About
url: /about/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
- title: Github repo
external_url: https://github.com/tomjohnson1492/documentation-theme-jekyll
audience: writer, designer
+ platform: all
+ product: all
+ version: all
- title: My blog
external_url: http://idratherbewriting.com
audience: writer, designer
+ platform: all
+ product: all
+ version: all
#Topnav dropdowns
topnav_dropdowns:
@@ -22,16 +31,28 @@ topnav_dropdowns:
subcategories:
- title: Jekyll resources
audience: writer, designer
+ platform: all
+ product: all
+ version: all
items:
- title: Jekyll documentation
external_url: http://jekyllrb.com/docs/home/
audience: writer, designer
+ platform: all
+ product: all
+ version: all
- title: Jekyll Talk
external_url: https://talk.jekyllrb.com/
audience: designer, writer
+ platform: all
+ product: all
+ version: all
- title: Jekyll on Stackoverflow
external_url: http://stackoverflow.com/questions/tagged/jekyll
audience: writer, designer
+ platform: all
+ product: all
+ version: all
diff --git a/_includes/custom/acme_series.html b/_includes/custom/acme_series.html
new file mode 100644
index 0000000..44d9a11
--- /dev/null
+++ b/_includes/custom/acme_series.html
@@ -0,0 +1,19 @@
+
\ No newline at end of file
diff --git a/_includes/custom/conditions.html b/_includes/custom/conditions.html
index c8af8f6..49806bf 100644
--- a/_includes/custom/conditions.html
+++ b/_includes/custom/conditions.html
@@ -1,15 +1,19 @@
-{% if site.audience == "writer" %}
- {% assign buildAudience = "writer" %}
- {% assign sidebar = site.data.sidebar.entries %}
- {% assign topnav = site.data.topnav.topnav %}
- {% assign topnav_dropdowns = site.data.topnav.topnav_dropdowns %}
- {% assign fileName = "writer_guide" %}
-
-{% elsif site.audience == "designer" %}
- {% assign buildAudience = "designer" %}
- {% assign sidebar = site.data.sidebar.entries %}
- {% assign topnav = site.data.topnav.topnav %}
- {% assign topnav_dropdowns = site.data.topnav.topnav_dropdowns %}
- {% assign fileName = "designer_guide" %}
-
+{% if site.project == "documentation-theme-jekyll-writer" %}
+{% assign audience = "writer" %}
+{% assign sidebar = site.data.sidebar.entries %}
+{% assign topnav = site.data.topnav.topnav %}
+{% assign topnav_dropdowns = site.data.topnav.topnav_dropdowns %}
+{% assign version = "all" %}
+{% assign product = "all" %}
+{% assign platform = "all" %}
{% endif %}
+
+{% if site.project == "documentation-theme-jekyll-designer" %}
+{% assign audience = "designer" %}
+{% assign sidebar = site.data.sidebar.entries %}
+{% assign topnav = site.data.topnav.topnav %}
+{% assign topnav_dropdowns = site.data.topnav.topnav_dropdowns %}
+{% assign version = "all" %}
+{% assign product = "all" %}
+{% assign platform = "all" %}
+{% endif %}
\ No newline at end of file
diff --git a/_includes/custom/homepage.md b/_includes/custom/homepage.md
new file mode 100644
index 0000000..24b3caf
--- /dev/null
+++ b/_includes/custom/homepage.md
@@ -0,0 +1,33 @@
+{% include linkrefs.html %}
+
+This is a Jekyll theme intended for documentation projects. What makes this theme unique is the approach in using Jekyll for single sourcing, that is, producing multiple outputs from the same theme. For example, you might have 3 different help systems that you're generating from the same Jekyll files. More than anything, this Jekyll theme shows you how to use Jekyll for documentation projects from the perspective of a technical writer.
+
+Note that I'm using this theme for my own technical writing projects, so this is an evolving project.
+
+## Intended audience
+
+Although this theme could be used for any website, I'm assuming that my main audience involves technical writers. Very few technical writers are even aware of Jekyll as a platform, let alone how to use it for tech comm scenarios. The instructions for this theme, therefore, are extensive because they discuss a lot of Jekyll basics as well. I'm not going to assume that you're already familiar with Jekyll, or that you're a UX guru, or that you know how to do backflips in Liquid. I'll try to hold your hand as much as possible.
+
+## Supported features
+
+As far as I can tell, Jekyll supports most of the features a technical writer needs to author and publish content. Most importantly, using Jekyll allows you to take full advantage of a modern web development platform.
+
+As a quick overview, this theme specifically provides the following:
+
+* Bootstrap framework with responsive design
+* Integrated search
+* Navigation sidebar and top navigation
+* Font Awesome
+* Options for creating multiple builds for different audiences
+
+See {{supported_features}} for an extensive list.
+
+## Getting started
+
+To get started, see {{getting_started}}. It explains how to create a new project.
+
+## Questions
+
+Feel free to ask me a question if there's something I haven't addressed here.
+
+Tom Johnson
tomjohnson1492@gmail.com
diff --git a/_includes/custom/links.html b/_includes/custom/links.html
index c9f8dd9..4bb46a8 100644
--- a/_includes/custom/links.html
+++ b/_includes/custom/links.html
@@ -47,3 +47,14 @@
{% capture navigation %}Creating navigation{% endcapture %}
{% capture tags %}Creating tags{% endcapture %}
+
+
+{% comment %} {% endcomment %}
+
+{% capture special_layouts %}Special layouts{% endcapture %}
+{% capture series %}Series widget{% endcapture %}
+{% capture shuffle %}Shuffle layout{% endcapture %}
+{% capture scroll %}Scroll layout{% endcapture %}
+{% capture kb-layout %}Knowledgebase layout{% endcapture %}
+{% capture faq %}FAQ layout{% endcapture %}
+
diff --git a/_includes/pagination.html b/_includes/pagination.html
deleted file mode 100644
index ed3f824..0000000
--- a/_includes/pagination.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/_includes/sidebar.html b/_includes/sidebar.html
index c784b3f..e00f7da 100644
--- a/_includes/sidebar.html
+++ b/_includes/sidebar.html
@@ -48,11 +48,11 @@
{% for entry in sidebar %}
{% for subcategory in entry.subcategories %}
- {% if subcategory.audience contains buildAudience %}
+ {% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.web != false %}
{{ subcategory.title }}
{% for item in subcategory.items %}
- {% if item.audience contains buildAudience and item.web != false %}
+ {% if item.audience contains audience and item.product contains product and item.platform contains platform and item.version contains version and item.web != false %}
{% if item.external_url %}
- {{subcategory.title}}
{% elsif page.url contains item.url %}
@@ -98,6 +98,5 @@
{% endif %}
-
-
-
\ No newline at end of file
+
+
diff --git a/_includes/topnav.html b/_includes/topnav.html
index 2fd3184..19b4a9a 100644
--- a/_includes/topnav.html
+++ b/_includes/topnav.html
@@ -23,7 +23,7 @@
- {{site.title}} {{1.0}}
+ {{site.topnav_title}} {{site.topnav_version}}
@@ -33,12 +33,12 @@
{% for entry in topnav %}
{% for subcategory in entry.subcategories %}
- {% if subcategory.audience contains buildAudience %}
+ {% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.web != false %}
{% if subcategory.external_url %}
- {{subcategory.title}}
{% elsif page.url contains subcategory.url %}
- {{subcategory.title}}
- {% else %}
+ {% else %}
- {{subcategory.title}}
{% endif %}
{% endif %}
@@ -50,15 +50,15 @@
-
+
{% for entry in topnav_dropdowns %}
{% for subcategory in entry.subcategories %}
- {% if subcategory.audience contains buildAudience %}
+ {% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.web != false %}
-
{{ subcategory.title }}