Fixed an issue in the configuration. The conditions.html file needs to specify different project names for the conditions. For some reason I had both writers and designers outputs with the same site.project name, which caused the conditional filtering feature not to work. This is fixed now.

This commit is contained in:
Tom Johnson
2015-09-08 13:14:30 -07:00
parent a36f29bc14
commit 729d03f2b6
9 changed files with 12697 additions and 12645 deletions

View File

@ -29,7 +29,7 @@ exclude:
host: 127.0.0.1
feedback_email: tomjohnson1492@gmail.com
sidebar_accordion: true
markdown: redcarpet
markdown: kramdown
print: false
theme_file: theme-blue.css
# only use suffix if you need to force index.html to display
@ -38,7 +38,15 @@ theme_file: theme-blue.css
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"]
highlighter: pygments
highlighter: rouge
kramdown:
auto_ids: true
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
smart_quotes: lsquo,rsquo,ldquo,rdquo
enable_coderay: false
collections:
tooltips:

View File

@ -144,7 +144,7 @@ entries:
items:
- title: Tooltips
url: /doc_adding_tooltips.html
audience: writers
audience: writers, designers
platform: all
product: all
version: all

View File

@ -1,4 +1,4 @@
{% if site.project == "doc" %}
{% if site.project == "doc_writers" %}
{% assign audience = "writers" %}
{% assign sidebar = site.data.sidebar_doc.entries %}
{% assign topnav = site.data.topnav_doc.topnav %}
@ -8,10 +8,9 @@
{% assign platform = "php" %}
{% assign link = "custom/doc/links_doc.html" %}
{% assign projectTags = site.data.tags_doc.allowed-tags %}
{% assign searchGroup = "doc" %}
{% endif %}
{% if site.project == "doc" %}
{% if site.project == "doc_designers" %}
{% assign audience = "designers" %}
{% assign sidebar = site.data.sidebar_doc.entries %}
{% assign topnav = site.data.topnav_doc.topnav %}
@ -21,5 +20,4 @@
{% assign platform = "all" %}
{% assign link = "custom/doc/links_doc.html" %}
{% assign projectTags = site.data.tags_doc.allowed-tags %}
{% assign searchGroup = "doc" %}
{% endif %}

View File

@ -1,5 +1,5 @@
# project definitions
project: doc
project: doc_designers
audience: designers
product: all
platform: all

View File

@ -1,5 +1,5 @@
# project definitions
project: doc
project: doc_writers
audience: writers
product: all
platform: all

View File

@ -814,4 +814,6 @@ a.accordion-toggle {
}
.tommy {font-weight:bold; font-color: red;}
#johnson {font-weight:bold; font-color: blue;}

View File

@ -25,7 +25,7 @@ Note that you can define arbitrary key-value pairs in the configuration file, an
| Field | Required? | Description |
|-------|-----------|-----------|
| **project** | Required| A unique name for the project. The \_includes/custom/{project}/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. |
| **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.
@ -85,7 +85,7 @@ If all of these conditions are met, then the item will qualify to be included in
version: all
```
The file in \_includes/custom/doc/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.
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.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff