releasing version 4.0 of the doc theme. Major overhaul to the theme. Now it supports multiple doc projects within the same project. The intent is to replicate CCMS behavior so that an entire team can work off of the same project, each operating somewhat independently or not on various subprojects.

This commit is contained in:
Tom Johnson 2015-11-30 13:53:18 -08:00
parent 2687f779d2
commit f8b960225e
181 changed files with 20112 additions and 20270 deletions

4
404.md
View File

@ -1,8 +1,6 @@
---
title: "Page Not Found"
description: "Page not found."
search: exclude
---
Sorry, but the page you were trying to view does not exist. Perhaps you can try searching for it.
Sorry, but the page you were trying to view does not exist — perhaps you can try searching for it.

2
Gemfile Normal file
View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages'

132
Gemfile.lock Normal file
View File

@ -0,0 +1,132 @@
GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
activesupport (4.2.5)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
blankslate (2.1.2.4)
classifier-reborn (2.0.4)
fast-stemmer (~> 1.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorator (0.1)
ethon (0.8.0)
ffi (>= 1.3.0)
execjs (2.6.0)
fast-stemmer (1.0.2)
ffi (1.9.10)
gemoji (2.1.0)
github-pages (39)
RedCloth (= 4.2.9)
github-pages-health-check (~> 0.2)
jekyll (= 2.4.0)
jekyll-coffeescript (= 1.0.1)
jekyll-feed (= 0.3.1)
jekyll-mentions (= 0.2.1)
jekyll-redirect-from (= 0.8.0)
jekyll-sass-converter (= 1.3.0)
jekyll-sitemap (= 0.8.1)
jemoji (= 0.5.0)
kramdown (= 1.5.0)
liquid (= 2.6.2)
maruku (= 0.7.0)
mercenary (~> 0.3)
pygments.rb (= 0.6.3)
rdiscount (= 2.1.7)
redcarpet (= 3.3.2)
terminal-table (~> 1.4)
github-pages-health-check (0.5.3)
addressable (~> 2.3)
net-dns (~> 0.8)
public_suffix (~> 1.4)
typhoeus (~> 0.7)
html-pipeline (1.9.0)
activesupport (>= 2)
nokogiri (~> 1.4)
i18n (0.7.0)
jekyll (2.4.0)
classifier-reborn (~> 2.0)
colorator (~> 0.1)
jekyll-coffeescript (~> 1.0)
jekyll-gist (~> 1.0)
jekyll-paginate (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 2.6.1)
mercenary (~> 0.3.3)
pygments.rb (~> 0.6.0)
redcarpet (~> 3.1)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-feed (0.3.1)
jekyll-gist (1.3.5)
jekyll-mentions (0.2.1)
html-pipeline (~> 1.9.0)
jekyll (~> 2.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.8.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-sitemap (0.8.1)
jekyll-watch (1.3.0)
listen (~> 3.0)
jemoji (0.5.0)
gemoji (~> 2.0)
html-pipeline (~> 1.9)
jekyll (>= 2.0)
json (1.8.3)
kramdown (1.5.0)
liquid (2.6.2)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
maruku (0.7.0)
mercenary (0.3.5)
mini_portile2 (2.0.0)
minitest (5.8.3)
net-dns (0.8.0)
nokogiri (1.6.7)
mini_portile2 (~> 2.0.0.rc2)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.11)
public_suffix (1.5.2)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdiscount (2.1.7)
redcarpet (3.3.2)
safe_yaml (1.0.4)
sass (3.4.19)
terminal-table (1.5.2)
thread_safe (0.3.5)
toml (0.1.2)
parslet (~> 1.5.0)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
yajl-ruby (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
github-pages
BUNDLED WITH
1.10.6

View File

@ -1,8 +1,3 @@
# Documentation theme for Jekyll
## Jekyll Documentation theme
This is a Jekyll theme designed to be used for single-sourced documentation sites. Instructions for using the theme are in the site build. You can see the site build in the following two locations:
* [http://idratherbetellingstories.com/documentation-theme-jekyll/doc_designers/](http://idratherbetellingstories.com/documentation-theme-jekyll/doc_designers/)
* [http://idratherbetellingstories.com/documentation-theme-jekyll/doc_writers/](http://idratherbetellingstories.com/documentation-theme-jekyll/doc_writers/)
The two different builds demonstrate the single-source publishing capabilities of the theme. The designer version is comprehensive, whereas the writer version is a subset of the designer version.
This is the readme page of the Jekyll documentation theme.

View File

@ -1,30 +1,29 @@
## This content is duplicated here from configs/config_designers.yml because I'm building this site through Github Pages, and Github Pages just looks for the _config.yml file in the root directory to create the build.
# project definitions
project: doc_designers
project: mydoc_designers
audience: designers
product: all
product: doc
platform: all
version: all
destination: ../doc_designers
topnav_title: Jekyll Documentation Theme
homepage_title: Jekyll Documentation Theme — Designers
site_title: Jekyll Documentation Theme — Designers
disqus_shortname: idrbwjekyll
google_analytics: UA-66296557-1
github_editme_path: tomjohnson1492/documentation-theme-jekyll/blob/gh-pages
# don't use a slash before or after the above path. here's how this url gets written out in page.html: https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}
destination: ../doc_outputs/mydoc/designers
topnav_title: Doc theme — designers
homepage_title: Jekyll doc theme for designers
site_title: Jekyll theme for designers
project_folder: doc
# variables
sidebar_tagline: designers
sidebar_version: version 3.0
sidebar_tagline: Designers
sidebar_version: Version 4.0
theme_file: theme-blue.css
project_file_name: doc
port: 4001
port: 4009
exclude:
- doc_writers*
- configs/
- _site
- doc_multi*
- _drafts
- configs/
- doc/mydoc_writers*
# same for all
host: 127.0.0.1
@ -32,14 +31,13 @@ feedback_email: tomjohnson1492@gmail.com
sidebar_accordion: true
markdown: redcarpet
print: false
theme_file: theme-blue.css
# only use suffix if you need to force index.html to display
# suffix: index.html
suffix: index.html
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"]
highlighter: pygments
highlighter: rouge
collections:
tooltips:
@ -53,6 +51,7 @@ defaults:
values:
layout: "page"
comments: true
search: true
-
scope:
path: ""
@ -60,3 +59,7 @@ defaults:
values:
layout: "post"
comments: true
search: true
sass:
sass_dir: _sass

View File

@ -1,11 +1,3 @@
# Password screen
changepassword_password: >
<p>This is a sample list of stuff:<br/>
- more stuff<br/>
- another line<br/>
</p>
elephant: "This is a sample definition."
baseball: "Baseball is considered America's pasttime sport, though that may be more of a historical term than a current one. There's a lot more excitement about football than baseball. A baseball game is somewhat of a snooze to watch, for the most part."

View File

@ -0,0 +1,600 @@
# This is your sidebar TOC. The sidebar code loops through sections here and provides the appropriate formatting.
# Sidebar
entries:
- title: Sidebar
subcategories:
- title:
audience: writers, designers
platform: all
product: all
version: all
output: pdf
type: frontmatter
items:
- title:
url: /titlepage.html
audience: writers, designers
platform: all
product: all
version: all
output: pdf
type: frontmatter
- title:
url: /tocpage.html
audience: writers, designers
platform: all
product: all
version: all
output: pdf
type: frontmatter
- title: Overview
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Introduction
url: /mydoc/home.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Supported features
url: /mydoc/mydoc_supported_features.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: About the theme author
url: /mydoc/mydoc_about.html
audience: writers, designers
platform: all
product: all
version: all
output: web
- title: Support
url: /mydoc/mydoc_support.html
audience: writers, designers
platform: all
product: all
version: all
output: web
- title: Get started
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: 1. Build the default project
url: /mydoc/mydoc_getting_started.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 2. Add a new project
url: /mydoc/mydoc_adding_new_projects.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 3. Decide on your project's attributes
url: /mydoc/mydoc_decide_on_attributes.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 4. Set the configuration options
url: /mydoc/mydoc_configuration_settings.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 5. Customize the conditions file
url: /mydoc/mydoc_conditions_file_customization.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 6. Configure the sidebar
url: /mydoc/mydoc_configure_sidebar.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 7. Configure the top navigation
url: /mydoc/mydoc_top_navigation.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 8. Customize the URL generator
url: /mydoc/mydoc_url_generator_customization.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 9. Set up Prince XML
url: /mydoc/mydoc_princexml_setup.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: 10. Configure the build scripts
url: /mydoc/mydoc_build_scripts.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Authoring
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Pages
url: /mydoc/mydoc_pages.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: WebStorm Text Editor
url: /mydoc/mydoc_webstorm_text_editor.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Conditional logic
url: /mydoc/mydoc_conditional_logic.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Content reuse
url: /mydoc/mydoc_content_reuse.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Collections
url: /mydoc/mydoc_collections.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Navigation
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Sidebar navigation
url: /mydoc/mydoc_sidebar_navigation.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Tags
url: /mydoc/mydoc_tags.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Series
url: /mydoc/mydoc_series.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Formatting
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Tooltips
url: /mydoc/mydoc_adding_tooltips.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Alerts
url: /mydoc/mydoc_alerts.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Icons
url: /mydoc/mydoc_icons.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Images
url: /mydoc/mydoc_images.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Labels
url: /mydoc/mydoc_labels.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Links
url: /mydoc/mydoc_hyperlinks.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Navtabs
url: /mydoc/mydoc_navtabs.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Video embeds
url: /mydoc/mydoc_video_embeds.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Tables
url: /mydoc/mydoc_tables.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Syntax highlighting
url: /mydoc/mydoc_syntax_highlighting.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Handling reviews
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Commenting on files
url: /mydoc/mydoc_commenting_on_files.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Publishing
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Build arguments
url: /mydoc/mydoc_build_arguments.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Themes
url: /mydoc/mydoc_themes.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Link validation
url: /mydoc/mydoc_link_validation.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Check page title consistency
url: /mydoc/mydoc_title_checker.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Generating PDFs
url: /mydoc/mydoc_generating_pdfs.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Excluding files
url: /mydoc/mydoc_excluding_files.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Help APIs and UI tooltips
url: /mydoc/mydoc_help_api.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Search configuration
url: /mydoc/mydoc_search_configuration.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: iTerm profiles
url: /mydoc/mydoc_iterm_profiles.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Pushing builds to server
url: /mydoc/mydoc_push_build_to_server.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Getting around the password prompts in SCP
url: /mydoc/mydoc_no_password_prompts_scp.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Special layouts
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Knowledge-base layout
url: /mydoc/mydoc_kb_layout.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Scroll layout
url: /mydoc/mydoc_scroll.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Shuffle layout
url: /mydoc/mydoc_shuffle.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: FAQ layout
url: /mydoc/mydoc_faq.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Glossary layout
url: /mydoc/mydoc_glossary.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Collaborating with version control
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Mercurial notes and tips
url: /mydoc/mydoc_mercurial_collaboration.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Git notes and tips
url: /mydoc/mydoc_git_collaboration.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Troubleshooting
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
items:
- title: Troubleshooting
url: /mydoc/mydoc_troubleshooting.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- title: Tag archives
audience: writers, designers
platform: all
product: all
version: all
output: web
items:
- title: Tag archives overview
url: /mydoc/mydoc_tag_archives_overview.html
audience: writers, designers
platform: all
product: all
version: all
output: web
thirdlevel:
- title: Tag archive pages
audience: writers, designers
platform: all
version: all
product: all
output: web
thirdlevelitems:
- title: Getting started pages
url: /mydoc/tag_getting_started.html
audience: writers, designers
platform: all
version: all
product: all
output: web
- title: Formatting pages
url: /mydoc/tag_formatting.html
audience: writers, designers
platform: all
version: all
product: all
output: web
- title: Navigation pages
url: /mydoc/tag_navigation.html
audience: writers, designers
platform: all
version: all
product: all
output: web
- title: Content types pages
url: /mydoc/tag_content_types.html
audience: writers, designers
platform: all
version: all
product: all
output: web
- title: Publishing pages
url: /mydoc/tag_publishing.html
audience: writers, designers
platform: all
version: all
product: all
output: web
- title: Special layout pages
url: /mydoc/tag_special_layouts.html
audience: writers, designers
platform: all
version: all
product: all
output: web
- title: Collaboration pages
url: /mydoc/tag_collaboration.html
audience: writers, designers
platform: all
version: all
product: all
output: web

View File

@ -0,0 +1,9 @@
allowed-tags:
- getting_started
- content_types
- navigation
- formatting
- publishing
- single_sourcing
- special_layouts
- collaboration

View File

@ -1,5 +1,5 @@
# Topnav single links
# if you want to list an external url, use external_url instead of url. the theme will apply a different link base.
## Topnav single links
## if you want to list an external url, use external_url instead of url. the theme will apply a different link base.
topnav:
- title: Topnav
subcategories:
@ -9,38 +9,47 @@ topnav:
platform: all
product: all
version: all
output: web
#Topnav dropdowns
topnav_dropdowns:
- title: Topnav dropdowns
subcategories:
- title: Resources
- title: Jekyll Resources
audience: writers, designers
platform: all
product: all
version: all
output: web
items:
- title: About this theme
url: /doc_about.html
audience: writers, designers
platform: all
product: all
version: all
- title: Support
url: /doc_support.html
audience: writers, designers
platform: all
product: all
version: all
- title: Troubleshooting
external_url: ../somedirectory/doc_troubleshooting.html
audience: writers, designers
platform: all
product: all
version: all
- title: Jekyll Talk
external_url: https://talk.jekyllrb.com
audience: writers, designers
platform: all
product: all
version: all
output: web
- title: Jekyll documentation
external_url: http://jekyllrb.com/docs/home/
audience: writers, designers
platform: all
product: all
version: all
output: web
- title: Jekyll on Stack Overflow
external_url: http://stackoverflow.com/questions/tagged/jekyll
audience: writers, designers
platform: all
product: all
version: all
output: web
- title: Jekyll on my blog
external_url: http://idratherbewriting.com/category-jekyll/
audience: writers, designers
platform: all
product: all
version: all
output: web

391
_data/mydoc/mydoc_urls.yml Normal file
View File

@ -0,0 +1,391 @@
home:
title: "Introduction"
url: "../mydoc/home.html"
link: "<a href='../mydoc/home.html'>Introduction</a>"
mydoc_getting_started:
title: "Getting started with this theme"
url: "../mydoc/mydoc_getting_started.html"
link: "<a href='../mydoc/mydoc_getting_started.html'>Getting started with this theme</a>"
mydoc_configuration_settings:
title: "Setting configuration options"
url: "../mydoc/mydoc_configuration_settings.html"
link: "<a href='../mydoc/mydoc_configuration_settings.html'>Setting configuration options</a>"
mydoc_adding_new_projects:
title: "Adding new projects"
url: "../mydoc/mydoc_adding_new_projects.html"
link: "<a href='../mydoc/mydoc_adding_new_projects.html'>Adding new projects</a>"
mydoc_supported_features:
title: "Supported features"
url: "../mydoc/mydoc_supported_features.html"
link: "<a href='../mydoc/mydoc_supported_features.html'>Supported features</a>"
mydoc_pages:
title: "Pages"
url: "../mydoc/mydoc_pages.html"
link: "<a href='../mydoc/mydoc_pages.html'>Pages</a>"
mydoc_webstorm_text_editor:
title: "WebStorm Text Editor"
url: "../mydoc/mydoc_webstorm_text_editor.html"
link: "<a href='../mydoc/mydoc_webstorm_text_editor.html'>WebStorm Text Editor</a>"
mydoc_series:
title: "Series"
url: "../mydoc/mydoc_series.html"
link: "<a href='../mydoc/mydoc_series.html'>Series</a>"
mydoc_collections:
title: "Collections"
url: "../mydoc/mydoc_collections.html"
link: "<a href='../mydoc/mydoc_collections.html'>Collections</a>"
mydoc_sidebar_navigation:
title: "Sidebar navigation"
url: "../mydoc/mydoc_sidebar_navigation.html"
link: "<a href='../mydoc/mydoc_sidebar_navigation.html'>Sidebar navigation</a>"
mydoc_top_navigation:
title: "Top navigation"
url: "../mydoc/mydoc_top_navigation.html"
link: "<a href='../mydoc/mydoc_top_navigation.html'>Top navigation</a>"
mydoc_tags:
title: "Tags"
url: "../mydoc/mydoc_tags.html"
link: "<a href='../mydoc/mydoc_tags.html'>Tags</a>"
mydoc_adding_tooltips:
title: "Tooltips"
url: "../mydoc/mydoc_adding_tooltips.html"
link: "<a href='../mydoc/mydoc_adding_tooltips.html'>Tooltips</a>"
mydoc_alerts:
title: "Alerts"
url: "../mydoc/mydoc_alerts.html"
link: "<a href='../mydoc/mydoc_alerts.html'>Alerts</a>"
mydoc_icons:
title: "Icons"
url: "../mydoc/mydoc_icons.html"
link: "<a href='../mydoc/mydoc_icons.html'>Icons</a>"
mydoc_images:
title: "Images"
url: "../mydoc/mydoc_images.html"
link: "<a href='../mydoc/mydoc_images.html'>Images</a>"
mydoc_labels:
title: "Labels"
url: "../mydoc/mydoc_labels.html"
link: "<a href='../mydoc/mydoc_labels.html'>Labels</a>"
mydoc_hyperlinks:
title: "Links"
url: "../mydoc/mydoc_hyperlinks.html"
link: "<a href='../mydoc/mydoc_hyperlinks.html'>Links</a>"
mydoc_navtabs:
title: "Navtabs"
url: "../mydoc/mydoc_navtabs.html"
link: "<a href='../mydoc/mydoc_navtabs.html'>Navtabs</a>"
mydoc_video_embeds:
title: "Video embeds"
url: "../mydoc/mydoc_video_embeds.html"
link: "<a href='../mydoc/mydoc_video_embeds.html'>Video embeds</a>"
mydoc_tables:
title: "Tables"
url: "../mydoc/mydoc_tables.html"
link: "<a href='../mydoc/mydoc_tables.html'>Tables</a>"
mydoc_syntax_highlighting:
title: "Syntax highlighting"
url: "../mydoc/mydoc_syntax_highlighting.html"
link: "<a href='../mydoc/mydoc_syntax_highlighting.html'>Syntax highlighting</a>"
mydoc_conditional_logic:
title: "Conditional logic"
url: "../mydoc/mydoc_conditional_logic.html"
link: "<a href='../mydoc/mydoc_conditional_logic.html'>Conditional logic</a>"
mydoc_content_reuse:
title: "Content reuse"
url: "../mydoc/mydoc_content_reuse.html"
link: "<a href='../mydoc/mydoc_content_reuse.html'>Content reuse</a>"
mydoc_commenting_on_files:
title: "Commenting on files"
url: "../mydoc/mydoc_commenting_on_files.html"
link: "<a href='../mydoc/mydoc_commenting_on_files.html'>Commenting on files</a>"
mydoc_build_arguments:
title: "Build arguments"
url: "../mydoc/mydoc_build_arguments.html"
link: "<a href='../mydoc/mydoc_build_arguments.html'>Build arguments</a>"
mydoc_themes:
title: "Themes"
url: "../mydoc/mydoc_themes.html"
link: "<a href='../mydoc/mydoc_themes.html'>Themes</a>"
mydoc_link_validation:
title: "Link validation"
url: "../mydoc/mydoc_link_validation.html"
link: "<a href='../mydoc/mydoc_link_validation.html'>Link validation</a>"
mydoc_generating_pdfs:
title: "Generating PDFs"
url: "../mydoc/mydoc_generating_pdfs.html"
link: "<a href='../mydoc/mydoc_generating_pdfs.html'>Generating PDFs</a>"
mydoc_excluding_files:
title: "Excluding files"
url: "../mydoc/mydoc_excluding_files.html"
link: "<a href='../mydoc/mydoc_excluding_files.html'>Excluding files</a>"
mydoc_help_api:
title: "Help APIs and UI tooltips"
url: "../mydoc/mydoc_help_api.html"
link: "<a href='../mydoc/mydoc_help_api.html'>Help APIs and UI tooltips</a>"
mydoc_search_configuration:
title: "Search configuration"
url: "../mydoc/mydoc_search_configuration.html"
link: "<a href='../mydoc/mydoc_search_configuration.html'>Search configuration</a>"
mydoc_iterm_profiles:
title: "iTerm profiles"
url: "../mydoc/mydoc_iterm_profiles.html"
link: "<a href='../mydoc/mydoc_iterm_profiles.html'>iTerm profiles</a>"
mydoc_push_build_to_server:
title: "Pushing builds to server"
url: "../mydoc/mydoc_push_build_to_server.html"
link: "<a href='../mydoc/mydoc_push_build_to_server.html'>Pushing builds to server</a>"
mydoc_kb_layout:
title: "Knowledge-base layout"
url: "../mydoc/mydoc_kb_layout.html"
link: "<a href='../mydoc/mydoc_kb_layout.html'>Knowledge-base layout</a>"
mydoc_scroll:
title: "Scroll layout"
url: "../mydoc/mydoc_scroll.html"
link: "<a href='../mydoc/mydoc_scroll.html'>Scroll layout</a>"
mydoc_shuffle:
title: "Shuffle layout"
url: "../mydoc/mydoc_shuffle.html"
link: "<a href='../mydoc/mydoc_shuffle.html'>Shuffle layout</a>"
mydoc_faq:
title: "FAQ layout"
url: "../mydoc/mydoc_faq.html"
link: "<a href='../mydoc/mydoc_faq.html'>FAQ layout</a>"
mydoc_glossary:
title: "Glossary layout"
url: "../mydoc/mydoc_glossary.html"
link: "<a href='../mydoc/mydoc_glossary.html'>Glossary layout</a>"
mydoc_troubleshooting:
title: "Troubleshooting"
url: "../mydoc/mydoc_troubleshooting.html"
link: "<a href='../mydoc/mydoc_troubleshooting.html'>Troubleshooting</a>"
mydoc_tag_archives_overview:
title: "Tag archives overview"
url: "../mydoc/mydoc_tag_archives_overview.html"
link: "<a href='../mydoc/mydoc_tag_archives_overview.html'>Tag archives overview</a>"
tag_getting_started:
title: "Getting started pages"
url: "../mydoc/tag_getting_started.html"
link: "<a href='../mydoc/tag_getting_started.html'>Getting started pages</a>"
tag_formatting:
title: "Formatting pages"
url: "../mydoc/tag_formatting.html"
link: "<a href='../mydoc/tag_formatting.html'>Formatting pages</a>"
tag_navigation:
title: "Navigation pages"
url: "../mydoc/tag_navigation.html"
link: "<a href='../mydoc/tag_navigation.html'>Navigation pages</a>"
tag_content_types:
title: "Content types pages"
url: "../mydoc/tag_content_types.html"
link: "<a href='../mydoc/tag_content_types.html'>Content types pages</a>"
tag_publishing:
title: "Publishing pages"
url: "../mydoc/tag_publishing.html"
link: "<a href='../mydoc/tag_publishing.html'>Publishing pages</a>"
tag_special_layouts:
title: "Special layout pages"
url: "../mydoc/tag_special_layouts.html"
link: "<a href='../mydoc/tag_special_layouts.html'>Special layout pages</a>"
/mydoc_about:
title: "About this theme"
url: "../mydoc_about.html"
link: "<a href='../mydoc_about.html'>About this theme</a>"
/mydoc_support:
title: "Support"
url: "../mydoc_support.html"
link: "<a href='../mydoc_support.html'>Support</a>"

View File

@ -1,436 +0,0 @@
# This is your sidebar TOC. The sidebar code loops through sections here and provides the appropriate formatting.
# Sidebar
entries:
- title: Sidebar
subcategories:
- title: Frontmatter # leave this frontmatter section here for PDF outputs
audience: writers, designers
platform: all
product: all
version: all
web: false
items:
- title: Title Page
url: /titlepage.html
audience: writers, designers
platform: all
product: all
version: all
web: false
frontmatter: true
- title: Table of Contents
url: /tocpage.html
audience: writers, designers
platform: all
product: all
version: all
web: false
frontmatter: true
- title: Getting started
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Introduction
url: /index.html
audience: writers, designers
platform: all
product: all
version: all
- title: Getting started with this theme
url: /doc_getting_started.html
audience: writers, designers
platform: all
product: all
version: all
- title: Setting configuration options
url: /doc_configuration_settings.html
audience: writers, designers
platform: all
product: all
version: all
- title: Customizing the theme
url: /doc_customizing_the_theme.html
audience: writers, designers
platform: all
product: all
version: all
- title: Supported features
url: /doc_supported_features.html
audience: writers, designers
platform: all
product: all
version: all
- title: Authoring
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Pages
url: /doc_pages.html
audience: writers, designers
platform: all
product: all
version: all
- title: WebStorm Text Editor
url: /doc_webstorm_text_editor.html
audience: writers, designers
platform: all
product: all
version: all
- title: Series
url: /doc_series.html
audience: writers, designers
platform: all
product: all
version: all
- title: Collections
url: /doc_collections.html
audience: writers, designers
platform: all
product: all
version: all
- title: Navigation
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Sidebar navigation
url: /doc_sidebar_navigation.html
audience: writers, designers
platform: all
product: all
version: all
- title: Top navigation
url: /doc_top_navigation.html
audience: writers, designers
platform: all
product: all
version: all
- title: Tags
url: /doc_tags.html
audience: writers, designers
platform: all
product: all
version: all
- title: Formatting
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Tooltips
url: /doc_adding_tooltips.html
audience: writers, designers
platform: all
product: all
version: all
- title: Alerts
url: /doc_alerts.html
audience: writers, designers
platform: all
product: all
version: all
- title: Icons
url: /doc_icons.html
audience: writers, designers
platform: all
product: all
version: all
- title: Images
url: /doc_images.html
audience: writers, designers
platform: all
product: all
version: all
- title: Labels
url: /doc_labels.html
audience: writers, designers
platform: all
product: all
version: all
- title: Links
url: /doc_hyperlinks.html
audience: writers, designers
platform: all
product: all
version: all
- title: Navtabs
url: /doc_navtabs.html
audience: writers, designers
platform: all
product: all
version: all
- title: Video embeds
url: /doc_video_embeds.html
audience: writers, designers
platform: all
product: all
version: all
- title: Tables
url: /doc_tables.html
audience: writers, designers
platform: all
product: all
version: all
- title: Syntax highlighting
url: /doc_syntax_highlighting.html
audience: writers, designers
platform: all
product: all
version: all
- title: Single-sourcing
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Conditional logic
url: /doc_conditional_logic.html
audience: writers, designers
platform: all
product: all
version: all
- title: Content reuse
url: /doc_content_reuse.html
audience: writers, designers
platform: all
product: all
version: all
- title: Handling reviews
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Commenting on files
url: /doc_commenting_on_files.html
audience: writers, designers
platform: all
product: all
version: all
- title: Publishing
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Build arguments
url: /doc_build_arguments.html
audience: writers, designers
platform: all
product: all
version: all
- title: Themes
url: /doc_themes.html
audience: writers, designers
platform: all
product: all
version: all
- title: Link validation
url: /doc_link_validation.html
audience: writers, designers
platform: all
product: all
version: all
- title: Generating PDFs
url: /doc_generating_pdfs.html
audience: writers, designers
platform: all
product: all
version: all
- title: Excluding files
url: /doc_excluding_files.html
audience: writers, designers
platform: all
product: all
version: all
- title: Help APIs and UI tooltips
url: /doc_help_api.html
audience: writers, designers
platform: all
product: all
version: all
- title: Search configuration
url: /doc_search_configuration.html
audience: writers, designers
platform: all
product: all
version: all
- title: iTerm profiles
url: /doc_iterm_profiles.html
audience: writers, designers
platform: all
product: all
version: all
- title: Pushing builds to server
url: /doc_push_build_to_server.html
audience: writers, designers
platform: all
product: all
version: all
- title: Special layouts
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Knowledge-base layout
url: /doc_kb_layout.html
audience: writers, designers
platform: all
product: all
version: all
- title: Scroll layout
url: /doc_scroll.html
audience: writers, designers
platform: all
product: all
version: all
- title: Shuffle layout
url: /doc_shuffle.html
audience: writers, designers
platform: all
product: all
version: all
- title: FAQ layout
url: /doc_faq.html
audience: writers, designers
platform: all
product: all
version: all
- title: Glossary layout
url: /doc_glossary.html
audience: writers, designers
platform: all
product: all
version: all
- title: Tag archives
audience: writers, designers
platform: all
product: all
version: all
print: true
items:
- title: Tag archives overview
url: /tag_archives_overview.html
audience: writers, designers
platform: all
product: all
version: all
thirdlevel:
- title: Tag archive pages
audience: writers, designers
platform: all
version: all
product: all
print: false
thirdlevelitems:
- title: Getting started pages
url: /tag-getting-started.html
audience: writers, designers
platform: all
version: all
product: all
print: false
- title: Formatting pages
url: /tag-formatting.html
audience: writers, designers
platform: all
version: all
product: all
print: false
- title: Navigation pages
url: /tag-navigation.html
audience: writers, designers
platform: all
version: all
product: all
print: false
- title: Content types pages
url: /tag-content-types.html
audience: writers, designers
platform: all
version: all
product: all
print: false
- title: Publishing pages
url: /tag-publishing.html
audience: writers, designers
platform: all
version: all
product: all
print: false
- title: Special layout pages
url: /tag-special-layouts.html
audience: writers, designers
platform: all
version: all
product: all
print: false

View File

@ -3,4 +3,3 @@
# placed here for translation purposes
search_placeholder_text: search...
search_no_results_text: No results found.
copyright_line: "&copy;2015 Company Name. All rights reserved."

View File

@ -1,9 +0,0 @@
allowed-tags:
- getting-started
- content-types
- navigation
- formatting
- publishing
- single-sourcing
- special-layouts

1
_data/terms.yml Normal file
View File

@ -0,0 +1 @@
apple: "apple - the fruit of a disiduous tree."

View File

@ -1,293 +0,0 @@
end: '</a>'
titlepage:
title: "Title Page"
url: "titlepage.html"
link: "<a href='titlepage.html'>Title Page</a>"
tocpage:
title: "Table of Contents"
url: "tocpage.html"
link: "<a href='tocpage.html'>Table of Contents</a>"
index:
title: "Introduction"
url: "index.html"
link: "<a href='index.html'>Introduction</a>"
doc_getting_started:
title: "Getting started with this theme"
url: "doc_getting_started.html"
link: "<a href='doc_getting_started.html'>Getting started with this theme</a>"
doc_configuration_settings:
title: "Setting configuration options"
url: "doc_configuration_settings.html"
link: "<a href='doc_configuration_settings.html'>Setting configuration options</a>"
doc_customizing_the_theme:
title: "Customizing the theme"
url: "doc_customizing_the_theme.html"
link: "<a href='doc_customizing_the_theme.html'>Customizing the theme</a>"
doc_supported_features:
title: "Supported features"
url: "doc_supported_features.html"
link: "<a href='doc_supported_features.html'>Supported features</a>"
doc_pages:
title: "Pages"
url: "doc_pages.html"
link: "<a href='doc_pages.html'>Pages</a>"
doc_webstorm_text_editor:
title: "WebStorm Text Editor"
url: "doc_webstorm_text_editor.html"
link: "<a href='doc_webstorm_text_editor.html'>WebStorm Text Editor</a>"
doc_series:
title: "Series"
url: "doc_series.html"
link: "<a href='doc_series.html'>Series</a>"
doc_collections:
title: "Collections"
url: "doc_collections.html"
link: "<a href='doc_collections.html'>Collections</a>"
doc_sidebar_navigation:
title: "Sidebar navigation"
url: "doc_sidebar_navigation.html"
link: "<a href='doc_sidebar_navigation.html'>Sidebar navigation</a>"
doc_top_navigation:
title: "Top navigation"
url: "doc_top_navigation.html"
link: "<a href='doc_top_navigation.html'>Top navigation</a>"
doc_tags:
title: "Tags"
url: "doc_tags.html"
link: "<a href='doc_tags.html'>Tags</a>"
doc_adding_tooltips:
title: "Tooltips"
url: "doc_adding_tooltips.html"
link: "<a href='doc_adding_tooltips.html'>Tooltips</a>"
doc_alerts:
title: "Alerts"
url: "doc_alerts.html"
link: "<a href='doc_alerts.html'>Alerts</a>"
doc_icons:
title: "Icons"
url: "doc_icons.html"
link: "<a href='doc_icons.html'>Icons</a>"
doc_images:
title: "Images"
url: "doc_images.html"
link: "<a href='doc_images.html'>Images</a>"
doc_labels:
title: "Labels"
url: "doc_labels.html"
link: "<a href='doc_labels.html'>Labels</a>"
doc_hyperlinks:
title: "Links"
url: "doc_hyperlinks.html"
link: "<a href='doc_hyperlinks.html'>Links</a>"
doc_navtabs:
title: "Navtabs"
url: "doc_navtabs.html"
link: "<a href='doc_navtabs.html'>Navtabs</a>"
doc_video_embeds:
title: "Video embeds"
url: "doc_video_embeds.html"
link: "<a href='doc_video_embeds.html'>Video embeds</a>"
doc_tables:
title: "Tables"
url: "doc_tables.html"
link: "<a href='doc_tables.html'>Tables</a>"
doc_syntax_highlighting:
title: "Syntax highlighting"
url: "doc_syntax_highlighting.html"
link: "<a href='doc_syntax_highlighting.html'>Syntax highlighting</a>"
doc_conditional_logic:
title: "Conditional logic"
url: "doc_conditional_logic.html"
link: "<a href='doc_conditional_logic.html'>Conditional logic</a>"
doc_content_reuse:
title: "Content reuse"
url: "doc_content_reuse.html"
link: "<a href='doc_content_reuse.html'>Content reuse</a>"
doc_build_arguments:
title: "Build arguments"
url: "doc_build_arguments.html"
link: "<a href='doc_build_arguments.html'>Build arguments</a>"
doc_themes:
title: "Themes"
url: "doc_themes.html"
link: "<a href='doc_themes.html'>Themes</a>"
doc_generating_pdfs:
title: "Generating PDFs"
url: "doc_generating_pdfs.html"
link: "<a href='doc_generating_pdfs.html'>Generating PDFs</a>"
doc_excluding_files:
title: "Exclude files"
url: "doc_excluding_files.html"
link: "<a href='doc_excluding_files.html'>Exclude files</a>"
doc_help_api:
title: "Help API and UI tooltips"
url: "doc_help_api.html"
link: "<a href='doc_help_api.html'>Help API and UI tooltips</a>"
doc_search_configuration:
title: "Search configuration"
url: "doc_search_configuration.html"
link: "<a href='doc_search_configuration.html'>Search configuration</a>"
doc_iterm_profiles:
title: "iTerm profiles"
url: "doc_iterm_profiles.html"
link: "<a href='doc_iterm_profiles.html'>iTerm profiles</a>"
doc_push_build_to_server:
title: "Pushing builds to server"
url: "doc_push_build_to_server.html"
link: "<a href='doc_push_build_to_server.html'>Pushing builds to server</a>"
doc_kb_layout:
title: "Knowledge-base layout"
url: "doc_kb_layout.html"
link: "<a href='doc_kb_layout.html'>Knowledge-base layout</a>"
doc_scroll:
title: "Scroll layout"
url: "doc_scroll.html"
link: "<a href='doc_scroll.html'>Scroll layout</a>"
doc_shuffle:
title: "Shuffle layout"
url: "doc_shuffle.html"
link: "<a href='doc_shuffle.html'>Shuffle layout</a>"
doc_faq:
title: "FAQ layout"
url: "doc_faq.html"
link: "<a href='doc_faq.html'>FAQ layout</a>"
doc_glossary:
title: "Glossary layout"
url: "doc_glossary.html"
link: "<a href='doc_glossary.html'>Glossary layout</a>"
doc_tag_archives_overview:
title: "Tag archives overview"
url: "doc_tag_archives_overview.html"
link: "<a href='doc_tag_archives_overview.html'>Tag archives overview</a>"
doc_tag-getting-started:
title: "Getting started pages"
url: "doc_tag-getting-started.html"
link: "<a href='doc_tag-getting-started.html'>Getting started pages</a>"
doc_tag-formatting:
title: "Formatting pages"
url: "doc_tag-formatting.html"
link: "<a href='doc_tag-formatting.html'>Formatting pages</a>"
doc_tag-navigation:
title: "Navigation pages"
url: "tag-navigation.html"
link: "<a href='tag-navigation.html'>Navigation pages</a>"
doc_tag-content-types:
title: "Content types pages"
url: "tag-content-types.html"
link: "<a href='tag-content-types.html'>Content types pages</a>"
doc_tag-publishing:
title: "Publishing pages"
url: "tag-publishing.html"
link: "<a href='tag-publishing.html'>Publishing pages</a>"
doc_tag-special-layouts:
title: "Special layout pages"
url: "doc_tag-special-layouts.html"
link: "<a href='doc_tag-special-layouts.html'>Special layout pages</a>"

View File

@ -1,248 +0,0 @@
require 'fileutils'
require 'net/http'
require 'json'
require 'uri'
require 'v8'
module Jekyll
module LunrJsSearch
class Indexer < Jekyll::Generator
def initialize(config = {})
super(config)
lunr_config = {
'excludes' => [],
'strip_index_html' => false,
'min_length' => 3,
'stopwords' => 'stopwords.txt',
'fields' => {
'title' => 10,
'tags' => 20,
'body' => 1
},
'js_dir' => 'js'
}.merge!(config['lunr_search'] || {})
@js_dir = lunr_config['js_dir']
gem_lunr = File.join(File.dirname(__FILE__), "../../build/lunr.min.js")
@lunr_path = File.exist?(gem_lunr) ? gem_lunr : File.join(@js_dir, File.basename(gem_lunr))
raise "Could not find #{@lunr_path}" if !File.exist?(@lunr_path)
ctx = V8::Context.new
ctx.load(@lunr_path)
ctx['indexer'] = proc do |this|
this.ref('id')
lunr_config['fields'].each_pair do |name, boost|
this.field(name, { 'boost' => boost })
end
end
@index = ctx.eval('lunr(indexer)')
@lunr_version = ctx.eval('lunr.version')
@docs = {}
@excludes = lunr_config['excludes']
# if web host supports index.html as default doc, then optionally exclude it from the url
@strip_index_html = lunr_config['strip_index_html']
# stop word exclusion configuration
@min_length = lunr_config['min_length']
@stopwords_file = lunr_config['stopwords']
end
# Index all pages except pages matching any value in config['lunr_excludes'] or with date['exclude_from_search']
# The main content from each page is extracted and saved to disk as json
def generate(site)
Jekyll.logger.info "Lunr:", 'Creating search index...'
@site = site
# gather pages and posts
items = pages_to_index(site)
content_renderer = PageRenderer.new(site)
index = []
items.each_with_index do |item, i|
entry = SearchEntry.create(item, content_renderer)
entry.strip_index_suffix_from_url! if @strip_index_html
entry.strip_stopwords!(stopwords, @min_length) if File.exists?(@stopwords_file)
doc = {
"id" => i,
"title" => entry.title,
"url" => entry.url,
"date" => entry.date,
"categories" => entry.categories,
"body" => entry.body
}
@index.add(doc)
doc.delete("body")
@docs[i] = doc
Jekyll.logger.debug "Lunr:", (entry.title ? "#{entry.title} (#{entry.url})" : entry.url)
end
FileUtils.mkdir_p(File.join(site.dest, @js_dir))
filename = File.join(@js_dir, 'index.json')
total = {
"docs" => @docs,
"index" => @index.to_hash
}
filepath = File.join(site.dest, filename)
File.open(filepath, "w") { |f| f.write(total.to_json(:max_nesting => 150)) }
Jekyll.logger.info "Lunr:", "Index ready (lunr.js v#{@lunr_version})"
added_files = [filename]
site_js = File.join(site.dest, @js_dir)
# If we're using the gem, add the lunr and search JS files to the _site
if File.expand_path(site_js) != File.dirname(@lunr_path)
extras = Dir.glob(File.join(File.dirname(@lunr_path), "*.min.js"))
FileUtils.cp(extras, site_js)
extras.map! { |min| File.join(@js_dir, File.basename(min)) }
Jekyll.logger.debug "Lunr:", "Added JavaScript to #{@js_dir}"
added_files.push(*extras)
end
# Keep the written files from being cleaned by Jekyll
added_files.each do |filename|
site.static_files << SearchIndexFile.new(site, site.dest, "/", filename)
end
end
private
# load the stopwords file
def stopwords
@stopwords ||= IO.readlines(@stopwords_file).map { |l| l.strip }
end
def output_ext(doc)
if doc.is_a?(Jekyll::Document)
Jekyll::Renderer.new(@site, doc).output_ext
else
doc.output_ext
end
end
def pages_to_index(site)
items = []
# deep copy pages
site.pages.each {|page| items << page.dup }
site.posts.each {|post| items << post.dup }
site.documents.each {|document| items << document.dup }
# only process files that will be converted to .html and only non excluded files
items.select! {|i| output_ext(i) == '.html' && ! @excludes.any? {|s| (i.url =~ Regexp.new(s)) != nil } }
items.reject! {|i| i.data['exclude_from_search'] }
items
end
end
end
end
require "v8"
require "json"
class V8::Object
def to_json
@context['JSON']['stringify'].call(self)
end
def to_hash
JSON.parse(to_json, :max_nesting => 150)
end
end
require 'nokogiri'
module Jekyll
module LunrJsSearch
class PageRenderer
def initialize(site)
@site = site
end
def prepare(item)
if item.is_a?(Jekyll::Document)
Jekyll::Renderer.new(@site, item).run
else
item.data = item.data.dup
item.data.delete("layout")
item.render({}, @site.site_payload)
item.output
end
end
# render the item, parse the output and get all text inside <p> elements
def render(item)
item.render(@site.layouts, @site.site_payload)
doc = Nokogiri::HTML(item.output)
article = doc.search('article').map {|t| t.content }
article.join(" ").gsub("\r", " ").gsub("\n", " ").gsub("\t", " ").gsub(/\s+/, " ").split.join(" ")
end
end
end
end
require 'nokogiri'
module Jekyll
module LunrJsSearch
class SearchEntry
def self.create(page_or_post, renderer)
case page_or_post
when Jekyll::Post
date = page_or_post.date
categories = page_or_post.categories
when Jekyll::Page, Jekyll::Document
date = nil
categories = []
else
raise 'Not supported'
end
title, url = extract_title_and_url(page_or_post)
body = renderer.render(page_or_post)
SearchEntry.new(title, url, date, categories, body, renderer)
end
def self.extract_title_and_url(item)
data = item.to_liquid
[ data['title'], data['url'] ]
end
attr_reader :title, :url, :date, :categories, :body, :collection
def initialize(title, url, date, categories, body, collection)
@title, @url, @date, @categories, @body, @collection = title, url, date, categories, body, collection
end
def strip_index_suffix_from_url!
@url.gsub!(/index\.html$/, '')
end
# remove anything that is in the stop words list from the text to be indexed
def strip_stopwords!(stopwords, min_length)
@body = @body.split.delete_if() do |x|
t = x.downcase.gsub(/[^a-z]/, '')
t.length < min_length || stopwords.include?(t)
end.join(' ')
end
end
end
end
module Jekyll
module LunrJsSearch
class SearchIndexFile < Jekyll::StaticFile
# Override write as the index.json index file has already been created
def write(dest)
true
end
end
end
end
module Jekyll
module LunrJsSearch
VERSION = "0.3.0"
end
end

View File

@ -1,10 +0,0 @@
---
title: Common Git Commands
tags: [publishing]
keywords: git, revision control, github, version control
audience: writers, designers
last_updated: May 13, 2015
summary: "These are some sample Git commands."
---
When you're interacting with Github, it's helpful to know a few basic Git commands...

View File

@ -1,55 +0,0 @@
---
---
<script>
$(".escapeMe").remove();
</script>
<!--
http://10consulting.com/2013/03/06/jekyll-and-lunr-js-static-websites-with-powerful-full-text-search-using-javascript/
-->
<div class="home">
<header class="post-header">
<h1>Search</h1>
</header>
<article class="post-content">
<div id="search">
<form action="search.html" method="get">
<input type="text" id="search-query" name="q" placeholder="Search" autocomplete="on">
</form>
</div>
<section id="search-results" style="display: none;">
<p>Search results</p>
<div class="entries">
</div>
</section>
{% raw %}
<script id="search-results-template" type="text/mustache">
{{#entries}}
<article>
<h3>
{{#date}}<small><time datetime="{{pubdate}}" pubdate>{{displaydate}}</time></small>{{/date}}
<a href="{{url}}">{{title}}</a>
</h3>
</article>
{{/entries}}
</script>
{% endraw %}
<script src="../js/search.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function() {
$('#search-query').lunrSearch({
indexUrl: 'js/index.json', // URL of the `index.json` index data for your site
results: '#search-results', // jQuery selector for the search results container
entries: '.entries', // jQuery selector for the element to contain the results list, must be a child of the results element above.
template: '#search-results-template' // jQuery selector for the Mustache.js template
});
});
</script>
</article>
</div>

View File

@ -1,23 +1,42 @@
{% if site.project == "doc_writers" %}
{% comment %}
__ __ _ _
\ \ / / __(_) |_ ___ _ __ ___
\ \ /\ / / '__| | __/ _ \ '__/ __|
\ V V /| | | | || __/ | \__ \
\_/\_/ |_| |_|\__\___|_| |___/
{% endcomment %}
{% if site.project == "mydoc_writers" %}
{% assign audience = "writers" %}
{% assign sidebar = site.data.sidebar_doc.entries %}
{% assign topnav = site.data.topnav_doc.topnav %}
{% assign topnav_dropdowns = site.data.topnav_doc.topnav_dropdowns %}
{% assign sidebar = site.data.mydoc.mydoc_sidebar.entries %}
{% assign topnav = site.data.mydoc.mydoc_topnav.topnav %}
{% assign topnav_dropdowns = site.data.mydoc.mydoc_topnav.topnav_dropdowns %}
{% assign version = "all" %}
{% assign product = "all" %}
{% assign platform = "all" %}
{% assign link = "custom/doc/links_doc.html" %}
{% assign projectTags = site.data.tags_doc.allowed-tags %}
{% assign projectTags = site.data.mydoc.mydoc_tags.allowed-tags %}
{% assign projectFolder = "mydoc" %}
{% endif %}
{% if site.project == "doc_designers" %}
{% comment %}
____ _
| _ \ ___ ___(_) __ _ _ __ ___ _ __ ___
| | | |/ _ \/ __| |/ _` | '_ \ / _ \ '__/ __|
| |_| | __/\__ \ | (_| | | | | __/ | \__ \
|____/ \___||___/_|\__, |_| |_|\___|_| |___/
|___/
{% endcomment %}
{% if site.project == "mydoc_designers" %}
{% assign audience = "designers" %}
{% assign sidebar = site.data.sidebar_doc.entries %}
{% assign topnav = site.data.topnav_doc.topnav %}
{% assign topnav_dropdowns = site.data.topnav_doc.topnav_dropdowns %}
{% assign sidebar = site.data.mydoc.mydoc_sidebar.entries %}
{% assign topnav = site.data.mydoc.mydoc_topnav.topnav %}
{% assign topnav_dropdowns = site.data.mydoc.mydoc_topnav.topnav_dropdowns %}
{% assign version = "all" %}
{% assign product = "all" %}
{% assign platform = "all" %}
{% assign link = "custom/doc/links_doc.html" %}
{% assign projectTags = site.data.tags_doc.allowed-tags %}
{% assign projectTags = site.data.mydoc.mydoc_tags.allowed-tags %}
{% assign projectFolder = "mydoc" %}
{% endif %}

View File

@ -3,9 +3,9 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle otherProgLangs" data-toggle="dropdown">Custom Menu<b class="caret"></b></a>
<ul class="dropdown-menu">
<li {% if site.audience == "writers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../doc_writers/{{site.suffix}}">Writer docs</a> {% else %} ../doc_writers{{page.url}}">Writer docs</a>{% endif %}</li>
<li {% if site.audience == "writers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../mydoc_writers/">Writer docs</a> {% else %} ../mydoc_writers{{page.url}}">Writer docs</a>{% endif %}</li>
<li {% if site.audience == "designers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../doc_designers/{{site.suffix}}">Designer doc</a> {% else %} ../doc_designers{{page.url}}">Designer docs</a>{% endif %}</li>
<li {% if site.audience == "designers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../mydoc_designers/">Designer docs</a> {% else %} ../mydoc_designers{{page.url}}">Designer docs</a>{% endif %}</li>
</ul>
</li>

View File

@ -0,0 +1,19 @@
<div class="seriesContext">
<div class="btn-group">
<button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Getting Started <span class="caret"></span></button>
<ol class="dropdown-menu">
{% assign pages = site.pages | sort:"weight" %}
{% for p in pages %}
{% if p.series == "Getting Started" %}
{% if p.url == page.url %}
<li class="active"> → {{p.title}}</li>
{% else %}
<li>
<a href="{{p.url | prepend: '..'}}">{{p.title}}</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ol>
</div>
</div>

View File

@ -0,0 +1,11 @@
<p>{% assign series_pages = site.tags.series_acme %}
{% for p in pages %}
{% if p.series == "Getting Started" %}
{% assign nextTopic = page.weight | plus: "1" %}
{% if p.weight == nextTopic %}
<a href="{{p.url | prepend: '..'}}"><button type="button" class="btn btn-primary">Next: {{p.title}}</button></a>
{% endif %}
{% endif %}
{% endfor %}
</p>

View File

@ -9,7 +9,7 @@
<li class="active"> → {{p.weight}}. {{p.title}}</li>
{% else %}
<li>
<a href="{{p.url | replace: '/',''}}">{{p.weight}}. {{p.title}}</a>
<a href="{{p.url | prepend: '..'}}">{{p.weight}}. {{p.title}}</a>
</li>
{% endif %}
{% endif %}

View File

@ -3,7 +3,7 @@
{% if p.series == "ACME series" %}
{% assign nextTopic = page.weight | plus: "0.1" %}
{% if p.weight == nextTopic %}
<a href="{{p.url | replace: '/',''}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a>
<a href="{{p.url | prepend: '..'}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a>
{% endif %}
{% endif %}
{% endfor %}

View File

@ -1,9 +1,9 @@
<footer>
<div class="row">
<div class="col-lg-12 footer">
{{site.data.strings.copyright_line}}<br />
&copy;{{ site.time | date: "%Y" }} {{site.company_name}}. All rights reserved. <br />
{% if page.last_updated %}<p>Page last updated:</span> {{page.last_updated}}<br/>{% endif %} Site last generated: {{ site.time | date: "%b %-d, %Y" }} <br />
<p><img src="images/company_logo.png"/></p>
<p><img src="{{site.footer_image_location}}/></p>
</div>
</div>
</footer>
</footer>

View File

@ -1,8 +1,9 @@
<script type="text/javascript">
<script language="JavaScript" type="text/javascript">
$( document ).ready(function() {
if (top.location == location) {
// Handler for .ready() called.
if (top.location == location) {
$(".escapeMe").remove();
}
@ -10,6 +11,7 @@
function breakout_of_frame() {
if (top.location != location) {
//top.location.href = document.location.href;
window.open(window.location.href, '_blank');
}

View File

@ -1,12 +1,6 @@
<!-- the google_analytics_id gets auto inserted from the config file -->
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{site.google_analytics}}', 'auto');
ga('send', 'pageview');
</script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','{{site.google_analytics}}','auto');ga('require','displayfeatures');ga('send','pageview');</script>
{% endif %}

View File

@ -4,20 +4,21 @@
<meta name="description" content="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %}">
<meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
<title>{% if page.homepage == true %} {{site.homepage_title}} {% elsif page.title %}{{ page.title }}{% endif %} | {{ site.site_title }}</title>
<link rel="stylesheet" type="text/css" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/modern-business.css">
<link rel="stylesheet" type="text/css" href="css/lavish-bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/customstyles.css">
<link rel="stylesheet" type="text/css" href="css/{{site.theme_file}}">
<link rel="stylesheet" type="text/css" href="../css/syntax.css">
<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css">
<!--<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">-->
<link rel="stylesheet" type="text/css" href="../css/modern-business.css">
<link rel="stylesheet" type="text/css" href="../css/lavish-bootstrap.css">
<link rel="stylesheet" type="text/css" href="../css/customstyles.css">
<link rel="stylesheet" type="text/css" href="../css/{{site.theme_file}}">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="js/jquery.navgoco.min.js"></script>
<script src="../js/jquery.navgoco.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="js/toc.js"></script>
<script src="js/customscripts.js"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
<script src="../js/toc.js"></script>
<script src="../js/customscripts.js"></script>
<link rel="shortcut icon" href="../common_images/favicon.ico" type="image/x-icon">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>

View File

@ -4,13 +4,17 @@
<meta name="description" content="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %}">
<meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
<title>{% if page.homepage == true %} {{site.homepage_title}} {% elsif page.title %}{{ page.title }}{% endif %} | {{ site.site_title }}</title>
<link rel="stylesheet" type="text/css" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/modern-business.css">
<link rel="stylesheet" type="text/css" href="css/lavish-bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/customstyles.css">
<link rel="stylesheet" type="text/css" href="css/{{site.theme_file}}">
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/modern-business.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/lavish-bootstrap.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/customstyles.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" type="text/css" href="{{site.url}}/{{site.baseurl}}/css/{{site.theme_file}}">
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/printstyles.css" | prepend: site.baseurl }}">
<script>
Prince.addScriptFunc("datestamp", function() {

View File

@ -0,0 +1,28 @@
<hr />
<!-- code doesn't work -- tags work much better, but leaving this here in case i figure out the issue. -->
<h3>Related Pages</h3>
<ul id="related_pages">
{% assign currentTitle = page.title %}
{% for tag in page.tags %}
{% assign counter = '0' %}
{% for page in site.pages %}
{% if page.tags contains tag and page.title != currentTitle and counter < '10' %}
{% capture counter %}{{ counter | plus:'1' }}{% endcapture %}
{% assign pageList = "" | split: "|" %}
{{ pageList | push: page.title }}
{% endif %}
{% endfor %}
{% assign unique_pageList = pageList | uniq %}
{% for item in unique_pageList %}
<li><a href="{{ item.url}}">{{item.title}}</a></li>
{% endfor %}
{% if counter == '0' %}<span class="noOtherPages"><p>No other pages.</p></span>
{% endif %}
{% endfor %}
</ul>

View File

@ -6,32 +6,32 @@
<script>
$(document).ready(function() {
// Initialize navgoco with default options
$("#mysidebar").navgoco({
caretHtml: '',
accordion: true,
openClass: 'active', // open
save: false, // leave false or nav highlighting doesn't work right
cookie: {
name: 'navgoco',
expires: false,
path: '/'
},
slide: {
duration: 400,
easing: 'swing'
}
});
// Initialize navgoco with default options
$("#mysidebar").navgoco({
caretHtml: '',
accordion: true,
openClass: 'active', // open
save: false, // leave false or nav highlighting doesn't work right
cookie: {
name: 'navgoco',
expires: false,
path: '/'
},
slide: {
duration: 400,
easing: 'swing'
}
});
$("#collapseAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', false);
});
$("#collapseAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', false);
});
$("#expandAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', true);
});
$("#expandAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', true);
});
});
@ -47,31 +47,31 @@
{% for entry in sidebar %}
{% for subcategory in entry.subcategories %}
{% 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.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
<li><a href="#">{{ subcategory.title }}</a>
<ul>
{% for item in subcategory.items %}
{% 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.audience contains audience and item.product contains product and item.platform contains platform and item.version contains version and item.output contains "web" %}
{% if item.external_url %}
<li><a href="{{item.external_url}}" target="_blank">{{subcategory.title}}</a></li>
{% elsif page.url == item.url %}
<li class="active"><a href="{{item.url | replace: "/",""}}">{{item.title}}</a></li>
<li class="active"><a href="{{item.url | prepend: ".."}}">{{item.title}}</a></li>
{% else %}
<li><a href="{{item.url | replace: "/",""}}">{{item.title}}</a></li>
<li><a href="{{item.url | prepend: ".."}}">{{item.title}}</a></li>
{% endif %}
{% for thirdlevel in item.thirdlevel %}
{% if thirdlevel.audience contains audience and thirdlevel.product contains product and thirdlevel.platform contains platform and thirdlevel.version contains version and thirdlevel.web != false %}
{% if thirdlevel.audience contains audience and thirdlevel.product contains product and thirdlevel.platform contains platform and thirdlevel.version contains version and thirdlevel.output contains "web" %}
<li class="thirdlevel"><a href="#">{{ thirdlevel.title }}</a>
<ul>
{% for deeplevel in thirdlevel.thirdlevelitems %}
{% if deeplevel.audience contains audience and deeplevel.product contains product and deeplevel.platform contains platform and deeplevel.version contains version and deeplevel.web != false %}
{% if deeplevel.audience contains audience and deeplevel.product contains product and deeplevel.platform contains platform and deeplevel.version contains version and deeplevel.output contains "web" %}
{% if deeplevel.external_url %}
<li><a href="{{deeplevel.external_url}}" target="_blank">{{deeplevel.title}}</a></li>
{% elsif page.url == deeplevel.url %}
<li class="active"><a href="{{deeplevel.url | replace: "/",""}}">{{deeplevel.title}}</a></li>
<li class="active"><a href="{{deeplevel.url | prepend: ".."}}">{{deeplevel.title}}</a></li>
{% else %}
<li><a href="{{deeplevel.url | replace: "/",""}}">{{deeplevel.title}}</a></li>
<li><a href="{{deeplevel.url | prepend: ".."}}">{{deeplevel.title}}</a></li>
{% endif %}
{% endif %}
@ -81,21 +81,21 @@
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endfor %}
<!-- if you aren't using the accordion, uncomment this block:
<!-- if you aren't using the accordion, uncomment this block:
<p class="external">
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
</p>
-->
<p class="external">
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
</p>
-->
</div>
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above.-->
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>$("li.active").parents('li').toggleClass("active");</script>

View File

@ -6,7 +6,7 @@
{% for tag in page.tags %}
{% if tag == thisTag %}
<tr><td><a href="{{ page.url | replace: '/',''}}">{{page.title}}</a></td>
<tr><td><a href="{{ page.url | prepend: '..'}}">{{page.title}}</a></td>
<td>{% if page.summary %} {{ page.summary | strip_html | strip_newlines | truncate: 160 }} {% else %} {{ page.content | truncatewords: 50 | strip_html }} {% endif %}</td>
</tr>
{% endif %}

View File

@ -17,6 +17,7 @@ $('#toc').on('click', 'a', function() {
});
</script>
{% unless page.toc == false %}
<div id="toc"></div>
{% endunless %}

View File

@ -1,5 +1,5 @@
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container topnavlinks">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
@ -8,11 +8,9 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if site.suffix %}
<a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> {{site.topnav_title}}</span></a>
{% else %}
<a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> {{site.topnav_title}}</span></a>
{% endif %}
<a class="fa fa-home fa-lg navbar-brand" href="home.html">&nbsp;<span class="projectTitle"> {{site.topnav_title}}</span></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
@ -22,7 +20,7 @@
{% for entry in topnav %}
{% for subcategory in entry.subcategories %}
{% 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.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
{% if subcategory.external_url %}
<li><a href="{{subcategory.external_url}}" target="_blank">{{subcategory.title}}</a></li>
{% elsif page.url == subcategory.url %}
@ -41,15 +39,15 @@
<li class="dropdown">
{% for entry in topnav_dropdowns %}
{% for subcategory in entry.subcategories %}
{% 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.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ subcategory.title }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% for subitem in subcategory.items %}
{% if subitem.audience contains audience and subitem.product contains product and subitem.platform contains platform and subcategory.version contains version and subitem.web != false %}
{% if subitem.audience contains audience and subitem.product contains product and subitem.platform contains platform and subcategory.version contains version and subitem.output contains "web" %}
{% if subitem.external_url %}
<li><a href="{{subitem.external_url}}" target="_blank">{{subitem.title}}</a></li>
{% elsif page.url contains subitem.url %}
<li class="dropdownActive"><a href="{{subitem.url | replace: '/',''}}">{{subitem.title}}</a></li>
<li class="dropdownActive"><a href="{{subitem.url}}">{{subitem.title}}</a></li>
{% else %}
<li><a href="{{subitem.url | replace: "/",""}}">{{subitem.title}}</a></li>
{% endif %}
@ -65,35 +63,37 @@
<!-- special insertion -->
{% comment %} {% include custom/doc/customMenu.html %}{% endcomment %}
{% if site.project == "mydoc_designers" or site.project == "mydoc_writers" %}
{% comment %}
{% include custom/mydoc/custom_menu.html %}
{% endcomment %}
{% endif %}
{% include feedback.html %}
<li>
<!-- start search -->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="{{site.data.strings.search_placeholder_text}}">
<ul id="results-container"></ul>
</div>
<script src="js/jekyll-search.js" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: 'search.json',
searchResultTemplate: '<li><a href="{url}" title="{{page.title}}">{title}</a></li>',
noResultsText: '{{site.data.strings.search_no_results_text}}',
limit: 10,
fuzzy: true,
})
</script>
<!-- end search -->
<!-- start search -->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="{{site.data.strings.search_placeholder_text}}">
<ul id="results-container"></ul>
</div>
<script src="../js/jekyll-search.js" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: '../search.json',
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "'", "\"}}">{title}</a></li>',
noResultsText: '{{site.data.strings.search_no_results_text}}',
limit: 10,
fuzzy: true,
})
</script>
<!-- end search -->
</li>
{% comment %}
{% include frameescape.html %}
{% endcomment %}
</div>
<!-- /.container -->
</ul>
</div></nav>
</nav>

View File

@ -1,4 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
@ -9,17 +10,10 @@
$('[data-toggle="tooltip"]').tooltip()
})
</script>
{% unless site.print == true %}
{% if page.video == true %}
<link href="https://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/4.12/video.js"></script>
{% endif %}
{% endunless %}
{% unless site.print == true %}
{% if page.datatable == true %}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.5/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.5/js/jquery.dataTables.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.5/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.5/js/jquery.dataTables.js"></script>
<script>
$(document).ready(function(){
@ -30,7 +24,6 @@
);
</script>
{% endif %}
{% endunless %}
</head>

View File

@ -4,11 +4,8 @@
<head>
{% include head_print.html %}
<link rel="stylesheet" type="text/css" href="css/customstyles.css">
<link rel="stylesheet" type="text/css" href="css/{{site.theme_file}}">
<link rel="stylesheet" type="text/css" href="css/printstyles.css">
</head>
</head>
<body class="{% if page.type == "title"%}title{% elsif page.type == "frontmatter" %}frontmatter{% elsif page.type == "first_page" %}first_page{% endif %} print">

View File

@ -1,6 +1,7 @@
---
layout: default
---
<div class="post-header">
<h1 class="post-title-main">{% if page.homepage == true %} {{site.homepage_title}} {% else %}{{ page.title }}{% endif %}</h1>
</div>
@ -10,13 +11,16 @@ layout: default
{% if page.summary %}
<div class="summary">{{page.summary}}</div>
{% endif %}
{% include toc.html %}
{% include toc.html %}
{% if jekyll.environment == "development" %}
{% if site.github_editme_path %}
<a href="https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}" class="btn btn-default " role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
{% endif %}
{{content}}
<a target="_blank" href="https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
{% endif %}
{% endif %}
{{content}}
<div class="tags">
{% if page.tags != null %}
@ -24,14 +28,13 @@ layout: default
{% include custom/conditions.html %}
{% for tag in page.tags %}
{% if projectTags contains tag %}
<a href="tag-{{tag}}.html" class="btn btn-info navbar-btn cursorNorm" role="button">{{page.tagName}}{{tag}}</a>
<a href="tag_{{tag}}.html" class="btn btn-info navbar-btn cursorNorm" role="button">{{page.tagName}}{{tag}}</a>
{% endif %}
{% endfor %}
{% endif %}
</div>
{% include disqus.html %}
{% comment %}{% include disqus.html %} {% endcomment %}
</div>

View File

@ -3,16 +3,14 @@ layout: default_print
comments: true
---
<div class="post-header">
<h1 class="post-title-main" id="{{page.permalink | replace: '/', '' }}">{{ page.title }}</h1>
<h1 class="post-title-main" id="{{page.permalink | replace: '/', '' }}">{{ page.title }}</h1>
</div>
<div class="post-content">
{% if page.summary %}
{% if page.summary %}
<div class="summary">{{page.summary}}</div>
{% endif %}
{% endif %}
{{ content }}
</div>

13
_layouts/tag_page.html Normal file
View File

@ -0,0 +1,13 @@
---
layout: default
---
<h2>{{ page.tag }}</h2>
<ul>
{% for post in page.posts %}
<li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
{% endfor %}
</ul>
<div id="tag_cloud">
{{ site | tag_cloud }}
</div>

View File

@ -1,5 +0,0 @@
---
id: baseball
---
{{site.data.definitions.baseball}}

View File

@ -1,5 +0,0 @@
---
id: basketball
---
{{site.data.definitions.basketball}}

View File

@ -1,5 +0,0 @@
---
id: football
---
{{site.data.definitions.football}}

View File

@ -0,0 +1,6 @@
---
id: baseball
product: mydoc
---
{{site.data.mydoc.mydoc_definitions.baseball}}

View File

@ -0,0 +1,6 @@
---
id: basketball
product: mydoc
---
{{site.data.mydoc.mydoc_definitions.basketball}}

View File

@ -0,0 +1,6 @@
---
id: football
product: mydoc
---
{{site.data.mydoc.mydoc_definitions.football}}

View File

@ -0,0 +1,6 @@
---
id: soccer
product: mydoc
---
{{site.data.mydoc.mydoc_definitions.soccer}}

View File

@ -1,5 +0,0 @@
---
id: soccer
---
{{site.data.definitions.soccer}}

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -1,64 +0,0 @@
# project definitions
project: doc_designers
audience: designers
product: all
platform: all
version: all
destination: ../doc_designers
topnav_title: Jekyll Documentation Theme
homepage_title: Jekyll Documentation Theme &mdash; Designers
site_title: Jekyll Documentation Theme &mdash; Designers
disqus_shortname: idrbwjekyll
google_analytics: UA-66296557-1
github_editme_path: tomjohnson1492/documentation-theme-jekyll/blob/gh-pages
# don't use a slash before or after the above path. here's how this url gets written out in page.html: https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}
# variables
sidebar_tagline: designers
sidebar_version: version 3.0
project_file_name: doc
port: 4001
exclude:
- doc_writer*
- configs/
- _site
- di_multi*
# same for all
host: 127.0.0.1
feedback_email: tomjohnson1492@gmail.com
markdown: redcarpet
print: false
theme_file: theme-blue.css
# only use suffix if you need to force index.html to display
# suffix: index.html
highlighter: pygments
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"]
collections:
tooltips:
output: true
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page"
comments: true
-
scope:
path: ""
type: "posts"
values:
layout: "post"
comments: true

View File

@ -1,16 +0,0 @@
destination: ../doc_designers-pdf
url: "http://127.0.0.1:4002"
baseurl: "/doc_designers"
port: 4002
print: true
print_title: Jekyll Documentation Theme for Designers
print_subtitle: version 3.0
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page_print"
comments: true
search: true

View File

@ -1,66 +0,0 @@
# project definitions
project: doc_writers
audience: writers
product: all
platform: all
version: all
destination: ../doc_writers
topnav_title: Jekyll Documentation Theme
homepage_title: Jekyll Documentation Theme &mdash; Writers
site_title: Jekyll Documentation Theme &mdash; Writers
disqus_shortname: idrbwjekyll
google_analytics: UA-66296557-1
github_editme_path: tomjohnson1492/documentation-theme-jekyll/blob/gh-pages
# don't use a slash before or after the above path. here's how this url gets written out in page.html: https://github.com/{{site.github_editme_path}}{{page.url | replace: '.html', '.md'}}
# variables
sidebar_tagline: writers
sidebar_version: version 3.0
theme_file: theme-green.css
project_file_name: doc
port: 4003
exclude:
- doc_designers*
- configs/
- _site
- _drafts
- di_multi*
# same for all
host: 127.0.0.1
feedback_email: tomjohnson1492@gmail.com
sidebar_accordion: true
markdown: redcarpet
print: false
# only use suffix if you need to force index.html to display
# suffix: index.html
highlighter: pygments
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"]
collections:
tooltips:
output: true
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page"
comments: true
-
scope:
path: ""
type: "posts"
values:
layout: "post"
comments: true

View File

@ -1,16 +0,0 @@
destination: ../doc_writers-pdf
url: "http://127.0.0.1:4004"
baseurl: "/doc_writers"
port: 4004
print: true
print_title: Jekyll Documentation Theme for Writers
print_subtitle: version 3.0
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page_print"
comments: true
search: true

View File

@ -0,0 +1,64 @@
# project definitions
project: mydoc_designers
audience: designers
product: doc
platform: all
version: all
output: web
destination: ../doc_outputs/mydoc/designers
topnav_title: Jekyll Documentation Theme
homepage_title: Jekyll doc theme for designers
site_title: Jekyll theme for designers
project_folder: mydoc
company_name: Your company
footer_image_location: ../common_images/company_logo.png
github_editme_path: tomjohnson1492/documentation-theme-jekyll/edit/reviews
# variables
sidebar_tagline: Designers
sidebar_version: Version 4.0
theme_file: theme-blue.css
pdf_file_name: mydoc_designers_pdf.pdf
port: 4009
exclude:
- _site
- _drafts
- configs/
- doc/mydoc_writers*
# same for all
host: 127.0.0.1
feedback_email: tomjohnson1492@gmail.com
markdown: redcarpet
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"]
highlighter: pygments
collections:
tooltips:
output: false
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page"
comments: true
search: true
-
scope:
path: ""
type: "tooltips"
values:
layout: "page"
comments: true
search: true
tooltip: true

View File

@ -0,0 +1,17 @@
destination: ../doc_outputs/mydoc/designers-pdf
url: "http://127.0.0.1:4010"
baseurl: "/mydoc/designers-pdf"
port: 4010
output: pdf
print_title: Jekyll theme for documentation — designers
print_subtitle: version 4.0
output: pdf
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page_print"
comments: true
search: true

View File

@ -0,0 +1,64 @@
# project definitions
project: mydoc_writers
audience: writers
product: doc
platform: all
version: all
output: web
destination: ../doc_outputs/mydoc/writers
topnav_title: Jekyll Documentation Theme
homepage_title: Jekyll doc theme for writers
site_title: Jekyll theme for writers
project_folder: mydoc
company_name: Your company
footer_image_location: ../common_images/company_logo.png
github_editme_path: tomjohnson1492/documentation-theme-jekyll/edit/reviews
# variables
sidebar_tagline: Writers
sidebar_version: Version 4.0
theme_file: theme-green.css
pdf_file_name: mydoc_writers_pdf.pdf
port: 4009
exclude:
- _site
- _drafts
- configs/
- doc/mydoc_designers*
# same for all
host: 127.0.0.1
feedback_email: tomjohnson1492@gmail.com
markdown: redcarpet
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"]
highlighter: pygments
collections:
tooltips:
output: false
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page"
comments: true
search: true
-
scope:
path: ""
type: "tooltips"
values:
layout: "page"
comments: true
search: true
tooltip: true

View File

@ -0,0 +1,17 @@
destination: ../doc_outputs/mydoc/writers-pdf
url: "http://127.0.0.1:4012"
baseurl: "/mydoc/writers-pdf"
port: 4012
output: pdf
print_title: Jekyll theme for documentation — writers
print_subtitle: version 4.0
output: pdf
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page_print"
comments: true
search: true

View File

@ -1,3 +1,7 @@
body {
font-size:15px;
}
.bs-callout {
padding: 20px;
margin: 20px 0;
@ -157,7 +161,9 @@ table > colgroup + thead > tr:first-child > td,
table > thead:first-child > tr:first-child > td {
border-top: 0;
}
table > tbody + tbody {
b
}
table > tbody > tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
@ -194,7 +200,6 @@ p.external a {
font-size:12px;
font-color: #0088cc;
display:inline;
margin-top:7px;
}
#definition-box-container div a.active {
@ -319,21 +324,6 @@ font-size: 14px;
text-decoration: none;
}
dl dt p {
margin-left:20px;
}
dl dd {
margin-top:10px;
margin-bottom:10px;
}
dl.dl-horizontal dd {
padding-top: 20px;
}
/* navgoco sidebar styles (customized) */
.nav, .nav ul, .nav li {
list-style: none;
@ -465,24 +455,23 @@ font-style:italic;
font-size:12px;
}
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #444;
}}
img.screenshotSmall {
max-width: 300px;
}
dl dt p {
margin-left:20px;
}
dl dd {
margin-top:10px;
margin-bottom:10px;
}
@media (max-width: 990px) {
#mysidebar {
position: relative;
}
dl.dl-horizontal dd {
padding-top: 20px;
}
figcaption {
@ -491,14 +480,20 @@ figcaption {
padding-top:6px;
max-width: 90%;
margin-bottom:20px;
font-style: italic;
color: gray;
}
.siteTagline {
margin: 20px 0px;
font-size:17px;
.testing {
color: orange;
}
.preference {
color: red;
}
table.dataTable thead {
background-color: #444;
}
@ -521,7 +516,6 @@ section table tr.danger, table tr.preference, table tr.preference > td.sorting_1
background-color: #f2dede !important;
}
.orange {
color: orange;
}
@ -587,11 +581,6 @@ hr.shaded {
i.border {
padding: 10px 20px;
background-color: whitesmoke;
border: 1px solid #777;
text-align: center;
margin-left: auto;
margin-right: auto;
width: 100%;
}
a[data-toggle] {
@ -600,8 +589,11 @@ a[data-toggle] {
.summary {
font-size:120%;
color: #808080;
margin:20px 0px 20px 0px;
border-left: 5px solid #ED1951;
padding-left: 10px;
}
.summary:before {
@ -614,13 +606,18 @@ a.fa.fa-envelope-o.mailto {
font-weight: 600;
}
h3 { font-weight:normal; font-size:130%;}
h4 {font-weight:normal; font-size:120%; font-style:italic;}
h3 {color: #ED1951; font-weight:normal; font-size:130%;}
h4 {color: #808080; font-weight:normal; font-size:120%; font-style:italic;}
.alert, .callout {
overflow: hidden;
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
background-color: #248ec2;
color: white;
}
ol li ol li {list-style-type: lower-alpha;}
li img {clear:both; }
@ -687,6 +684,12 @@ span.otherProgrammingLanguages {
font-style: normal;
}
a[data-toggle="tooltip"] {
color: #649345;
font-style: italic;
cursor: default;
}
.seriesNext, .seriesContext {
margin-top: 15px;
margin-bottom: 15px;
@ -709,14 +712,22 @@ ol.series li {
font-family: monospace;
text-align: center;
line-height: 10px;
margin: 20px 0px;
display: block;
}
.versionTagline {
text-align: center;
margin-bottom: 20px;
font-family: monospace;
font-family: courier;
font-color: silver;
color: #444;
display:block;
}
/* not sure if using this ...*/
.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form {
border-color: #248ec2 !important;
}
#mysidebar .nav ul {
@ -738,21 +749,13 @@ ol.series li {
background-color: #FAFAFA;
}
@media (min-width: 1000px) {
ul#mysidebar {
width: 225px;
}
/*
a.dropdown-toggle.otherProgLangs {
color: #f7e68f !important;
}
*/
@media (max-width: 900px) {
ul#mysidebar {
max-width: 100%;
}
}
span.muted {color: #C0C0C0;}
span.muted {color: #666;}
table code {background-color: transparent;}
@ -778,14 +781,22 @@ pre {
margin: 25px 0px;
}
.panel-heading {
font-weight: bold;
}
#json-box-container pre {
margin: 0px;
}
p.dataType {display: block; font-color: gray; font-size: 80%;}
.video-js {
margin: 30px 0px;
}
video {
display: block;
margin: 30px 0px;
border: 1px solid #c0c0c0;
}
p.required, p.dataType {display: block; color: #c0c0c0; font-size: 80%; margin-left:4px;}
dd {margin-left:20px;}
@ -793,6 +804,9 @@ dd {margin-left:20px;}
margin:0px;
margin-bottom:6px;
}
.panel-heading {
font-weight: bold;
}
.note code, .alert code, .warning code, div#toc code, h2 code, h3 code, h4 code {
color: inherit;
@ -803,18 +817,136 @@ dd {margin-left:20px;}
margin-bottom:10px;
}
.kbCaption {
padding: 5px;
font-family: courier;
background-color: #dedede;
text-align: center;
/* branding */
.navbar-inverse {
background-color: #347DBE;
border-color: #015CAE;
}
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
color: #015CAE;
}
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
background-color: #015CAE;
color: #ffffff;
}
a.accordion-toggle {
font-style: normal;
}
span.red {
color: red;
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
}
.tommy {font-weight:bold; font-color: red;}
#johnson {font-weight:bold; font-color: blue;}
h3.codeExplanation {
font-size:18px;
font-style:normal;
color: black;
line-height: 24px;
}
span.soft {
color: #c0c0c0;
}
.githubEditButton {
margin-bottom:7px;
}
.endpoint {
padding: 15px;
background-color: #f0f0f0;
font-family: courier;
font-size: 110%;
margin: 20px 0px;
color: #444;
}
.parameter {
font-family: courier;
color: red !important;
}
.formBoundary {
border: 1px solid gray;
padding: 15px;
margin: 15px 0px;
background-color: whitesmoke;
}
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #444;
}
}
@media (max-width: 990px) {
#mysidebar {
position: relative;
}
}
@media (min-width: 1000px) {
ul#mysidebar {
width: 225px;
}
}
@media (max-width: 900px) {
ul#mysidebar {
max-width: 100%;
}
}
.col-md-9 img {
max-width: 100%;
max-height: 100%;
}
.videoThumbs img {
float: left;
margin:15px 15px 15px 0px;
box-shadow: 2px 2px 1px #f0f0f0;
border: 1px solid #dedede;
}
@media only screen and (min-width: 900px), @media only screen and (min-device-width: 900px) {
.col-md-9 img {
max-width: 700px;
max-height: 700px;
}
}
*:hover > .anchorjs-link {
transition: color .25s linear;
text-decoration: none;
}
.kbCaption {
color: white;
background-color: #444;
padding:10px;
}
/* this part adds an icon after external links, using FontAwesome*/
a[href^="http://"]:after, a[href^="https://"]:after {
content: "\f08e";
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
display: inline-block;
text-decoration: none;
padding-left: 3px;
}
/* Strip from links to own domain or with class no_icon */
a[href^="http://own-domain.com"]:after,
a.no_icon:after {
content:"" !important;
padding-left: 0;
}

View File

@ -1878,6 +1878,8 @@ fieldset[disabled] .btn-default.active {
}
.btn-primary {
color: #ffffff;
background-color: #74ab50;
border-color: #689a48;
}
.btn-primary:hover,
.btn-primary:focus,
@ -1885,6 +1887,8 @@ fieldset[disabled] .btn-default.active {
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
color: #ffffff;
background-color: #618f43;
border-color: #4c7034;
}
.btn-primary:active,
.btn-primary.active,
@ -1906,6 +1910,8 @@ fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #74ab50;
border-color: #689a48;
}
.btn-warning {
color: #ffffff;

View File

@ -76,7 +76,7 @@ footer {
/* Responsive Styles */
@media(max-width:991px) {
.customer-img,
.client-img,
.img-related {
margin-bottom: 30px;
}

View File

@ -1,6 +1,9 @@
/*body.print .container {max-width: 650px;}*/
body {
font-size:14px;
}
.nav ul li a {border-top:0px; background-color:transparent; color: #808080; }
#navig a[href] {color: #595959 !important;}
table .table {max-width:650px;}
@ -72,6 +75,7 @@ a[href*="mailto"]::after, a[data-toggle="tooltip"]::after, a[href].noCrossRef::a
.copyrightBoilerplate {
page-break-before:always;
font-size:14px;
}
.lastGeneratedDate {

View File

@ -1,6 +1,7 @@
.summary {
color: #808080;
border-left: 5px solid #ED1951;
font-size:16px;
}
@ -54,24 +55,28 @@ a[data-toggle="tooltip"] {
border-color: #347DBE;
}
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
background-color: #347DBE;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
background-color: #248ec2;
background-color: #248ec2;
border-color: #347DBE;
}
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
background-color: #347DBE;
}
.printTitle {
color: #015CAE !important;
}
body.print h1 {color: #015CAE !important; font-size:28px;}
body.print h2 {color: #595959 !important; font-size:24px;}
body.print h3 {color: #E50E51 !important; font-size:14px;}
body.print h4 {color: #679DCE !important; font-size:14px; font-style: italic;}
body.print h1 {color: #015CAE !important; font-size:28px !important;}
body.print h2 {color: #595959 !important; font-size:20px !important;}
body.print h3 {color: #E50E51 !important; font-size:14px !important;}
body.print h4 {color: #679DCE !important; font-size:14px; font-style: italic !important;}
.anchorjs-link:hover {
color: #216f9b;
}

View File

@ -1,6 +1,7 @@
.summary {
color: #808080;
border-left: 5px solid #E50E51;
font-size:16px;
}
@ -70,3 +71,7 @@ body.print h1 {color: #5b893c !important; font-size:28px;}
body.print h2 {color: #595959 !important; font-size:24px;}
body.print h3 {color: #E50E51 !important; font-size:14px;}
body.print h4 {color: #679DCE !important; font-size:14px; font-style: italic;}
.anchorjs-link:hover {
color: #4f7233;
}

View File

@ -1,124 +0,0 @@
---
title: Setting configuration options
tags: [single-sourcing, publishing]
keywords: configuration, config, publishing options, outputs, projects
last_updated: August 12, 2015
summary: "The configuration file contains important settings for your project. Some of the values you set here affect &mdash; especially the product, platform, audience, and version &mdash; the display and functionality of the theme."
---
## Importance of Configuration File
The configuration file serves important functions with single sourcing. For each site output, you create a unique configuration file for that output.
The configuration file contains all the settings and other details unique to that site output, such as variables, titles, output directories, build folders, and more.
{{site.data.alerts.warning}} This theme is coded to look for specific values set by the configuration file. If something isn't working correctly, check to make sure that you have the configuration values that are defined here.{{site.data.alerts.end}}
## Configuration file options
Some of the options you can set in the configuration file determine theme settings.
Note that you can define arbitrary key-value pairs in the configuration file, and then you can access them through `site.yourkey`, where `yourkey` is the name of the key. However, the values in these tables are used to control different aspects of the theme and are not arbitrary key-value pairs.
## Configuration settings for web outputs
| Field | Required? | Description |
|-------|-----------|-----------|
| **project** | Required| A unique name for the project. The \_includes/custom/conditions.html file will use this project name to determine what sidebar and top nav data files to use. Make this value unique. Note that the project name also determines what conditions are set in the \_includes/conditions.html file. Therefore it's critical that the project name you specify in the configuration file matches the project names in the conditions.html file. Otherwise, the conditions.html file won't be able to set the right variables needed for single sourcing. |
| **audience** | Required | The audience for the output. Each entry in \_data/sidebar_doc.yml and \_data/topnav_doc.yml needs to have an audience attribute that matches the value here in order for the sidebar or topnav item to be included.|
| **platform** | Required | The platform for the output. See additional information in audience.
| **product** | Required | The product for the output. See additional information in audience.
| **version** | Required | The version for the output. See additional information in audience.
| **destination** | Required | The folder where the site is built. If you put this into your same folder as your other files, Jekyll may start building and rebuilding in an infinite loop because it detects more files in the project folder. Make sure you specify a folder outside your project folder, by using `../` or by specifying the absolute path, such as /Applications/XAMPP/xamppfiles/htdocs/myfolder. |
| **project_file_name** | Required | The shortname for your project that you preface each file name with (for example, `doc`). This label is used to specify the prefix for the tag archives files (which are named with titles such as `doc_tag-formatting.html`). The raw code in the theme is {% raw %}`<a href="{{site.project_file_name}}_tag-{{tag}}.html">`{% endraw %} The {% raw %}`{{site.project_file_name}}`{% endraw %} field renders as `doc` in the sample theme. The {% raw %}`{{tag}}`{% endraw %} is populated by a "for" loop through the tags property specified in page frontmatter.|
| **sidebar_tagline** | Optional | Appears above the sidebar. Usually you put some term related to the site specific build, such as the audience. In the sample theme files, the taglines are "writers" and "designers."|
| **sidebar_version** | Optional | Appears below the sidebar_tagline in a smaller font, usually specifying the version of the documentation. In the sample theme files, the version is "3.0."|
| **topnav_title** | Required | Appears next to the home button in the top nav bar. In the sample theme files, the topnav_title is "Jekyll Documentation Theme." |
| **homepage_title**| Required | You set the title for your homepage via this setting. This is because multiple projects are all using the same index.md as their homepage. Because index.md has `homepage: true` in the frontmatter, the "page" layout will use the `homepage_title` property from the configuration file instead of the traditional title in the frontmatter. In the sample theme files, the homepage title is "Jekyll Documentation Theme -- {audience}." |
| **site_title**| Appears in the webpage title area (on the browser tab, not in the page viewing area). In the sample theme files, the site title is the "page name | homepage title." |
| **port** | Required | The port used in the preview mode. This is only for the live preview and doesn't affect the published output. If you serve multiple outputs simultaneously, the port must be unique. |
| **feedback_email** | Gets configured as the email address in the Send Feedback button in the top navigation bar.|
| **disqus_shortname** | Optional | The disqus site shortname, which is used for comments. If you don't want comment forms via disqus, leave this blank or omit it altogether and Disqus won't appear. |
| **markdown** | Required | The processor to use for Markdown. This is a Jekyll-specific setting. Use `redcarpet`. Another option is `kramdown`. However, my examples will follow redcarpet. |
| **redcarpet** | Required | Extensions used with redcarpet. You can read more about them by searching for redcarpet extensions online. |
| **highlighter** | Optional | The syntax highlighter used. Use `pygments` because it's required you're publishing on Github Pages. You will need to [install Pygments](http://pygments.org/download/) on your machine or else you will see an error. Pygments is based on Python. If you run into build errors and aren't publishing on Github Pages, `rouge` is also an option. |
| **exclude** | Optional | A list of files and directories that you want excluded from the build. By default, all the content in your project is included in the output. |
| **defaults** | Optional | Here you can set default values for frontmatter based on the content type (page, post, or collection). |
| **collections** | Optional | Any specific collections (custom content types that extend beyond pages or posts) that you want to define. This theme defines a collection called tooltips. You access this collection by using site.tooltips instead of site.pages or site.posts. Put the tooltip content types inside a folder in your project called \_tooltips. |
| **print** | Optional | Boolean. Whether this build is a print build or not. This setting allows you to run conditions in your content such as {% raw %} {% if site.print == true %} do this... {% endif %} {% endraw %}. |
| **suffix** | Optional | If you publish on Salesforce's site.com, you have to add index.html to the permalink or else the page won't render. If you add `suffix: index.html` in your config file, this suffix will be appended in the homepage URL. If you're not publishing to Salesforce, don't add this property to your configuration file.|
## Where to store configuration files
In this theme, the configuration files are listed in the configs directory. There are some build scripts in the root directory that simply reference the configuration files.
## The conditional attributes
Each configuration file must specify values for the conditional attributes:
* project
* product
* platform
* audience
* version
The sidebar.html and topnav.html files apply conditional logic based on the values for these conditional attributes.
For example, you will see this kind of logic in the sidebar and topnav files:
```
{% raw %}
{% if item.audience contains audience and item.product contains product and item.platform contains platform and item.version contains version and item.web != false %}
{% endraw %}
```
If all of these conditions are met, then the item will qualify to be included in the sidebar or top navigation file. That is why each item in the sidebar_doc.yml or topnav_doc.yml file includes similar properties to match:
```
- title: Pages
url: /doc_pages.html
audience: writers, designers
platform: all
product: all
version: all
```
The file in \_includes/custom/conditions.html contains a project setting and also assigns general names for each of these specific values. This way the same theme files can be used interchangeably depending on the assignments, whose values are specified in the configuration file.
It's a little complicated to describe, but it works. Once you configure your project correctly, you don't even think about how the theme is processing all of this on the backend.
## Configuration settings for PDF output
The PDF configuration files build on all the settings in the web configuration files, but they add a few more options.
When you build the PDF output (such as for the writers output), the command will look like this:
```
jekyll serve --detach --config configs/config_writers.yml,configs/config_writers_pdf.yml
```
First Jekyll will read the config_writers.yml file, and then Jekyll will read the config_writers_pdf.yml file.
More detail about generating PDFs is provided in {{site.data.urls.doc_generating_pdfs.link}}, but the configuration settings used for the PDFs are described here.
The process for creating PDFs relies on two steps:
1. First you build a printer-friendly web version of the content.
2. Then you run PrinceXML to get all the printer-friendly web pages and package them into a PDF.
Thus, you actually build a web version for the PDF first before generating the PDF. (You might be able to remove this first step by doing more coding, but I found it easier just to strip out components I didn't want included and make other adjustments.)
| Field | Required? | Description |
|-------|-----------|-----------|
| destination | Where the PDF web version should be served so that Prince XML can find it. By default, this is in ../doc_designers-pdf, so just one level above where your project is. |
| url | The URL where the files can be viewed. This is `http://127.0.0.1:4002` in the sample theme files for the designers output. Prince XML requires a URL to access the file. (My attempts to use local file paths didn't work.) |
| baseurl | The subdirectory after the url where the content is stored. In the sample theme files for the designers output, this is `/designers`. |
| port | The port required by the preview server. |
| print | A boolean so that you can construct conditional statements in your content to check whether print is true or not. This setting can help you filter out content that doesn't fit well into a PDF (such as dynamic web elements). |
| print_title | The title for the PDF. In the sample theme files for designers output, the print title is "Jekyll Documentation Theme for Designers"|
| print_subtitle | The subtitle for the PDF. In the sample theme files, the subtitle is "version 3.0." |
| defaults | See the sample settings in the config_designers_pdf.yml file. The only difference between this file and config_designers.yml is that the layout used for pages is `page_print` instead of `page`. The `page_print` layout also used `head_print` instead of `head`. This layout strips out components such as the sidebar and top navigation. It also leverages printstyles.css and includes some JavaScript for Prince XML. |

View File

@ -1,45 +0,0 @@
---
title: Customizing the theme
tags: [getting-started]
last_updated: August 12, 2015
keywords: getting started, customization, beginning steps, modifying the theme, modification
summary: "You start customizing the theme by gutting the existing content in this theme and replacing it with your own content. Start with the configuration files, then customize the data files, and add your own markdown pages in the root directory."
---
## About customizing the theme
The theme shows two build outputs: one for designers, and one for writers. The dual outputs is an example of the single sourcing nature of the theme. The designers output is comprehensive, whereas the writers output is a subset of the information. Follow these steps to customize the theme with your own content.
{{site.data.alerts.important}} In these instructions, I'll assume your project's name is "acme." I'll also assume you have two audiences you're building your acme project for: marketers and developers. {{site.data.alerts.end}}
To customize the theme:
1. In the theme's root directory, rename config_writer.yml to config_marketer.yml and customize all the values inside that file based on the instructions in {{site.data.urls.doc_configuration_settings.link}}. Do the same with config_designer.yml (changing it to config_developer.yml) and continue to clone and customize the config file for other audiences you need.
In this theme, each output requires a separate config file. If you have 10 audiences and you want separate sites for each, then then you'll have 10 config files in this directory.
2. Make similar customizations to the PDF configuration files. You will later use these files when you create PDFs.
{{site.data.alerts.tip}} As you customize the config files, make the port values unique so that you don't run into "Address already in use" issues when you build multiple sites and want to preview them at the same time.{{site.data.alerts.end}}
5. In the \_includes/custom directory, open conditions.html and customize the values there specific to your outputs. (Basically, replace `writer` with `developer`, and `designer` with `marketer`.)
The conditions.html file is used to apply different requirements to the sidebar and other files. The conditions.html file is included in various parts of the theme &mdash; the sidebar.html, the topnav.html, and some of the print files. *conditions.html is sort of the brains of the theme.* If you don't have a specific value for audience, version, platform, or product, just put `all`.
6. Remove the pages that begin with "doc_" in the root directory, and then add your own pages here. Leave all the files flat in the root directory.
If you nest files inside folders, you'll create problems for the links and the theme will break. Yes, this will result in a lot of files in the root directory, but you can get around this issue with some viewing strategies in your text editor.
For example, with WebStorm, if you press **Shift** twice and type the file name you want, the editor finds it. I usually have the preview mode open in another browser and navigate the content that way. When I want to edit a specific file, I copy the filename path from the preview browser, press **Shift** twice, and then it opens. You can also create a favorites section that just shows files you've added to Favorites (an option in the context menu).
7. Inside \_data, open sidebar_doc.yml and topnav_doc.yml and customize the navigation.
{{site.data.alerts.warning}} Don't mess up the spacing or change any of the YML level names or the site or sidebar won't appear. Each new YML level is indented with two spaces. Sometimes getting this spacing right is tricky. I recommend you save the sample template here that shows the various levels, and then just copy and paste the levels where you need them. YML is very picky and it can be frustrating sorting out spacing and level issues. {{site.data.alerts.end}}
9. In the root directory, customize the index.md file. This file will be the homepage for all of your projects.
Use conditional tags (for example, `{% raw %}{% if site.project == "writers" %} ... {% endif %}{% endraw %}`) to change the content for different builds of your site. See {{site.data.urls.conditional_logic.link}} for more information on applying conditions.
10. In the \_includes folder, open footer.html and customize the content (namely the footer image). If you have different footers for different outputs, use conditional tags as you did with index.md.
11. Build your site with a command such as `jekyll serve --config configs/config_writers.yml` etc., and preview it at the URLs provided.

View File

@ -1,87 +0,0 @@
---
title: Getting started with this theme
tags: [getting-started]
keywords: start, introduction, begin, install, build, hello world,
last_updated: August 12, 2015
summary: "To get started with this theme, first make sure you have all the prerequisites in place; then build the theme following the sample build commands. Because this theme is set up for single sourcing projects, it doesn't follow the same pattern as most Jekyll projects (which have just a _config.yml file in the root directory)."
---
## Step 1: Set up the prerequisites
Before you start installing the theme, make sure you have all of these prerequisites in place.
* **Mac computer (recommended)**. If you have a PC, see the note below. Make sure you can get Jekyll working on Windows before proceeding.
* **[Ruby](https://www.ruby-lang.org/en/)**. On a Mac, this should already be installed. Open your Terminal and type `which ruby` to confirm.
* **[Rubygems](https://rubygems.org/pages/download)**. This is a package manager for Ruby. Type `which gem` to confirm.
* **[Jekyllrb](http://jekyllrb.com/)**. To install: `gem install jekyll`. Type `which jekyll` to confirm that Jekyll is installed.
* **Text editor** (some examples: Sublime Text, Atom, WebStorm, IntelliJ)
* **[iTerm](http://iterm.sourceforge.net/)** - Optional but recommended instead of Terminal.
* **[pygments](http://pygments.org/download/)** - Pygments handles syntax highlighting. In my experiments, the Pygments highlighter seemed better than the default rouge highlighter. To install Pygments, you will need Python installed. (If you don't install pygments, you'll get an error when you build the theme.) To check if Python is installed, type `which python`. To install Pygments: `gem install pygments.rb`.
{{site.data.alerts.note}} If you're on Windows, you can still install and run this theme. However, you must first set up a few things &mdash; Ruby, Ruby Dev Kit, Python, . Follow the instructions here: <a href="http://yizeng.me/2013/05/10/setup-jekyll-on-windows/">Set up Jekyll on Windows</a>. Also see <a href="http://jekyllrb.com/docs/windows">Jekyll on Windows</a>.{{site.data.alerts.end}}
## Step 2: Build the theme
Before you start customizing the theme, make sure you can build the theme with the default content and settings first.
1. Download the theme from the [documentation-theme-jekyll Github repository](https://github.com/tomjohnson1492/documentation-theme-jekyll) and unzip it into your ~username/projects folder.
You can either download the theme files directly by clicking the **Download Zip** button on the right of the repo, or use git to clone the repository to your local machine. Note, however, that you won't be using the pull command to update the theme since you'll be customizing it with your own content and won't want to overwrite those customizations, so there isn't a need to clone it.
2. After downloading the theme, note some unique aspects of the file structure:
* Although there's a \_config.yml file in the root directory, it's there only so that Github Pages will build the theme. Because the theme is set up for single sourcing, there's a separate configuration file for each unique output you're building.
* All the configuration files are stored in the configs directory. Each configuration file has a different preview port.
* Each configuration file specifies a different project and potentially a different audience, product, platform, and version. By setting unique values for these properties in the includes/custom/conditions.html file, you determine how the sidebar and top navigation get constructed.
* You can build all the outputs in your configs directory by running the doc_multibuild_web.sh file in the root directory.
{{site.data.alerts.tip}} The main goal of this theme is to enable single sourcing. With single sourcing, you build multiple outputs from the same source, with somewhat different content in each site based on the particular product, platform, version, and audience. You don't have to use this theme for single sourcing, but most tech writing projects involve this requirement.{{site.data.alerts.end}}
There are four configuration files in this project: config_writer.yml and config_designer.yml as well as their PDF equivalents. The idea is that there's an output specific to writers, and an output specific to designers.
In reality, both of these outputs are pretty much the same. However, for the writers output, I've conditionally excluded more lengthy explanations about how the theme works. The idea is that writers just want to create and publish content; in contrast, designers want to understand and modify the theme itself. Also, the configuration files use different themes.
3. Build the writer's output:
```
jekyll serve --config configs/config_writers.yml
```
The `--config` parameter specifies the location of the configuration file to be used in the build. The configuration file itself contains the destination location for where the site gets built.
Open a new tab in your browser and preview the site at the preview URL shown.
4. Press **Ctrl+C** in Terminal to shut down the writer's output.
5. Build the designers output:
```
jekyll serve --config configs/config_designers.yml
```
Open a new tab in your browser and preview the site at the preview URL shown. Notice how the themes differ (designers is blue, writers is green).
5. Press **Ctrl+C** in Terminal to shut down the designer's output.
6. Build both themes by running the following command:
```
. doc_multibuild_web.sh
```
The themes build in the ../doc_designers and ../doc_writers folders. Use finder and browse to one level above where you installed the project (probably username/projects).
Open the writers and designers folders and click the index.html file. The themes should launch and appear similar to their appearance in the preview folder. This is because the themes are build using a relative link structure, so you can move the theme to any folder you want without breaking the links.
If the theme builds both outputs successfully, great. You can move on to the other sections. If you run into errors building the themes, try to solve them before moving on. See {{site.data.urls.doc_troubleshooting.link}} for more information.
{{site.data.alerts.tip}} You can set up profiles in iTerm to initiate all your builds with one selection. See {{site.data.urls.doc_iterm_profiles.link}} for details. {{site.data.alerts.end}}
More information about building the PDF versions is provided in {{site.data.urls.doc_generating_pdfs.link}}.
## Questions
If you have questions, contact me at <a href="mailto:tomjohnson1492@gmail.com">tomjohnson1492@gmail.com</a>. My regular site is [idratherbewriting.com](http://idratherbewriting.com). I'm eager to make these installation instructions as clear as possible, so please let me know if there are areas of confusion that need clarifying.

View File

@ -1,288 +0,0 @@
---
title: Help APIs and UI tooltips
tags: [publishing, single-sourcing, content-types]
last_updated: August 12, 2015
keywords: API, content API, UI text, inline help, context-sensitive help, popovers, tooltips
summary: "You can loop through files and generate a JSON file that developers can consume like a help API. Developers can pull in values from the JSON into interface elements, styling them as popovers for user interface text, for example. The beauty of this method is that the UI text remains in the help system and isn't hard-coded into the UI."
---
## Full code demo of content API
You can create a help API that developers can use to pull in content.
For the full code demo, see the notes in the <a href="tooltip_demo.html" class="noCrossRef">tooltip demo</a>.
In this demo, the popovers pull in and display content from the information in an external tooltips.json file located on a different host.
Instead of tooltip popovers, you could also print content directly to the page. Basically whatever you can stuff into a JSON file, developers can integrate it onto a page.
## Diagram overview
Here's a diagram showing the basic idea of the help API:
<img src="images/helpapi.svg" style="width: 650px;"/>
Is this really an API? Well, sort of. The help content is pushed out into a JSON file that other websites and applications can easily consume. The endpoints don't deliver different data based on parameters added to a URL. But the overall concept is similar to an API: you have a client requesting resources from a server.
Note that in this scenario, the help is openly accessible on the web. If you have a private system, it's more complicated.
To deliver help this way using Jekyll, follow the steps in each of the sections below.
## 1. Create a "collection" for the help content (optional)
A collection is another content type that extends Jekyll beyond the use of pages and posts. Here I'm calling the collection "tooltips." You could also just use pages, but if you have a lot of content, it will take longer to look up information in the file because the lookup will have to scan through all your site content instead of just the tooltips.
Add the following information to your configuration file to declare your collection:
```liquid
collections:
tooltips:
output: true
```
In your Jekyll project, create a new folder called "_tooltips" and put every page that you want to be part of that tooltips collection inside that folder.
## 2. Create pages in your collection
Create pages inside your new tooltips collection (that is, inside the \_tooltips folder). Each page needs only a unique `id` in the frontmatter. Here's an example:
{%raw%}
```liquid
---
id: basketball
---
{{site.data.definitions.basketball}}
```
{%endraw%}
You need to create a separate page for each resource you want to deliver. In this setup, the definition of basketball is stored in a data file call definitions inside the \_data folder so that we can re-use it in other parts of the help as well. (This additional re-use is covered later on this page.)
## 3. Create a JSON file that loops through your collection pages
Add the following to a file and call it tooltips.json:
```
{% raw %}
---
layout: none
---
{
"entries":
[
{% for page in site.tooltips %}
{
"id" : "{{ page.id }}",
"body": "{{ page.content | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
{% endraw %}
```
This code will loop through all pages in the tooltips collection and insert the id and body into key-value pairs for the JSON code. Here's an example of what that looks like after it's processed by Jekyll in the site build: <a class="noCrossRef" href="tooltips.json">tooltips.json</a>.
{{site.data.alerts.tip}} Check out <a href="https://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml">Google's style guide for JSON</a>. These best practices can help you keep your JSON file valid.{{site.data.alerts.end}}
Store this tooltips.json file in your root directory. You can add different fields depending on how you want the JSON to be structured. Here I just have to fields: `id` and `body`. And the JSON is looking just in the tooltips collection that I created.
When you build your site, Jekyll will iterate through every page in your _tooltips folder and put the page id and body into this format.
You could create different JSON files that specialize in different content. For example, suppose you have some getting started information. You could put that into a different JSON file. Using the same structure, you might add an `if` tag that checks whether the page has frontmatter that says `getting_started: true` or something. Or you could put it into a separate collection entirely (different from tooltips).
By chunking up your JSON files, you can provide a quicker lookup, though I'm not sure how big the JSON file can be before you experience any latency with the jQuery lookup.
## 4. Allow CORS access to your help if stored on a remote server
When people make calls to your site *from other domains*, you must allow them access to get the content. To do this, you have to enable something called CORS (cross origin resource sharing) within the server where your help resides.
In other words, people are going to be executing calls to reach into your site and grab your content. Just like the door on your house, you have to unlock it so people can get in. Enabling CORS is unlocking it.
How you enable CORS depends on the type of server.
If your server setup allows htaccess files to override general server permissions, then create an .htaccess file and add the following:
```
Header set Access-Control-Allow-Origin "*"
```
Store this in the same directory as your project. This is what I've done in a directory on my web host (bluehost.com). Inside http://idratherbetellingstories.com/wp-content/apidemos/, I uploaded a file called ".htaccess" with the preceding code.
After I uploaded it, I renamed it to .htaccess, right-clicked the file and set the permissions to 774.
To test whether your server permissions are set correctly, open a terminal and run the following curl command pointing to your tooltips.json file:
```
curl -I http://idratherbetellingstories.com/wp-content/apidemos/tooltips.json
```
If the server permissions are set correctly, you should see the following line somewhere in the response:
```xml
Access-Control-Allow-Origin: *
```
If you don't see this response, CORS isn't allowed for the file.
If you have an AWS S3 bucket, you can supposedly add a CORS configuration to the bucket permissions. Log into AWS S3 and click your bucket. On the right, in the Permissions section, click **Add CORS Configuration**. In that space, add the following policy:
```xml
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
```
Although this should work, in my experiment it doesn't. And I'm not sure why...
In other server setups, you may need to edit one of your Apache configuration files. See [Enable CORS](http://enable-cors.org/server.html) or search online for ways to allow CORS for your server.
If you don't have CORS enabled, users will see a CORS error/warning message in the console of the page making the request.
{{site.data.alerts.tip}} If enabling CORS is problematic, you could always just send developers the tooltips.json file and ask them to place it on their own server. {{site.data.alerts.end}}
## 5. Explain how developers can access the help
Developers can access the help using the `.get` method from jQuery, among other methods. Here's an example of how to get a page with the ID of `basketball`:
```js
{% raw %}
<script type="text/javascript">
$(document).ready(function(){
var url = "{url}/tooltips.json";
$.get( url, function( data ) {
$.each(data.entries, function(i, page) {
if (page.id == "basketball") {
$( "#basketball" ).attr( "data-content", page.body );
}
});
});
});
</script>
{% endraw %}
```
The `{url}` is where your tooltips.json file is. The `each` method looks through all the JSON content to find the item whose `page.id` is equal to `basketball`. It then looks for an element on the page named `#basketball` and adds a `data-content` attribute to that element.
{{site.data.alerts.warning}}<b>Note:</b> Make sure your JSON file is valid. Otherwise, this method won't work. I use the <a href="https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en">JSON Formatter extension for Chrome</a>. When I go to the tooltips.json page in my browser, the JSON content &mdash; if valid &mdash; is nicely formatted (and includes some color coding). If the file isn't valid, it's not formatted and there isn't any color. You can also check the JSON formatting using <a href="http://jsonformatter.curiousconcept.com/">JSON Formatter and Validator</a>. If your JSON file isn't valid, identify the problem area using the validator and troubleshoot the file causing issues. It's usually due to some code that isn't escaping correctly. {{site.data.alerts.end}}
Why `data-content`? Well, in this case, I'm using [Bootstrap popovers](http://getbootstrap.com/javascript/#popovers) to display the tooltip content. The `data-content` attribute is how Bootstrap injects popovers.
Here's the section on the page where the popover is inserted:
```
<p>Basketball <span class="glyphicon glyphicon-info-sign" id="basketball" data-toggle="popover"></span></p>
```
Notice that I just have `id="basketball"` added to this popover element. Developers merely need to add a unique ID to each tooltip they want to pull in the help content. Either you tell developers the unique ID they should add, or ask them what IDs they added (or just tell them to use an ID that matches the field's name).
In order to use jQuery and Bootstrap, you'll need to add the appropriate references in the head tags of your page:
```js
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('[data-toggle="popover"]').popover({
placement : 'right',
trigger: 'hover',
html: true
});
```
Note that even though you reference a Bootstrap js script, Bootstrap's popovers require you to initialize them using the above code as well &mdash; they aren't turned on by default.
View the source code of the <a class="noCrossRef" href="tooltip_demo.html">Tooltip Demo</a> for the full comments.
## 6. Create easy links to embed the help in your help site
You might also want to insert the same content into different parts of your help site. For example, if you have tooltips providing definitions for fields, you'll probably want to create a page in your help that lists those same definitions. You could use the same method developers use to pull help content into their applications. But it will probably be easier to simply use Jekyll's tags for doing it.
Here's how you would reuse the content:
```html
{% raw %}
<h2>Reuse Demo</h2>
<table>
<thead>
<tr>
<th>Sport</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td>Basketball</td>
<td>{{site.data.definitions.basketball}}</td>
</tr>
<tr>
<td>Baseball</td>
<td>{{site.data.definitions.baseball}}</td>
</tr>
<tr>
<td>Football</td>
<td>{{site.data.definitions.football}}</td>
</tr>
<tr>
<td>Soccer</td>
<td>{{site.data.definitions.soccer}}</td>
</tr>
</tbody>
</table>
{% endraw %}
```
And here's the code:
<h2>Reuse Demo</h2>
<table>
<thead>
<tr>
<th>Sport</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td>Basketball</td>
<td>{{site.data.definitions.basketball}}</td>
</tr>
<tr>
<td>Baseball</td>
<td>{{site.data.definitions.baseball}}</td>
</tr>
<tr>
<td>Football</td>
<td>{{site.data.definitions.football}}</td>
</tr>
<tr>
<td>Soccer</td>
<td>{{site.data.definitions.soccer}}</td>
</tr>
</tbody>
</table>

View File

@ -1,52 +0,0 @@
---
title: Knowledge-base layout
tags: [special-layouts]
keywords: knowledge base, support portal, grid, doc portal
last_updated: August 12, 2015
summary: "This shows a sample layout for a knowledge base. Each square could link to a tag archive page. In this example, font icons from Font Awesome are enlarged to a large size. You can also add captions below each icon."
---
<div class="row">
<div class="col-md-4"><a class="noCrossRef" href="doc_tag-getting-started.html"><i class="fa fa-file-image-o fa-6x border"></i><div class="kbCaption">Getting Started</div></a></div>
<div class="col-md-4"><a class="noCrossRef" href="doc_tag-navigation.html"><i class="fa fa-bar-chart-o fa-6x border"></i><div class="kbCaption">Navigation</a></div></div>
<div class="col-md-4"><a class="noCrossRef" href="doc_tag-single-sourcing.html"><i class="fa fa-code fa-6x border"></i><div class="kbCaption">Single-sourcing</div></a></div>
</div>
<p>&nbsp;</p>
<div class="row">
<div class="col-md-4"><a class="noCrossRef" href="doc_tag-publishing.html"><i class="fa fa-dashboard fa-6x border"></i><div class="kbCaption">Publishing</div></a></div>
<div class="col-md-4"><a class="noCrossRef" href="doc_tag-special-layouts.html"><i class="fa fa-desktop fa-6x border"></i><div class="kbCaption">Special layouts</div></a></div>
<div class="col-md-4"><a class="noCrossRef" href="doc_tag-formatting.html"><i class="fa fa-cloud fa-6x border"></i><div class="kbCaption">Formatting</div></a></div>
</div>
## Generating a list of all pages with a certain tag
If you don't want to link to a tag archive index, but instead want to list all pages that have a certain tag, you could use this code:
{% raw %}
```html
Getting started pages:
<ul>
{% assign sorted_pages = (site.pages | sort: 'title') %}
{% for page in sorted_pages %}
{% for tag in page.tags %}
{% if tag == "getting-started" %}
<li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
```
{% endraw %}
Getting started pages:
<ul>
{% assign sorted_pages = (site.pages | sort: 'title') %}
{% for page in sorted_pages %}
{% for tag in page.tags %}
{% if tag == "getting-started" %}
<li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>

View File

@ -1,10 +0,0 @@
# Writers PDF
echo "Building the Writers PDF..."
prince --javascript --input-list=../doc_writers-pdf/prince-file-list.txt -o /Users/tjohnson/projects/documentation-theme-jekyll/doc_writers_pdf.pdf;
# Designers PDF
echo "Building the Designers PDF ..."
prince --javascript --input-list=../doc_designers-pdf/prince-file-list.txt -o /Users/tjohnson/projects/documentation-theme-jekyll/doc_designers_pdf.pdf;
echo "All done."
echo "Now run . doc_multibuild_web.sh"

View File

@ -1,193 +0,0 @@
---
title: Sidebar navigation
tags:
- navigation
keywords: "sidebar, toc, table of contents, navigation"
last_updated: "August 12, 2015"
summary: "The sidebar and top navigation bar read their values from yml files. The navigation components are one of the most unique parts of this theme, since the navigation components are only included if they meet all of the product, audience, version, etc., values as specified in the project settings."
published: true
---
## Sidebar overview
To configure the sidebar, edit the values in the \_data/sidebar_doc.yml file. Follow the example in this theme. Note that YML spacing is picky. Each new level is two spaces indented. I usually just keep a template that shows all three levels and then copy and paste from it as needed.
## Sidebar levels
You can add three levels of nesting in the sidebar nav. For example, three levels looks like this:
```
Introduction
-> Getting started
-> Features
-> Configuration
-> Options
-> Automation
```
You can't add more than three levels. In general, it's a best practice not to create more than three levels of navigation anyway, since it creates a paralysis of choice for the user.
If you need deeper sublevels, I recommend creating different sidebars for different pages, which is logic that I haven't coded into the theme but which could probably be added fairly easily.
## External links
If you want the URL to point to an external site, use `external_url` instead of `url` in the data file. Then just enter the full HTTP URL. When you use `external_url`, the sidebar.html will apply this logic:
```html
{% raw %}
{% if item.external_url %}
<li><a href="{{item.external_url}}" target="_blank">{{subcategory.title}}</a></li>
{% endraw %}
```
{% if site.audience == "designers" %}
## How it works
The values in the sidebar_doc.yml file are coded to match the logic in includes/sidebar.html.
Each of the items in the sidebar needs to have the attributes shown here:
```yaml
- title: Getting started
url: /doc_getting_started.html
audience: writers, designers
platform: all
product: all
version: all
```
The project, audience, platform, product, and version are specified in the includes/custom/conditions.html file:
```liquid
{% raw %}
{% if site.project == "doc_designers" %}
{% assign audience = "designers" %}
{% 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" %}
{% assign projectTags = site.data.tags_doc.allowed-tags %}
{% endif %}
{% endraw %}
```
Additionally, note how some assignments are set here as well. The conditions.html file set things like `sidebar = site.data.sidebar.entries`. You could use this logic to extend the single sourcing possibilities of the theme.
When the sidebar.html file runs the logic, it includes these statements:
```liquid
{% raw %}
{% include custom/conditions.html %}
{% for entry in sidebar %}
...
{% endraw %}
```
The assignment of the `sidebar` value through the conditions.html file means this is really what's happening:
```liquid
{% raw %}
{% include custom/conditions.html %}
{% for entry in site.data.sidebar.entries %}
{% endraw %}
```
Since different projects might use different data files, I had to made the logic run using the standard `sidebar` variable but change the meaning of that variable based on the project.
## Sidebar accordion
If you don't want the accordion feature in the sidebar, open the \_includes/sidebar.html file and change the value for `accordion` in the `.navgoco` options from `true` to `false` (don't surround the value with quotes).
This will make it so users can expand more than one sidebar section at once without the other sections collapsing.
Additionally, to show "Collapse All" and "Expand All" buttons, uncomment this section near bottom on the same sidebar.html page:
```
<!-- if you aren't using the accordion, uncomment this block:
<p class="external">
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
</p>
-->
```
Note that if you Expand all sections in your sidebar and you have a lot of items, the sidebar will likely extend past the viewing frame. In this case, you should disable the fixed sidebar setting by removing the JavaScript code explained in the next section ("Sidebar fixed or moving").
## Sidebar fixed or moving
If you scroll up, the sidebar usually remains fixed in place. This is so that users can keep the context of the table of contents in place while they move down the page.
However, if the user's viewport is really small, you don't want the TOC to remain fixed in place because expanding one section may extend past what is visible. In the js/customscripts.js file, I inserted some logic to check the viewport size.
```js
$( document ).ready(function() {
//
var h = $(window).height();
console.log (h);
if (h > 800) {
$( "#mysidebar" ).attr("class", "nav affix");
}
// activate tooltips. although this is a bootstrap js function, it must be activated this way in your theme.
$('[data-toggle="tooltip"]').tooltip({
placement : 'top'
});
});
```
The script says, if the height of the viewport is greater than 800px, then insert `affix` class, which makes the nav bar fixed as your scroll. If you have a lot of nav items, this fixed position may not work for you.
For example, if your sidebar has a lot of items and the fixed position makes it so the user can't see all the items when expanded, you may want to adjust the height. If viewing the sidebar is ap roblem, increase the height value from `800` to `1000` or more.
## Navgoco foundation
The sidebar uses the [Navgoco jQuery plugin](https://github.com/tefra/navgoco) as its basis. Why not use Bootstrap? Navgoco provides a few features that I couldn't find in Bootstrap:
* Navgoco sets a cookie to remember the user's position in the sidebar. If you refresh the page, the cookie allows the plugin to remember the state.
* Navgoco inserts an `active` class based on the navigation option that's open. This is essential for keeping the accordion open.
* Navgoco includes the expand and collapse features of a sidebar.
In short, the sidebar has some complex logic here. I've integrated Navgoco's features with the sidebar.html and sidebar_doc.yml to build the sidebar. It's probably the most impressive part of this theme. (Other themes usually aren't focused on creating hierarchies of pages, but this kind of hierarchy is important in a documentation site.)
## Highlighting the active item
Here's how the highlighting of the currently viewed page works. In the sidebar.html file, you'll see this:
```liquid
{% raw %}
{% elsif page.url == item.url %}
<li class="active"><a href="{{item.url | replace: "/",""}}">{{item.title}}</a></li>
{% endraw %}
```
The `page.url` is a universal Jekyll tag that returns the end path of the page, prepended with `/`. For example, `/sample.html`. If this `page.url` matches the `item.url` specified in the sidebar_doc.yml file, then an `active` class gets applied.
Note that I've added a filter to the item.url in the sidebar.html file:
```liquid
{% raw %}
{{item.url | replace: "/",""}}
{% endraw %}
```
Ideally, in the sidebar_doc.yml file, you could just write the URL you want to go to: `sample.html` instead of `/sample.html`. However, page.url always returns the forward slash before the URL. In order to match the page.url with the item.url, you have to use the forward slash before item.url in the doc_sidebar.yml file.
However, if you set up your relative link as `/sample.html` instead of `sample.html`, then the browser will go to the directory root instead of any baseurl.
For example, if your site is deployed at http://mydomain.com/doc/, then going to `/sample.html` in the link will take you to `http://mydomain.com/sample.html` instead of `http://mydomain.com/doc/sample.html`.
In contrast, going to `sample.html` in the link will take you to `http://mydomain.com/doc/sample.html`. Hence the filter to remove the forward slash in the link.
That logic handles the highlighting of the active item, but in order for the sidebar to remain open, the parent level needs to also have the `active` class. To accomplish this, I inserted this script below the sidebar code in the sidebar.html file:
```js
<script>$("li.active").parents('li').toggleClass("active");</script>
```
This script has to come *after* the sidebar code. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.
{% endif %}

View File

@ -1,56 +0,0 @@
---
title: Top navigation
tags:
- navigation
keywords: "bootstrap, lists, drop-down, drop down navigation, top nav bar, topnav"
last_updated: "August 12, 2015"
summary: "The top navigation provides either single links or a drop-down menu. There are some other features, such as a feedback email, custom menu, and popout link."
published: true
---
## Changing the top navigation
The top navigation reads from the \_data/topnav_doc.yml file. There are two *separate* sections:
* `topnav`
* `topnav_dropdowns`
Items in the `topnav` section are rendered as single links. In contrast, items in the `topnav_dropdowns` section are rendered as a drop-down menu.
## The Feedback email
If you click the Feedback link, it inserts the link to the current page along with a subject header and body. The topnav.html file contains an include to feedback.html. This file contains the JavaScript that gets the current page URL and inserts it into the message body.
You configure the email in the configuration file with this property: `site.feedback_email`.
## Custom Menu
It's common to publish multiple sites. If you want to link them together, you could simply list links to the other doc sites in a drop-down menu configured in the topnav_dropdowns section in the topnav_doc.yml file. However, suppose you want to do something more fancy.
Included in the topnav.html file is an include to /doc/customMenu.html. The code in customMenu.html is as follows:
```
<li {% if site.audience == "writers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../doc_writers/{{site.suffix}}">Writer docs</a> {% else %} ../doc_writers{{page.url}}">Writer docs</a>{% endif %}</li>
<li {% if site.audience == "designers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../doc_designers/{{site.suffix}}">Designer doc</a> {% else %} ../doc_designers{{page.url}}">Designer docs</a>{% endif %}</li>
```
{{site.data.alerts.note}} In the theme, the link to the customMenu.html include in the \_includes/topnav.html file is currently commented out. This is because this feature only works when you have multiple outputs hosted on the same server. Github Pages, where I'm publishing this theme, allows only one output per Github Pages directory. So rather than removing this customMenu feature from the theme, I've just commented it out so that it won't appear broken in the demo.{{site.data.alerts.end}}
The current doc site is highlighted. If you select another doc site, the site switches to that doc site and goes to the same page on that doc site. This way, if you have a task such as "Configuring the license" in several different programming languages, users can switch to other programming languages to see the same page.
You need to have both the designers and writers sites deployed on a web server to see this in action. Once deployed, browse to any page in the navigation. Then go to the **Custom Menu** and select the **Writers** site. You'll go to the exact same page but on the Writers site.
If your current page doesn't have an equivalent in your other outputs, then put this in the frontmatter of the page:
```
switch: false
```
This Custom Menu may not be something you want, and if so, just remove the include from the sidebar.html file. But if you're outputting multiple sites, it may be something valuable.
## Pop-out link
The top navigation bar also has an include to frameescape.html. If the site is embedded inside a frame, a link on the top navigation bar appears that says Pop-out, and it will open the site in a new window.
In most cases, you'll want to simply remove this include. I added this because some of my doc sites are delivered through a Salesforce Community and are embedded inside another page in a small area. This pop-out link is a way of liberating the site from these embedded page scenarios. If your site isn't embedded in an iframe, the Pop-out link is removed.

20
index.html Normal file
View File

@ -0,0 +1,20 @@
---
layout: none
search: exclude
---
{% include custom/conditions.html %}
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0;url={{projectFolder}}/home.html">
<script type="text/javascript">
window.location.href = "{{projectFolder}}/home.html"
</script>
</head>
<body>
</body>
</html>

View File

@ -1,45 +0,0 @@
---
title: Introduction
tags:
- "getting-started"
type: first_page
homepage: true
published: true
---
## Overview
This site provides documentation, training, and other notes for the Jekyll Documentation theme. There's a lot of information about how to do a variety of things here, and it's not all unique to this theme. But by and large, understanding how to do things in Jekyll depends on how your theme is coded.
## Survey of features
Some of the more prominent features of this theme include the following:
* Bootstrap framework
* Sidebar with page hierarchy and advanced toc
* PDF generation (with Prince XML utility)
* Notes, tips, and warning information notes
* Tags
* Single sourced outputs
* Emphasis on pages, not posts
* Relative (rather than absolute) link structure
I'm using this theme for my documentation projects, building about 15 different outputs for various products, versions, languages, and audiences from the same set of files. This single sourcing requirement has influenced how I constructed this theme.
For more discussion about the available features, see {{site.data.urls_d.doc_supported_features.link}}.
## Getting started
To get started, see these three topics:
1. {{site.data.urls.doc_getting_started.link}}
2. {{site.data.urls.doc_configuration_settings.link}}
3. {{site.data.urls.doc_customizing_the_theme.link}}
## PDF Download
If you would like to download this help file as a PDF, you can do so here. The PDF most of the same content as the online help, except that some elements (such as video or special layouts) don't translate the the print medium, so they're excluded.
<a target="_blank" class="noCrossRef" href="doc_{{site.audience}}_pdf.pdf"><button type="button" class="btn btn-default" aria-label="Left Align"><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> PDF Download</button></a>
The PDF contains a timestamp in the header indicating when it was last generated. If you download a PDF, keep in mind that it may go out of date quickly. Always compare your PDF timestamp against the online help timestamp (which you can find in the footer).

View File

@ -7,7 +7,7 @@ $( document ).ready(function() {
//this script says, if the height of the viewport is greater than 800px, then insert affix class, which makes the nav bar float in a fixed
// position as your scroll. if you have a lot of nav items, this height may not work for you.
var h = $(window).height();
console.log (h);
//console.log (h);
if (h > 800) {
$( "#mysidebar" ).attr("class", "nav affix");
}
@ -16,6 +16,11 @@ $( document ).ready(function() {
placement : 'top'
});
/**
* AnchorJS
*/
anchors.add('h2,h3,h4,h5');
});
// needed for nav tabs on pages. See Formatting > Nav tabs for more details.
@ -48,6 +53,3 @@ $(function() {
}
});
});

7
js/lunr.min.js vendored

File diff suppressed because one or more lines are too long

50
js/search.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

49
mydoc/home.md Normal file
View File

@ -0,0 +1,49 @@
---
title: Introduction
tags: [getting_started]
audience: field engineers, clients
type: first_page
homepage: true
---
## Overview
This site provides documentation, training, and other notes for the Jekyll Documentation theme. There's a lot of information about how to do a variety of things here, and it's not all unique to this theme. But by and large, understanding how to do things in Jekyll depends on how your theme is coded. As a result, these additional details are provided.
The instructions here are geared towards technical writers working on documentation. You may have a team of one or more technical writers working on documentation for multiple projects. You can use this same theme to author all of your documentation for each of your products. The theme is set up to push out documentation for multiple projects all from the same source. You can also share content across projects.
## Survey of features
Some of the more prominent features of this theme include the following:
* Bootstrap framework
* Sidebar for table of contents
* Top navigation bar with drop-down menus
* PDF generation (through Prince XML utility)
* Build scripts to automate the workflow
* Notes, tips, and warning information notes
* A nifty system for creating links to different pages
* Tags for alternative nativation
* Content sharing across projects
* Emphasis on pages, not posts
* Relative (rather than absolute) link structure, so you can push the outputs anywhere and easily view them
I'm using this theme for my documentation projects, building about 20 different outputs for various products, versions, languages, and audiences from the same set of files. This single sourcing requirement has influenced how I constructed this theme.
For more discussion about the available features, see {{site.data.mydoc.mydoc_urls.mydoc_supported_features.link}}.
## Getting started
To get started, see these three topics:
1. {{site.data.mydoc.mydoc_urls.mydoc_getting_started.link}}
2. {{site.data.mydoc.mydoc_urls.mydoc_configuration_settings.link}}
3. {{site.data.mydoc.mydoc_urls.mydoc_adding_new_projects.link}}
## PDF Download Option for Help Material
If you would like to download this help file as a PDF, you can do so here. The PDF is comprehensive of all the content in the online help.
<a target="_blank" class="noCrossRef" href="files/{{site.pdf_file_name}}"><button type="button" class="btn btn-default" aria-label="Left Align"><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> PDF Download</button></a>
The PDF contains a timestamp in the header indicating when it was last generated.

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View File

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -1,12 +1,11 @@
---
title: About this theme
title: About the theme author
keywords: documentation theme, jekyll, technical writers, help authoring tools, hat replacements
last_updated: August 12, 2015
tags: [getting-started]
summary: "I use this theme for sophisticated single-sourcing projects that I work on as a professional technical writer."
last_updated: November 30, 2015
tags: [getting_started]
summary: "I use this theme for sophisticated single_sourcing projects that I work on as a professional technical writer."
---
My name is Tom Johnson, and I'm a technical writer, blogger, and podcaster based in San Jose, California. My blog is here: [http://idratherbewriting.com](http://idratherbewriting.com). I write several posts there a week. See [my blog's about page](http://idratherbewriting.com/aboutme/) for more details about me.
I'm using this theme for my documentation projects. This theme has undergone several major iterations, and now it's fairly stable and full of all the features that I need. You are welcome to use it for your documentation projects for free.

View File

@ -0,0 +1,75 @@
---
title: 2. Add a new project
tags: [getting_started]
last_updated: November 30, 2015
keywords: getting started, customization, beginning steps, modifying the theme, modification
summary: "You add a new project essentially by duplicating all the mydoc project files in the _data, _includes, configs, and other folders. You can add as many projects as you want in this theme."
series: "Getting Started"
weight: 2
---
<!-- your frontmatter goes here -->
{% include custom/mydoc/getting_started_series.html %}
## About customizing the theme
The theme shows two build outputs: one for designers, and one for writers. The dual outputs is an example of the single sourcing nature of the theme. The designers output is comprehensive, whereas the writers output is a subset of the information. However, the outputs are mostly the same. I just created the separate output to demonstrate how the single sourcing aspect works.
You can add as many documentation projects as you want to the same Jekyll project. Some doc projects have multiple outputs, as is the case with the designers and writers outputs for the mydoc project.
## Add a new project
Follow these steps to add additional projects.
{{site.data.alerts.important}} In these instructions, I'll assume your project's name is "acme." Replace "acme" with the real name of your project. {{site.data.alerts.end}}
### 1. Copy and customize the mydoc folder in _data
Inside the \_data folder, copy the mydoc folder and its contents. Rename it to acme, and then rename each of the YML files inside the folder with the acme prefix.
The files in data control how the side and top nav bar get populated. Here is also where URLs, definitions, and other settings are stored.
### 2. Copy and customize the mydoc folder in configs
In the configs folder, copy the mydoc folder and its contents. Rename it to acme, and then rename each of the config_ files to the outputs you need for your acme project.
In this theme, each output requires a separate config file. If you have 10 audiences and you want separate sites for each, then then you'll have 10 config files in this directory.
More details about customizing the settings in the configuration files will be explained later. For now you're just duplicating the necessary project files for your new project.
### 3. Create a includes folder
In the _includes/custom directory, add a new folder there called "acme." This folder should sit parallel to the mydoc folder. This is where you can store includes for your project.
### 4. Add an acme folder in the root directory
In the root directory, add a folder for your pages called acme (similar to the mydoc folder). Include two subfolders inside acme: files and images.
Inside the mydoc folder, copy the home.md file and add it to the acme folder. (With most Jekyll projects, they open up on the index.html file in the root directory. However, because the pages for each project are stored in subfolders, it was necessary to create a redirect from the index page to the home.md page.)
This acme directory is where you'll store all your pages.
Note that you cannot create subfolders in this acme directory. All of your pages have to be flat in this directory. This is because the references to the resources (stylesheets, javascript, etc.) are relative, and creating additional directory levels will break the relative paths.
### 5. Copy and customize the mydoc shell scripts in the root directory
In the root directory, duplicate the shell scripts and rename the prefix to "acme_". The following files are the shell scripts that need to be duplicated:
* mydoc_1_multiserve_pdf.sh
* mydoc_2_multibuild_pdf.sh
* mydoc_3_multibuild_web.sh
* mydoc_4_publish.sh
* mydoc_all.sh
### 6. Copy the URL generator text file
In the root directory, copy urls_mydoc.txt and duplicate it. Change the suffix to urls_acme.txt.
{{site.data.alerts.tip}} In this step, you're just duplicating project files. In later steps, you'll actually customize all of the settings. {{site.data.alerts.end}}
{% include custom/mydoc/getting_started_series_next.html %}

View File

@ -2,11 +2,10 @@
title: Tooltips
tags: [formatting]
keywords: popovers, tooltips, user interface text, glossaries, definitions
last_updated: August 12, 2015
last_updated: November 30, 2015
summary: "You can add tooltips to any word, such as an acronym or specialized term. Tooltips work well for glossary definitions, because you don't have to keep repeating the definition, nor do you assume the reader already knows the word's meaning."
---
## Creating tooltips
Because this theme is built on Bootstrap, you can simply use a specific attribute on an element to insert a tooltip.

View File

@ -2,7 +2,7 @@
title: Alerts
tags: [formatting]
keywords: notes, tips, cautions, warnings, admonitions
last_updated: August 12, 2015
last_updated: November 30, 2015
summary: "You can insert notes, tips, warnings, and important alerts in your content. These notes are stored as shortcodes made available through the linksrefs.hmtl include."
---
{% comment %} comment 4 by saphira {% endcomment %}

View File

@ -2,11 +2,10 @@
title: Build arguments
tags: [publishing]
keywords: building, serving, serve, build
last_updated: August 12, 2015
last_updated: November 30, 2015
summary: "When you have a single sourcing project, you use more advanced arguments when you're building or serving your Jekyll sites. These arguments specify a particular configuration file and may build on other configuration files."
---
## How to build Jekyll sites
The normal way to build the Jekyll site is through the build command:
@ -27,13 +26,13 @@ By default, the _config.yml in the root directory will be used, Jekyll will scan
jekyll serve --config configs/config_writers.yml --destination /users/tjohnson/projects/documentation-theme-jekyll-builds/writer
```
Here the `configs/config_writers.yml` file is used instead of `_config.yml`. The destination directory is `../doc_writers`.
Here the `configs/config_writers.yml` file is used instead of `_config.yml`. The destination directory is `../mydoc_writers`.
## Shortcuts for the build arguments
If you don't want to enter the long Jekyll argument every time, with all your configuration details, you can create a shell script and then just run the script. This theme shows an example with the doc_multibuild_web.sh file in the root directory.
If you don't want to enter the long Jekyll argument every time, with all your configuration details, you can create a shell script and then just run the script. This theme shows an example with the mydoc_multibuild_web.sh file in the root directory.
My preference is to add the scripts to profiles in iTerm. See {{site.data.urls.doc_iterm_profiles.link}} for more details.
My preference is to add the scripts to profiles in iTerm. See {{site.data.mydoc.mydoc_urls.mydoc_iterm_profiles.link}} for more details.
## Stop a server

View File

@ -0,0 +1,191 @@
---
title: 10. Configure the build scripts
tags:
- publishing
keywords: "build scripts, generating outputs, building, publishing"
last_updated: "November 30, 2015"
summary: "You need to customize the build scripts. These script automate the publishing of your PDFs and web outputs through shell scripts on the command line."
series: "Getting Started"
weight: 10
---
{% include custom/mydoc/getting_started_series.html %}
## About the build scripts
The mydoc project has 5 build scripts and a script that runs them all. These scripts will require a bit of detail to configure. Every team member who is publishing on the project should set up their folder structure in the way described here.
## Get Set Up
Your command-line terminal opens up to your user name (for example, `Users/tjohnson`). I like to put all of my projects from repositories into a subfolder under my username called "projects." This makes it easy to get to the projects from the command line. You can vary from the project organization I describe here, but following the pattern I outline will make configuration easier.
To set up your projects:
1. Set up your Jekyll theme in a folder called "docs." All of the source files for every project the team is working on should live in this directory. Most likely you already either downloaded or cloned the jekyll-documentation-theme. Just rename the folder to "docs" and move it into the projects folder as shown here.
2. In the same root directory where the docs folder is, create another directory parallel to docs called doc_outputs. 
Thus, your folder structure should be something like this:
```
projects
- docs
- doc_outputs
```
The docs folder contains the source of all your files, while the doc_outputs contains the site outputs.
## Configure the Build Scripts
For the mydocs project, you'll see a series of build scripts for each project. There are 5 build scripts, described in the following sections. Note that you really only need to run the last one, e.g., mydoc_all.sh, because it runs all of the build scripts. But you have to make sure each script is correctly configured so that they all build successfully.
{{site.data.alerts.tip}}In the descriptions of the build scripts, "mydoc" is used as the sample project. Substitute in whatever your real project name is. {{site.data.alerts.end}}
### mydoc_1_multiserve_pdf.sh
Here's what this script looks like:
```
echo 'Killing all Jekyll instances'
kill -9 $(ps aux | grep '[j]ekyll' | awk '{print $2}')
clear
echo "Building PDF-friendly HTML site for Mydoc Writers ..."
jekyll serve --detach --config configs/mydoc/config_writers.yml,configs/mydoc/config_writers_pdf.yml
echo "done"
echo "Building PDF-friendly HTML site for Mydoc Designers ..."
jekyll serve --detach --config configs/mydoc/config_designers.yml,configs/mydoc/config_designers_pdf.yml
echo "done"
echo "All done serving up the PDF-friendly sites. Now let's generate the PDF files from these sites."
echo "Now run . mydoc_2_multibuild_pdf.sh"
```
After killing all existing Jekyll instances that may be running, this script serves up a PDF friendly version of the docs (in HTML format) at the destination specified in the configuration file.
Each of your configuration files needs to have a destination like this: `../doc_outputs/mydoc/adtruth-java`. That is, the project should build in the doc_outputs folder, in a subfolder that matches the project name.
The purpose of this script is to make a version of the HTML output that is friendly to the Prince XML PDF generator. This version of the output strips out the sidebar, topnav, and other components to just render a bare-bones HTML representation of the content.
Customize the script with your own PDF configuration file names.
### mydoc_2_multibuild_pdf.sh
Here's what this script looks like:
```
# Doc Writers
echo "Building the Mydoc Writers PDF ..."
prince --javascript --input-list=../doc_outputs/mydoc/writers-pdf/prince-file-list.txt -o mydoc/files/mydoc_writers_pdf.pdf;
echo "done"
# Doc Designers
echo "Building Mydoc Designers PDF ..."
prince --javascript --input-list=../doc_outputs/mydoc/designers-pdf/prince-file-list.txt -o mydoc/files/mydoc_designers_pdf.pdf;
echo "done"
echo "All done building the PDFs!"
echo "Now build the web outputs: . mydoc_3_multibuild_web.sh"
```
This script builds the PDF output using the Prince command. The script reads the location of the prince-file-list.txt file in the PDF friendly output folder (as defined in the previous script) and builds a PDF.
The Prince build command takes an input parameter (`--input-list=`) that lists where all the pages are (prince-file-list.txt), and then combines all the pages into a PDF, including cross-references and other details. The Prince build command also specifies the output folder (`-o`).
The prince-file-list.txt file (which simply contains a list of URLs to HTML pages) is generated by iterating through the table of contents (mydoc_sidebar.yml) and creating a list of URLs. You can open up prince-file-list.txt in the doc output to ensure that it has a list of absolute URLs (not relative) in order for Prince to build the PDF.
This is one way the configuration file for the PDF-friendly output differs from the HTML output. (If the PDF isn't building, it's because the prince-file-list.txt in the output is empty or it contains relative URLs.)
The Prince build script puts the output PDF into the mydoc/mydoc/files directory. Now you can reference the PDF file in your HTML site. For example, on the homepage you can allow people to download a PDF of the content at files/adtruth_dotnet_pdf.pdf.
### mydoc_3_multibuild_web.sh
Here's what this script looks like:
```
kill -9 $(ps aux | grep '[j]ekyll' | awk '{print $2}')
clear
echo "Building Mydoc Writers website..."
jekyll build --config configs/doc/config_writers.yml
# jekyll serve --config configs/doc/config_writers.yml
echo "done"
echo "Building Mydoc Designers website..."
jekyll build --config configs/doc/config_designers.yml
# jekyll serve --config configs/doc/config_designers.yml
echo "done"
echo "All finished building all the web outputs!!!"
echo "Now push the builds to the server with . mydoc_4_publish.sh"
```
After killing all Jekyll instances, this script builds an HTML version of the projects and puts the output into the doc_outputs folder. This is the version of the content that users will mainly navigate. Since the sites are built with relative links, you can browse to the folder on your local machine, double-click the index.html file, and see the site.
The `#` part below the `jekyll build` commands contains a serve command that is there for mere convenience in case you want to serve up just one site among many that you're building. For example, if you don't want to build everything &mdash; just one site &mdash; you might just use the serve command instead. (Anything after # in a YAML file comments out the content.)
### mydoc_4_publish.sh
Here's what this script looks like:
```
echo "remove previous directory and any subdirectories without a warning prompt"
ssh yourusername@yourdomain.com 'rm -rf /var/www/html/yourpublishingdirectory'
echo "push new content into the remote directory"
scp -r -vrC ../mydoc_outputs/doc-writers yourusername@yourdomain:/var/www/html/yourpublishingdirectory
echo "All done pushing doc outputs to the server"
```
This script assumes you're publishing content onto a Linux server.
Change `yourusername` to your own user name.
This script first removes the project folder on /var/www/html/yourpublishingdirectory site and then transfers the content from doc_outputs over to the appropriate folder in /var/www/html/yourpublishingdirectory.
Note that the delete part of the script (`rm -rf`) works really well. It annihilates a folder in a heartbeat and doesn't give you any warning prompts, so make sure you have it set up correctly.
Also, in case you haven't set up the SSH publishing without a password, see {{site.data.mydoc.mydoc_no_password_prompts_scp.link}}. Otherwise the script will stop and ping you to enter your password for each directory it transfers.
### (Optional) Push to repositories
This script isn't included in the theme, but you might optionally decide to push the built sites into another github repository. For example, if you're using Cloud Cannon to deploy your sites, you can have Cloud Cannon read files from a specific Github repository.
Here's what this script looks like:
```
cd doc_outputs/mydoc/designers
git add --all
git commit -m "publishing latest version of docs"
git push
echo "All done pushing to Github"
echo "Here's the link to download the guides..."
cd ../../docs
```
This final script simply makes a commit into a Github repo for one of your outputs.
The doc_outputs/mydoc/designers contains the site output from mydoc, so when you push content from this folder into Github, you're actually pushing the HTML site output into Github, not the mydoc source files.
Your delivery team can also grab the site output from these repos. After downloading it, the person unzips the folder and sees the website folders inside.
### mydoc_all.sh
Here's what this script looks like:
```
. deviceinsight_1_multiserve_pdf.sh; . deviceinsight_2_multibuild_pdf.sh; . deviceinsight_3_multibuild_web.sh; . deviceinsight_4_publish.sh;
```
This script simply runs the other scripts. To sequence the commands, you just separate them with semicolons. (If you added the optional script, be sure to include it here.)
After you've configured all the scripts, you can run them all by running `. mydoc_all.sh`. You might want to run this script at lunchtime, since it may take about 10 to 20 minutes to completely build the scripts. But note that since everything is now automated, you don't have to do anything at all after executing the script. After the script finishes, everything is published and in the right location.
## Test out the scripts
After setting up and customizing the build scripts, run a few tests to make sure everything is generating correctly. Getting this part right is somewhat difficult and may likely require you to tinker around with the scripts a while before it works flawlessly.
{% include custom/mydoc/getting_started_series_next.html %}

View File

@ -2,7 +2,7 @@
title: Collections
tags: [content-types]
keywords: groups, api, structure
last_updated: August 12, 2015
last_updated: November 30, 2015
summary: "Collections are useful if you want to loop through a special folder of pages that you make available in a content API. You could also use collections if you have a set of articles that you want to treat differently from the other content, with a different layout or format."
---
@ -29,4 +29,4 @@ See [Collections in the Jekyll documentation](http://jekyllrb.com/docs/collectio
## How to use collections
I haven't found a huge use for collections in normal documentation. However, I did find a use for collections in generating a tooltip file that would be used for delivering tooltips to a user interface from text files in the documentation. See {{site.data.urls.doc_help_api.link}} for details.
I haven't found a huge use for collections in normal documentation. However, I did find a use for collections in generating a tooltip file that would be used for delivering tooltips to a user interface from text files in the documentation. See {{site.data.mydoc.mydoc_urls.mydoc_help_api.link}} for details.

View File

@ -3,7 +3,7 @@ title: Commenting on files
tags:
- navigation
keywords: "annotations, comments, feedback"
last_updated: "August 12, 2015"
last_updated: "November 30, 2015"
summary: "You can add a button to your pages that allows people to add comments. Prose.io is an overlay on Github that would allow people to make comments in an easier interface."
published: true
---

View File

@ -1,12 +1,11 @@
---
title: Conditional logic
tags: [single-sourcing]
tags: [single_sourcing]
keywords: if else logic, conditions, conditional attributes, conditional filtering
last_updated: August 12, 2015
last_updated: November 30, 2015
summary: "You can implement advanced conditional logic that includes if statements, or statements, unless, and more. This conditional logic facilitates single sourcing scenarios in which you're outputting the same content for different audiences."
---
## About Liquid and conditional statements
If you want to create different outputs for different audiences, you can do all of this using a combination of Jekyll's Liquid markup and values in your configuration file.
@ -28,7 +27,7 @@ This theme requires you to add the following attributes in your configuration fi
* platform
* version
If you've ever used DITA, you probably recognize these attributes, since DITA has mostly the same ones. I've found that most single-sourcing projects I work on can be sliced and diced in the ways I need using these conditional attributes.
If you've ever used DITA, you probably recognize these attributes, since DITA has mostly the same ones. I've found that most single_sourcing projects I work on can be sliced and diced in the ways I need using these conditional attributes.
If you're not single sourcing and you find it annoying having to specify these attributes in your sidebar, you can rip out the logic from the sidebar.html, topnav.html file and any other places where conditions.html appears; then you wouldn't need these attributes in your configuration file.
@ -42,24 +41,22 @@ audience: writers
On a page in my site (it can be HTML or markdown), I can conditionalize content using the following:
```liquid
{% raw %}
```liquid
{% if site.audience == "writers" %}
The writer audience should see this...
{% elsif site.audience == "designers" %}
The designer audience should see this ...
{% endif %}
{% endraw %}
```
{% endraw %}
This uses simple `if-elsif` logic to determine what is shown (note the spelling of `elsif`). The `else` statement handles all other conditions not handled by the `if` statements.
Here's an example of `if-else` logic inside a list:
```liquid
{% raw %}
```liquid
To bake a casserole:
1. Gather the ingredients.
@ -80,23 +77,23 @@ You can use more advanced Liquid markup for conditional logic, such as an `or` c
For example, here's an example using `or`:
```liquid
{% raw %}
```liquid
{% if site.audience contains "vegan" or site.audience == "vegetarian" %}
// run this.
{% endif %}
{% endraw %}
```
{% endraw %}
Note that you have to specify the full condition each time. You can't shorten the above logic to the following:
```liquid
{% raw %}
```liquid
{% if site.audience contains "vegan" or "vegetarian" %}
// run this.
{% endif %}
{% endraw %}
```
{% endraw %}
This won't work.
@ -104,13 +101,13 @@ This won't work.
You can also use `unless` in your logic, like this:
```liquid
{% raw %}
{% unless site.print == true %}
```liquid
{% unless site.output == "pdf" %}
...
{% endunless %}
{% endraw %}
```
{% endraw %}
When figuring out this logic, read it like this: "Run the code here *unless* this condition is satisfied." Or "If this condition is satisfied, don't run this code."
@ -122,8 +119,8 @@ In this situation, if `site.print == true`, then the code will *not* be run here
Here's an example of using conditional logic based on a value in a data file:
```liquid
{% raw %}
```liquid
{% if site.data.options.output == "alpha" %}
show this content...
{% elsif site.data.options.output == "beta" %}
@ -131,8 +128,8 @@ show this content...
{% else %}
this shows if neither of the above two if conditions are met.
{% endif %}
{% endraw %}
```
{% endraw %}
To use this, I would need to have a \_data folder called options where the `output` property is stored.
@ -140,7 +137,7 @@ I don't really use the \_data folder as much for project options. I store them i
For example, maybe a file or function name is called something different for different audiences. I currently single source the same content to at least two audiences in different markets.
For the first audience, the function name might be called `generate`, but for the second audience, the same function might be called called `expand`. In my content, I'd just use `{% raw %}{{site.function}}{% endraw %}`. Then in the configuration file I change its value appropriately for the audience.
For the first audience, the function name might be called `generate`, but for the second audience, the same function might be called called `expand`. In my content, I'd just use {% raw %}`{{site.function}}`{% endraw %}. Then in the configuration file I change its value appropriately for the audience.
## Specifying the location for \_data
@ -169,26 +166,24 @@ Then create a folder called \_data_beta.
You can also create conditional logic based on the page namespace. For example, create a page with front matter as follows:
```liquid
{% raw %}
```liquid
---
layout: page
user_plan: full
---
{% endraw %}
```
{% endraw %}
Now you can run logic based on the conditional property in that page's front matter:
```liquid
{% raw %}
```liquid
{% if page.user_plan == "full" %}
// run this code
{% endif %}
{% endraw %}
```
{% endraw %}
## Conditions versus includes

Some files were not shown because too many files have changed in this diff Show More