Skip to content

Commit 646a115

Browse files
committed
made some fixes in the docs and to the relative links with posts and news pages
1 parent 7a45167 commit 646a115

28 files changed

+69
-68
lines changed

_data/sidebars/mydoc_sidebar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ entries:
1111
type: frontmatter
1212
folderitems:
1313
- title:
14-
url: /titlepage.html
14+
url: /titlepage
1515
output: pdf
1616
type: frontmatter
1717
- title:
18-
url: /tocpage.html
18+
url: /tocpage
1919
output: pdf
2020
type: frontmatter
2121

_data/sidebars/product1_sidebar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ entries:
1212
type: frontmatter
1313
folderitems:
1414
- title:
15-
url: /titlepage.html
15+
url: /titlepage
1616
output: pdf
1717
type: frontmatter
1818
- title:
19-
url: /tocpage.html
19+
url: /tocpage
2020
output: pdf
2121
type: frontmatter
2222

_data/sidebars/product2_sidebar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ entries:
1111
type: frontmatter
1212
folderitems:
1313
- title:
14-
url: /titlepage.html
14+
url: /titlepage
1515
output: pdf
1616
type: frontmatter
1717
- title:
18-
url: /tocpage.html
18+
url: /tocpage
1919
output: pdf
2020
type: frontmatter
2121

_includes/topnav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
SimpleJekyllSearch.init({
6060
searchInput: document.getElementById('search-input'),
6161
resultsContainer: document.getElementById('results-container'),
62-
dataSource: '{{ "../search.json" }}',
62+
dataSource: '{{ "search.json" }}',
6363
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "'", "\"}}">{title}</a></li>',
6464
noResultsText: '{{site.data.strings.search_no_results_text}}',
6565
limit: 10,

_layouts/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
99
{% assign projectTags = site.data.tags.allowed-tags %}
1010
{% for tag in page.tags %}
1111
{% if projectTags contains tag %}
12-
<a href="{{ "../tag_" | append: tag }}">{{tag}}</a>{% unless forloop.last %}, {% endunless%}
12+
<a href="{{ "../tag_" | append: tag | append: ".html" }}">{{tag}}</a>{% unless forloop.last %}, {% endunless%}
1313
{% endif %}
1414
{% endfor %}
1515
{% endif %}

feed.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ layout: none
88
<channel>
99
<title>{{ site.title | xml_escape }}</title>
1010
<description>{{ site.description | xml_escape }}</description>
11-
<link>{{ site.url }}{{ site.baseurl }}/</link>
12-
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
11+
<link>{{ site.url }}/</link>
12+
<atom:link href="{{ "/feed.xml" | prepend: site.url }}" rel="self" type="application/rss+xml"/>
1313
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
1414
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
1515
<generator>Jekyll v{{ jekyll.version }}</generator>
@@ -18,8 +18,8 @@ layout: none
1818
<title>{{ post.title | xml_escape }}</title>
1919
<description>{{ post.content | xml_escape }}</description>
2020
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
21-
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
22-
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
21+
<link>{{ post.url | prepend: site.url }}</link>
22+
<guid isPermaLink="true">{{ post.url | prepend: site.url }}</guid>
2323
{% for tag in post.tags %}
2424
<category>{{ tag | xml_escape }}</category>
2525
{% endfor %}

index.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ summary: These brief instructions will help you get started quickly with the the
1010

1111
## Download or clone the theme
1212

13-
First download or clone the theme from the [Github repo](https://github.com/tomjohnson1492/documentation-theme-jekyll). Most likely you won't be pulling in updates once you start customizing the theme, so downloading theme probably makes the most sense.
13+
First download or clone the theme from the [Github repo](https://github.com/tomjohnson1492/documentation-theme-jekyll). Most likely you won't be pulling in updates once you start customizing the theme, so downloading the theme (instead of cloning it) probably makes the most sense.
1414

1515
## Build this theme
1616

@@ -21,7 +21,9 @@ If you're used to running Jekyll sites, you can type the normal jekyll command,
2121

2222
## Customize the Gemfile
2323

24-
Open the Gemfile (in any text editor) in the Jekyll doc theme project:
24+
The Gemfile is how project dependencies are managed. This project doesn't have any dependencies beyond core Jekyll.
25+
26+
Open the Gemfile (in any text editor) in the Jekyll doc theme project with the following command:
2527

2628
```
2729
open Gemfile
@@ -58,7 +60,7 @@ There are several products in this theme. Each product uses a different sidebar.
5860

5961
The top navigation remains the same, because it allows users to navigate across products. But the sidebar navigation adapts to the product.
6062

61-
Because each product uses a different sidebar, you'll need to set up your sidebars. There's a file inside \_includes/custom called "sidebarconfigs.html". This file controls which sidebar gets associated with which product. Open up this file to see its contents.
63+
Because each product uses a different sidebar, you'll need to set up your sidebars. There's a file inside \_includes/custom called "sidebarconfigs.html." This file controls which sidebar gets associated with which product. Open up this file to see its contents.
6264

6365
The sidebarconfigs.html file uses simple `if elsif` logic to set a variable that the sidebar.html file uses to read the sidebar data file. The code in sidebarconfigs.html looks like this:
6466

@@ -84,25 +86,25 @@ The sidebarconfigs.html file uses simple `if elsif` logic to set a variable that
8486

8587
In each page's frontmatter, you must specify the sidebar you want that page to use. Here's an example of the page frontmatter showing the sidebar property:
8688

87-
```yaml
89+
<pre>
8890
---
8991
title: Alerts
9092
tags: [formatting]
9193
keywords: notes, tips, cautions, warnings, admonitions
9294
last_updated: July 3, 2016
9395
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."
94-
sidebar: mydoc_sidebar
96+
<span class="red">sidebar: mydoc_sidebar</span>
9597
permalink: mydoc_alerts
9698
---
97-
```
99+
</pre>
98100

99101
The `sidebar: mydoc_sidebar` refers to the \_data/sidebars/mydoc_sidebar.yml file (meaning, the mydoc_sidebar.yml file inside the sidebars subfolder inside the \data folder).
100102

101103
If no sidebar assignment is found in the page frontmatter, the default sidebar (specified by the `else` statement) will be shown: `site.data.sidebars.home_sidebar.entries`.
102104

103105
Note that your sidebar can only have 2 levels. Given that each product has its own sidebar, this depth should be sufficient (it's really like 3 levels). Deeper nesting goes against usability recommendations.
104106

105-
Additionally, each level must have at least one topic before the next level starts. You can't have a second level that contains multiple third levels without having at least one standalone topic in the second level.
107+
{% include note.html content="Note that each level must have at least one topic before the next level starts. You can't have a second level that contains multiple third levels without having at least one standalone topic in the second level." %}
106108

107109
For more detail on the sidebar, see [Sidebar navigation][mydoc_sidebar_navigation].
108110

@@ -186,9 +188,7 @@ For more detail on the sidebar, see [Sidebar navigation][mydoc_sidebar_navigatio
186188

187189
This theme uses relative links throughout so that you can view the site offline and not worry about which server or directory you're hosting it. It's common with tech docs to push content to an internal server for review prior to pushing the content to an external server for publication. Because of the need for seamless transferrence from one host to another, the site has to use relative links.
188190

189-
To view pages locally on your machine, they need to have the `.html` extension. However, if you prefer not to have this extension, you can simply remove the `.html` from the sidebar entries, and the pages will still work when you view content on a preview server or web server.
190-
191-
The `permalink` property in the page's frontmatter combined with the `include: ['pages']` property in the configuration file is what pushes the files into the root directory when the site builds.
191+
To view pages locally on your machine (without the Jekyll preview server), they need to have the `.html` extension. The `permalink` property in the page's frontmatter (without surrounding slashes) is what pushes the files into the root directory when the site builds.
192192

193193
## Page frontmatter
194194

@@ -201,22 +201,22 @@ tags: [sample1, sample2]
201201
keywords: keyword1, keyword2, keyword3
202202
last_updated: Month day, year
203203
summary: "optional summary here"
204-
sidebar: sidebar name
205-
permalink: filename
204+
sidebar: sidebarname
205+
permalink: filename.html
206206
---
207207
```
208208

209209
(You will customize the values for each of these properties, of course.)
210210

211-
For titles, surrounding the title in quotes is optional, but if you have a colon in the title, you must surround the title with quotation marks. If you have a quotation mark within the title, escape it first with a backlash `\`.
211+
For titles, surrounding the title in quotes is optional, but if you have a colon in the title, you must surround the title with quotation marks. If you have a quotation mark inside the title, escape it first with a backlash `\`.
212212

213213
Values for `keywords` get populated into the metadata of the page for SEO.
214214

215-
Values for `tags` must be defined in your \_data/tags.yml list. You also need a corresponding tag file inside the tags folder that follows the same pattern as the other tag files shown in the tags folder. (Jekyll wont auto-create these tag files.)
215+
Values for `tags` must be defined in your \_data/tags.yml list. You also need a corresponding tag file inside the tags folder that follows the same pattern as the other tag files shown in the tags folder. (Jekyll won't auto-create these tag files.)
216216

217217
If you don't want the mini-TOC to show on a page (such as for the homepage or landing pages), add `toc: false` in the frontmatter.
218218

219-
The `permalink` value should be the same as your filename but without the file extension.
219+
The `permalink` value should be the same as your filename and include the ".html" file extension.
220220

221221
For more detail, see [Pages][mydoc_pages].
222222

@@ -232,7 +232,7 @@ For more information, see [Pages][mydoc_pages] and [Posts][mydoc_posts].
232232

233233
The top navigation bar's menu items are set through the \_data/topnav.yml file. Use the top navigation bar to provide links for navigating from one product to another, or to navigate to external resources.
234234

235-
For external URLs, use `external_url` in the item property, as shown in the example topnav.yml file. For internal links, use `url` as usual.
235+
For external URLs, use `external_url` in the item property, as shown in the example topnav.yml file. For internal links, use `url` the same was you do in the sidebar data files.
236236

237237
Note that the topnav has two sections: `topnav` and `topnav_dropdowns`. The topnav section contains single links, while the `topnav_dropdowns` section contains dropdown menus. The two sections are independent of each other.
238238

pages/mydoc/mydoc_build_arguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ kill -9 $(ps aux | grep '[j]ekyll' | awk '{print $2}')
6363

6464
I recommend creating a profile in iTerm that stores this command. Here's what the iTerm settings look like:
6565

66-
![iTerm profile settings to kill all Jekyll]({{ "/images/killalljekyll.png" | prepend: site.baseurl }})
66+
{% include image.html file="killalljekyll.png" caption="iTerm profile settings to kill all Jekyll" %}
6767

6868
{% include links.html %}

pages/mydoc/mydoc_generating_pdfs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Also, creating a PDF this way gives you a lot more control and customization cap
2323

2424
You can see an example of the finished product here:
2525

26-
<a target="_blank" class="noCrossRef" href="{{ "/pdf/mydoc.pdf" | prepend: site.baseurl }}"><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>
26+
<a target="_blank" class="noCrossRef" href="{{ "pdf/mydoc.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>
2727

2828
## 1. Set up Prince
2929

@@ -348,7 +348,7 @@ You can add a download button for your PDF using some Bootstrap button code:
348348

349349
Here's what that looks like:
350350

351-
<a target="_blank" class="noCrossRef" href={{ "/pdf/mydoc.pdf" | prepend: site.baseurl}}"><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>
351+
<a target="_blank" class="noCrossRef" href={{ "pdf/mydoc.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>
352352

353353
## JavaScript conflicts
354354

pages/mydoc/mydoc_help_api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ folder: mydoc
1313

1414
You can create a help API that developers can use to pull in content.
1515

16-
For the full code demo, see the notes in the <a target="_blank" href="{{ "/tooltips" | prepend: site.baseurl}}" class="noCrossRef">tooltip demo</a>.
16+
For the full code demo, see the notes in the [Tooltips file](tooltips.html).
1717

18-
In this demo, the popovers pull in and display content from the information in a <a target="_blank" href="{{ "/tooltips.json" | prepend: site.baseurl}}">tooltips.json</a> file located in the same directory.
18+
In this demo, the popovers pull in and display content from the information in a <a target="_blank" href="tooltips.json">tooltips.json</a> file located in the same directory.
1919

2020
Instead of placing the JSON source in the same directory, you could also host the JSON file on another site.
2121

@@ -25,7 +25,7 @@ Additionally, instead of tooltip popovers, you could also print content directly
2525

2626
Here's a diagram showing the basic idea of the help API:
2727

28-
<img src="{{ "/images/helpapi.svg" | prepend: site.baseurl }}" style="width: 650px;"/>
28+
<img src="images/helpapi.svg" style="width: 650px;"/>
2929

3030
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.
3131

@@ -136,7 +136,7 @@ This code will loop through all pages in the tooltips collection and insert the
136136
}
137137
```
138138

139-
You can also view the same JSON file here: <a target="_blank" href="{{ "/tooltips.json" | prepend: site.baseurl}}">tooltips.json</a>.
139+
You can also view the same JSON file here: <a target="_blank" href="tooltips.json">tooltips.json</a>.
140140

141141
You can add different fields depending on how you want the JSON to be structured. Here we just have to fields: `id` and `body`. And the JSON is looking just in the tooltips collection that we created.
142142

@@ -230,7 +230,7 @@ $.get( url, function( data ) {
230230
</script>{% endraw %}
231231
```
232232

233-
View the <a target="_blank" href="{{ "/tooltips" | prepend: site.baseurl}}" class="noCrossRef">tooltip demo</a> for a demo.
233+
View the <a target="_blank" href="tooltips.html" class="noCrossRef">tooltip demo</a> for a demonstration.
234234

235235
The `url` in the demo is relative, but you could equally point it to an absolute path on a remote host assuming CORS is enabled on the host.
236236

@@ -268,7 +268,7 @@ Again, see the <a class="noCrossRef" href="/tooltips">Tooltip Demo</a> for a dem
268268
269269
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.
270270
271-
View the source code of the <a target="_blank" href="{{ "/tooltips" | prepend: site.baseurl}}" class="noCrossRef">tooltip demo</a> for the full comments.
271+
View the source code of the <a target="_blank" href="tooltips.html" class="noCrossRef">tooltip demo</a> for the full comments.
272272
273273
## 8. Create easy links to embed the help in your help site
274274

0 commit comments

Comments
 (0)