changed folder naming scheme in sidebar
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: About Ruby, Gems, Bundler, and other Prerequisites
|
||||
title: About Ruby, Gems, Bundler, and other prerequisites
|
||||
tags: [getting_started, troubleshooting]
|
||||
keywords:
|
||||
summary: "Ruby is a programming language you must have on your computer in order to build Jekyll locally. Ruby has various gems (or plugins) that provide various functionality. Each Jekyll project usually requires certain gems."
|
||||
|
@ -76,7 +76,7 @@ These pages should appear in your sidebar YML file (in this product, mydoc_sideb
|
||||
- title:
|
||||
output: pdf
|
||||
type: frontmatter
|
||||
items:
|
||||
folderitems:
|
||||
- title:
|
||||
url: /titlepage/
|
||||
output: pdf
|
||||
|
@ -44,9 +44,8 @@ For example, the sidebar.html file contains the following code:
|
||||
|
||||
{% raw %}
|
||||
```liquid
|
||||
{% if item.external_url %}
|
||||
<li><a href="{{item.external_url}}" target="_blank">{{subcategory.title}}</a></li>
|
||||
{% elsif page.url == item.url %}
|
||||
{% if subfolderitem.external_url %}
|
||||
<li><a href="{{subfolderitem.external_url}}" target="_blank">{{deeplevel.title}}</a></li>
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
@ -60,15 +59,12 @@ For example, the sidebar.html file contains the following code:
|
||||
|
||||
{% raw %}
|
||||
```liquid
|
||||
{% elsif page.url == item.url %}
|
||||
<li class="active"><a href="{{item.url | prepend: ".."}}">{{item.title}}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{item.url | prepend: ".."}}">{{item.title}}</a></li>
|
||||
{% endif %}
|
||||
{% elsif page.url == subfolderitem.url %}
|
||||
<li class="active"><a href="{{subfolderitem.url | prepend: site.baseurl}}">{{subfolderitem.title}}</a></li>
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
If the `page.url` matches the `item.url`, then an `active` class gets applied. If not, the `active` class does not get applied.
|
||||
If the `page.url` matches the `subfolderitem.url`, then an `active` class gets applied. If not, the `active` class does not get applied.
|
||||
|
||||
The `page.url` in Jekyll is a site-wide variable. If you insert {% raw %}`{{page.url}}`{% endraw %} on a page, it will render as follows: {{page.url}}. The `url` attribute in the sidebar item must match the page URL in order to get the `active` class applied.
|
||||
|
||||
|
@ -142,7 +142,7 @@ Here we use a "for" loop to get each item in the bikes list. By using `.title` w
|
||||
```yaml
|
||||
salesteams:
|
||||
- title: Regions
|
||||
subitems:
|
||||
subfolderitems:
|
||||
- location: US
|
||||
- location: Spain
|
||||
- location: France
|
||||
@ -184,17 +184,17 @@ Each list item starts with the hyphen `–`. You cannot directly access the lis
|
||||
```yaml
|
||||
toc:
|
||||
- title: Group 1
|
||||
subitems:
|
||||
subfolderitems:
|
||||
- page: Thing 1
|
||||
- page: Thing 2
|
||||
- page: Thing 3
|
||||
- title: Group 2
|
||||
subitems:
|
||||
subfolderitems:
|
||||
- page: Piece 1
|
||||
- page: Piece 2
|
||||
- page: Piece 3
|
||||
- title: Group 3
|
||||
subitems:
|
||||
subfolderitems:
|
||||
- page: Widget 1
|
||||
- page: Widget 2 it's
|
||||
- page: Widget 3
|
||||
|
Reference in New Issue
Block a user