@@ -91,6 +91,7 @@
+
{% comment %}
{% include frameescape.html %}
{% endcomment %}
diff --git a/algolia_search.json b/algolia_search.json
index d5249a2..3762b81 100644
--- a/algolia_search.json
+++ b/algolia_search.json
@@ -4,17 +4,20 @@ layout: none
search: exclude
---
-{
-{% for post in site.pages %}
+[
+{% for page in site.pages %}
{% unless page.search == "exclude" %}
-"{{ post.url | slugify }}": {
-"title": "{{ post.title | xml_escape }}",
-"url": " {{ post.url | xml_escape | prepend: '..'}}",
-"summary": {{post.summary}},
-"body": {{post.content}},
-"tags": "{{ post.tags | xml_escape }}"
-}
+{
+"title": "{{ page.title | escape }}",
+"tags": "{{ page.tags }}",
+"keywords": "{{page.keywords}}",
+"url": "{{ page.url | prepend: '..' }}",
+"summary": "{{page.summary}}",
+"body": "{{ page.content | strip | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' | replace: ' ', ' ' }}"
+
+},
{% endunless %}
-{% unless forloop.last %},{% endunless %}
+
{% endfor %}
-}
\ No newline at end of file
+null
+]
diff --git a/configs/mydoc/config_designers.yml b/configs/mydoc/config_designers.yml
index 52f562d..5fbf52a 100644
--- a/configs/mydoc/config_designers.yml
+++ b/configs/mydoc/config_designers.yml
@@ -44,6 +44,7 @@ feedback_email: tomjohnson1492@gmail.com
highlighter: rouge
markdown: kramdown
kramdown:
+ input: GFM
auto_ids: true
collections:
diff --git a/configs/mydoc/config_writers.yml b/configs/mydoc/config_writers.yml
index c371ea5..4a1ea37 100644
--- a/configs/mydoc/config_writers.yml
+++ b/configs/mydoc/config_writers.yml
@@ -1,14 +1,14 @@
# project definitions
-project: mydoc_designers
-audience: designers
+project: mydoc_writers
+audience: writers
product: doc
platform: all
version: all
output: web
-destination: ../doc_outputs/mydoc/designers
+destination: ../doc_outputs/mydoc/writers
topnav_title: Jekyll Documentation Theme
-homepage_title: Jekyll doc theme for designers
-site_title: Jekyll theme for designers
+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
@@ -16,10 +16,11 @@ github_editme_path: tomjohnson1492/documentation-theme-jekyll/edit/reviews
disqus_shortname: idrbwjekyll
# variables
-sidebar_tagline: Designers
+
+sidebar_tagline: Writers
sidebar_version: Version 4.0
-theme_file: theme-blue.css
-pdf_file_name: mydoc_designers_pdf.pdf
+theme_file: theme-green.css
+pdf_file_name: mydoc_writers_pdf.pdf
# the algolia entries here are experimental only.
@@ -27,7 +28,7 @@ pdf_file_name: mydoc_designers_pdf.pdf
# - algoliasearch-jekyll
#algolia:
# application_id: 'HXUBJERYYB'
-# index_name: 'documentation_theme_jekyll_designers'
+# index_name: 'documentation_theme_jekyll_writers'
port: 4009
exclude:
@@ -43,6 +44,7 @@ feedback_email: tomjohnson1492@gmail.com
highlighter: rouge
markdown: kramdown
kramdown:
+ input: GFM
auto_ids: true
collections:
diff --git a/css/customstyles.css b/css/customstyles.css
index b927d48..c8ef3da 100644
--- a/css/customstyles.css
+++ b/css/customstyles.css
@@ -958,4 +958,17 @@ a.no_icon:after {
.results ul {
list-style-type: none;
padding: 0;
+}
+
+/* algolia */
+
+div.results {
+ position: absolute;
+ background-color: white;
+ width: 100%;
+}
+
+.algolia__result-highlight {
+ background-color: yellow;
+ font-weight: bold;
}
\ No newline at end of file
diff --git a/mydoc/mydoc_algoliasearch.md b/mydoc/mydoc_algoliasearch.md
new file mode 100644
index 0000000..ceaf4f5
--- /dev/null
+++ b/mydoc/mydoc_algoliasearch.md
@@ -0,0 +1,10 @@
+---
+title: Algolia search
+tags: [formatting]
+keywords: search
+summary: "This page demonstrates an integration of Algolia search."
+---
+
+## algolia:
+
+{% include algolia.html %}
\ No newline at end of file
diff --git a/mydoc/mydoc_mercurial_collaboration.md b/mydoc/mydoc_mercurial_collaboration.md
index 65b3994..944e52a 100644
--- a/mydoc/mydoc_mercurial_collaboration.md
+++ b/mydoc/mydoc_mercurial_collaboration.md
@@ -3,7 +3,6 @@ title: Mercurial notes and tips
summary: "If you're using Mercurial to collaborate on a project, see the tips and notes on this page."
tags: collaboration
keywords: mercurial, hg, collaboration, interaction, project teams
-published: false
---
@@ -37,15 +36,13 @@ This is my reference notes and quick reference for using Mercurial.
child Later in the changeset history. the first parent is the first changeset, and then you have a list of descendants, which are the children.
-
merge conflict scenarios Merge conflicts happen wou add or modify a file that another has removed from one commit to another, you make conflicting changes to the same file from one commit to another, or Mercurial notes some other file discrepancy. When a merge conflict happens, Mercurial launches a merge program to resolve the conflict. When merge conflicts happen, Mercurial removes the problematic files from the working directory until you fix them. You have to add them again to the working directory.
+merge conflict scenarios Merge conflicts happen when add or modify a file that another has removed from one commit to another, you make conflicting changes to the same file from one commit to another, or Mercurial notes some other file discrepancy. When a merge conflict happens, Mercurial launches a merge program to resolve the conflict. When merge conflicts happen, Mercurial removes the problematic files from the working directory until you fix them. You have to add them again to the working directory.
bookmarks:This is a way to create branches in Mercurial. First run hg bookmark hell
. Then hg checkout hell
. Now you're working in hell. Then run hg bookmark --delete hell
to delete hell.
branches You don't really work with branches in Mercurial. If you create a branch, it's considered a separate line of code. Rarely do you merge branches back in. In this regard, Mercurial differs greatly from Git. However, Mercurial's approach to branching is that you should simply clone the repository. When you want to merge your clone, you pull changes from your clone. There's really no reason to add in this new "branching" functionality when all you're doing is basically the same clone operation. rebase I think this refers to drug use of some kind.
-
## Commands
@@ -88,8 +85,7 @@ This is my reference notes and quick reference for using Mercurial.
| bookmark --delete {bookmark_name | deletes the bookmark |
| revert | go back to the way the files were at the last commit |
-{{site.data.alerts.note}} {{site.data.alerts.end}}
-You can add a source for all of these commands. If no source is specified, the default repo (from which the existing repo was cloned) is used. For example, pull (source) will pull from a source other than the default if specified.
+{{site.data.alerts.note}} You can add a source for all of these commands. If no source is specified, the default repo (from which the existing repo was cloned) is used. For example, pull (source) will pull from a source other than the default if specified.{{site.data.alerts.end}}
When you run `hg status`, there are various icons next to the files.
@@ -106,9 +102,10 @@ When you run `hg status`, there are various icons next to the files.
As a general worfklow:
-1. Pull -u (or fetch)
1. Commit
-2. Push
+2. Pull -u (or fetch)
+3. Merge
+4. Push
## Merge conflicts
@@ -116,16 +113,18 @@ As a general worfklow:
When a conflict happens, the default merge program configured in .hgrc launches. [P4Merge](https://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools) works well.
To configure Mercurial to use p4merge, install P4Merge, and then put this into your .hgrc file (if it's not already there).
+```
p4merge.executable = /Applications/p4merge.app/Contents/MacOS/p4merge
p4merge.priority = 50
p4merge.premerge = True
p4merge.gui = True
p4merge.args = $base $local $other $output
p4merge.binary = True
+```
When P4Merge launches to resolve a merge conflict, you select the change you want, or add your own. Then Save. Then quit P4merge completely.
-I am not sure if you have to run `hg addremove` and then `hg resolve --mark` to mark the conflict as resolved.
+(I am not sure if you have to run `hg addremove` and then `hg resolve --mark` to mark the conflict as resolved.)
For more details, see [P4Merge](https://www.mercurial-scm.org/wiki/P4Merge).
@@ -148,7 +147,7 @@ If you forget to add certain files to your ignore list, you can add them later a
## Merge conflicts
-Here's the scenario. After you do hg pull -u, you get this error message:
+Here's the scenario. After you do `hg pull -u`, you get this error message:
```
abort: untracked files in working directory differ from files in requested revision
@@ -167,12 +166,14 @@ When you run into problems with Mercurial, you should try to sort it out the bes
1. Change the name of your "repo" to "repo-old".
2. Reclone the project.
-3. Copy over the contents from repo old into repo. (Don't copy over the .hg. idea, .DS_Store, or .hgignore files.)
+3. Copy over the contents from repo-old into repo. (Don't copy over the .hg. idea, .DS_Store, or .hgignore files.)
Now follow the standard Commit and Push instructions here. It should fix the issue.
## Creating a Mercurial Test Playground on Your Local Machine
+
You can create some local Mercurial repos on your machine so you can play around with commits, merges, and other experiments.
+
Create a folder and initialize Mercurial in the folder:
```
@@ -242,10 +243,7 @@ If you run the hg addremove command, Mercurial will simply add back the file you
You should add this file to an ignore list.
-Go to the root directory of your jekyll project.
-
-Create a file called .hgignore.
-
-Add each file you want to ignore (e.g., .jekyll-metadata) on a separate line.
-
-Now make sure that everyone else adds these files to their ignore list. If someone else commits a file that you've ignored, Mercurial will complain when you pull the latest revision.
\ No newline at end of file
+1. Go to the root directory of your jekyll project.
+2. Create a file called .hgignore.
+3. Add each file you want to ignore (e.g., .jekyll-metadata) on a separate line.
+4. Now make sure that everyone else adds these files to their ignore list. If someone else commits a file that you've ignored, Mercurial will complain when you pull the latest revision.
\ No newline at end of file
diff --git a/mydoc/mydoc_yaml_tutorial.md b/mydoc/mydoc_yaml_tutorial.md
new file mode 100644
index 0000000..bc1b727
--- /dev/null
+++ b/mydoc/mydoc_yaml_tutorial.md
@@ -0,0 +1,379 @@
+---
+title: Working with YAML
+tags: [formatting]
+keywords: search
+summary: "YAML is a format that relies on white spacing to separate out the various content elements. Jekyll lets you use Liquid with YAML as a way to parse through the YAML content. One of the most common uses of YAML is to store the items for your table of contents."
+---
+## Overview
+One of the most interesting features of Jekyll is the ability to separate out data elements from formatting elements using a combination of YAML (stored in data files inside your \_data folder), and filtering and looping through that YAML using Liquid. This setup is most common when you're trying to create a table of contents.
+
+Not many Jekyll themes actually have a robust table of contents, which is critical when you are creating any kind of documentation or reference material that has a lot of pages.
+
+## Basic approach
+
+Here's the basic approach in creating a table of contents. You store your data items in a YAML file using YAML syntax. (I'll go over more about YAML syntax in a later section.) You then create your HTML structure in another file, such as sidebar.html. You might leverage one of the many different table of content's frameworks (such as [Navgoco](https://github.com/tefra/navgoco)) that have been created for this HTML structure.
+
+Then, using Liquid syntax for loops and other iteration techniques, you access all of those values from the data file and splice them into HTML formatting. This will become more clear as we go through some examples.
+
+## YAML overview
+
+Rather than just jump into YAML at the most advanced level, I'm going to start from ground zero with an introduction to YAML and how you access basic values in your data files using Jekyll.
+
+Note that you don't actually have to use Jekyll when using YAML. YAML is used in a lot of other systems and is a format completely independent of Jekyll. However, because Jekyll uses Liquid, it gives you a lot of power to parse through your YAML data and make use of it.
+
+YAML itself doesn't really do anything mdash; it's just a way of storing your data in a specific structure that other utilities can parse.
+
+## YAML basics
+You can read about YAML from a lot of different sources. Here are some basic characteristics of YAML:
+
+* YAML doesn't use markup tags. This means you won't see any kind of angle brackets. It uses white space as a way to form the structure. This makes YAML much more human readable.
+* Because YAML does use white space for the structure, YAML is extremely picky about the exactness of spaces. If you have just one extra space somewhere, it can cause the whole file to be invalid.
+* For each new level in YAML, you indent two spaces.
+* Because tabs are not universally implemented the same way, a tab might not equate to two spaces. In general, it's best to manually type two spaces to create a new level in YAML.
+* YAML has several types of elements. The most common are mappings and lists. A mapping is simply a key-value pair. A list is a sequence of items. List start with hyphens.
+* Items at each level can have various properties. You can create conditions based on the properties.
+* You use dot notation to access each new level.
+* You can use "for" loops to iterate through a list.
+
+I realize a lot of this vague and general; however, it will become a lot more clear as we go through some concrete examples.
+
+In the _data/mydoc folder, there's a file called samplelist.yml. All of these examples come from that file.
+
+## Example 1: Simple mapping
+
+**YAML:**
+
+```yaml
+name:
+ husband: Tom
+ wife: Shannon
+```
+
+**Markdown:**
+
+{% raw %}
+```liquid
+Husband's name: {{site.data.mydoc.samplelist.name.husband}}
+
+Wife's name: {{site.data.mydoc.samplelist.name.wife}}
+```
+{% endraw %}
+
+Notice that in order to access the data file, you use `site.data.mydoc.samplelist`. `mydoc` is the folder, and `samplelist` is the name of the YAML file.
+
+**Result:**
+
+Husband's name: {{site.data.mydoc.samplelist.name.husband}}
+
+Wife's name: {{site.data.mydoc.samplelist.name.wife}}
+
+## Example 2: Line breaks
+
+**YAML:**
+
+```yaml
+feedback: >
+ This is my feedback to you.
+ Even if I include linebreaks here,
+ all of the linebreaks will be removed when the value is inserted.
+
+block: |
+ This pipe does something a little different.
+ It preserves the breaks.
+ This is really helpful for code samples,
+ since you can format the code samples with
+ the appropriate
+```
+
+**Markdown:**
+
+```liquid
+**Feedback**
+{{site.data.mydoc.samplelist.feedback}}
+
+**Block**
+{{site.data.mydoc.samplelist.block}}
+```
+
+**Result:**
+
+**Feedback**
+{{site.data.mydoc.samplelist.feedback}}
+
+**Block**
+{{site.data.mydoc.samplelist.block}}
+
+
+
+## Example 3: Simple list
+
+**YAML**:
+
+```yaml
+bikes:
+ - title: mountain bikes
+ - title: road bikes
+ - title: hybrid bikes
+```
+
+**Markdown + Liquid:**
+
+{% raw %}
+```liquid
+{% for item in site.data.mydoc.samplelist.bikes %}
+* {{item.title}}
+{% endfor %}
+```
+{% endraw %}
+
+**Result:**
+
+{% for item in site.data.mydoc.samplelist.bikes %}
+* {{item.title}}
+{% endfor %}
+
+Here we use a "for" loop to get each item in the bikes list. By using ".title" we only get the title property from each list item.
+
+## Example 4: List items
+
+**YAML:**
+
+```yaml
+salesteams:
+- title: Regions
+ subitems:
+ - location: US
+ - location: Spain
+ - location: France
+```
+
+**Markdown + Liquid:**
+
+{% raw %}
+```
+{% for item in site.data.mydoc.samplelist.salesteams %}
+{{item.title}}
+
+{% for entry in item.subitems %}
+- {{entry.location}}
+{% endfor %}
+
+{% endfor %}
+```
+{% endraw %}
+
+**Result:**
+{% for item in site.data.mydoc.samplelist.salesteams %}
+{{item.title}}
+
+{% for entry in item.subitems %}
+- {{entry.location}}
+{% endfor %}
+
+{% endfor %}
+
+Hopefully you can start to see how to wrap more complex formatting around the YAML content. When you use a "for" loop, you basically choose the variable of what to call the list items. Each list item starts with the hyphen "–". It's important to understand that you cannot directly access the list item by referring to a mapping (unless you specify the position in the list). You only loop through the list items.
+
+If you wanted to access the list item, you would have to use something like `[1]`, which is how you access the position in an array. You cannot access a list item like you can access a mapping key.
+
+The variable you choose to use becomes how you access the properties of each list item. In this case, I decided to use the variable "item". I In order to get each property of the list item, I used "item.subitems".
+
+## Example 5: Table of contents
+
+**YAML:**
+
+```yaml
+toc:
+ - title: Group 1
+ subitems:
+ - page: Thing 1
+ - page: Thing 2
+ - page: Thing 3
+ - title: Group 2
+ subitems:
+ - page: Piece 1
+ - page: Piece 2
+ - page: Piece 3
+ - title: Group 3
+ subitems:
+ - page: Widget 1
+ - page: Widget 2 it's
+ - page: Widget 3
+```
+
+**Markdown + Liquid:**
+
+{% raw %}
+```liquid
+{% for item in site.data.mydoc.samplelist.toc %}
+{{item.title}}
+
+{% for entry in item.subitems %}
+- {{entry.page}}
+{% endfor %}
+
+{% endfor %}
+```
+{% endraw %}
+
+**Result:**
+
+{% for item in site.data.mydoc.samplelist.toc %}
+{{item.title}}
+
+{% for entry in item.subitems %}
+- {{entry.page}}
+{% endfor %}
+
+{% endfor %}
+
+This example is similar to the previous one, but it's more developed as a real table of contents. I wanted to show kind of how it pretty much works.
+
+## Example 6: Variables
+
+**YAML:**
+
+```yaml
+something: &hello Greetings earthling!
+myref: *hello
+```
+
+**Markdown:**
+
+{% raw %}
+```liquid
+{{ site.data.mydoc.samplelist.myref }}
+```
+{% endraw %}
+
+**Result:**
+
+{{ site.data.mydoc.samplelist.myref }}
+
+This example is different. Here I'm showing how to reuse content in YAML file. If you have the same value that you want to repeat in other mappings, you can create a variable using the `&` symbol. Then when you want to refer to that variable's value, you use an asterisk `*` followed by the name of the variable.
+
+In this case the variable is `&hello` and its value is `Greetings earthling!` In order to reuse that same value, you just type `*hello`.
+
+I don't use variables very much myself, but that's not to say they couldn't be highly useful. For example, let's say you put name of the product in parentheses after each title (because you have various products that you're providing documentation for in the same site). You could create a variable for that product name so that if you change how you're referring to it, you wouldn't have to change all instances of it in your YAML file.
+
+## Example 7: Positions in lists
+
+**YAML:**
+
+```yaml
+about:
+ - zero
+ - one
+ - two
+ - three
+```
+
+**Markdown:**
+
+{% raw %}
+```
+{{ site.data.mydoc.samplelist.about[0] }}
+```
+{% endraw %}
+
+**Result:**
+
+{{ site.data.mydoc.samplelist.about[0] }}
+
+You can see that were accessing one of the items in the list using `[0]`. this refers to the position in the array with a list item is. And remember that you start counting at zero, not one.
+
+I wanted to include this example because it points to the challenge in getting a value from a specific list item. You can't just call out a specific item in a list like you can with a mapping that has a key – value pair. This is why you usually iterate through the list items using a "for" loop.
+
+## Example 8: Properties from list items at specific positions
+
+**YAML:**
+
+```yaml
+numbercolors:
+ - zero:
+ properties: red
+ - one:
+ properties: yellow
+ - two:
+ properties: green
+ - three:
+ properties: blue
+```
+
+**Markdown:**
+
+{% raw %}
+```liquid
+{{ site.data.mydoc.samplelist.numbercolors[0].properties }}
+```
+{% endraw %}
+
+**Result:**
+
+{{ site.data.mydoc.samplelist.numbercolors[0].properties }}
+
+This example is similar as before; however, in this case were getting a specific property from the list item in the zero position.
+
+## Example 9: Conditions
+
+**YAML:**
+
+```yaml
+mypages:
+- section1: Section 1
+ audience: developers
+ product: acme
+ url: facebook.com
+- section2: Section 2
+ audience: writers
+ product: acme
+ url: google.com
+- section3: Section 3
+ audience: developers
+ product: acme
+ url: amazon.com
+- section4: Section 4
+ audience: writers
+ product: gizmo
+ url: apple.com
+- section5: Section 5
+ audience: writers
+ product: acme
+ url: microsoft.com
+```
+
+**Markdown + Liquid:**
+
+{% raw %}
+```liquid
+{% for sec in site.data.mydoc.samplelist.mypages %}
+{% if sec.audience == "writers" %}
+* {{sec.url}}
+{% endif %}
+{% endfor %}
+```
+{% endraw %}
+
+**Result:**
+
+{% for sec in site.data.mydoc.samplelist.mypages %}
+{% if sec.audience == "writers" %}
+* {{sec.url}}
+{% endif %}
+{% endfor %}
+
+Let's adjust the condition just a little. Now let's add a second condition so that the `audience` property has to be writers and the `product` property has to be gizmo. This is how you would write.
+
+{% raw %}
+```liquid
+{% for sec in site.data.mydoc.samplelist.mypages %}
+{% if sec.audience == "writers" and sec.product == "gizmo" %}
+* {{sec.url}}
+{% endif %}
+{% endfor %}
+```
+{% endraw %}
+
+## More resources
+
+For more examples and explanations, see this helpful post on tournemille.com: [How to create data-driven navigation in Jekyll](http://www.tournemille.com/blog/How-to-create-data-driven-navigation-in-Jekyll/).
diff --git a/search.json b/search.json
index 3289d9b..733b805 100644
--- a/search.json
+++ b/search.json
@@ -4,32 +4,18 @@ layout: none
search: exclude
---
-//[
-//{% for page in site.pages %}
-//{% unless page.search == "exclude" %}
-//{
-//"title": "{{ page.title | escape }}",
-//"tags": "{{ page.tags }}",
-//"keywords": "{{page.keywords}}",
-//"url": "{{ page.url | prepend: '..' }}",
-//"summary": "{{page.summary}}"
-//},
-//{% endunless %}
-//
-//{% endfor %}
-//null
-//]
-
-{
-{% for post in site.pages %}
+[
+{% for page in site.pages %}
{% unless page.search == "exclude" %}
-"{{ post.url | slugify }}": {
-"title": "{{ post.title | xml_escape }}",
-"url": " {{ post.url | xml_escape | prepend: '..'}}",
-"summary": {{post.summary}},
-"tags": "{{ post.tags | xml_escape }}"
-}
+{
+"title": "{{ page.title | escape }}",
+"tags": "{{ page.tags }}",
+"keywords": "{{page.keywords}}",
+"url": "{{ page.url | prepend: '..' }}",
+"summary": "{{page.summary}}"
+},
{% endunless %}
-{% unless forloop.last %},{% endunless %}
+
{% endfor %}
-}
\ No newline at end of file
+null
+]
\ No newline at end of file