Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure proposals show up on the jekyll site. #49

Merged
merged 11 commits into from
Jun 4, 2020
11 changes: 5 additions & 6 deletions src/jekyll/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

all: site
all: build

# Indirection for the dot-dir.
site: .gen-site

.gen-site:
.gen-site: site theme
bundle exec jekyll build

run:
build: .gen-site

run: site theme
bundle exec jekyll server --watch

clean:
Expand Down
1 change: 0 additions & 1 deletion src/jekyll/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ defaults:
values:
layout: "page"
search: true
sidebar: sidebar
topnav: topnav

plugins:
Expand Down
1 change: 1 addition & 0 deletions src/jekyll/site/proposals
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ entries:
url: /docs/project/commenting_guidelines.html
- title: Roadmap process
url: /docs/project/roadmap_process.html
- title: Proposals
- title: Misc
folderitems:
- title: Groups
Expand Down
23 changes: 19 additions & 4 deletions src/jekyll/theme/_includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% assign sidebar = site.data.sidebars[page.sidebar].entries %}

<ul id="mysidebar" class="nav">
<li class="sidebarTitle">{{sidebar[0].product}} {{sidebar[0].version}}</li>
{% for entry in sidebar %} {% for folder in entry.folders %}
{% for entry in site.data.sidebar.entries %} {% for folder in entry.folders %}
<li>
<a title="{{folder.title}}" href="#">{{folder.title}}</a>
<ul>
Expand Down Expand Up @@ -67,6 +64,24 @@
</ul>
</li>
{% endfor %} {% endfor %}
<!-- Add proposals to the proposals folder. -->
{% if folder.title == "Proposals" %}
{% for proposal in site.pages %}
{% assign path = proposal.url | split: "/" %}
{% if path[1] == "proposals" %}
{% unless path[2] contains "template" %}
{% assign active = "" %}
{% if page.url == proposal.url %}
{% assign active = "active" %}
{% endif %}
<li class="{{active}}">
<a title="{{proposal.title}}"
href="{{proposal.url}}">{{proposal.title}}</a>
</li>
{% endunless %}
{% endif %}
{% endfor %}
{% endif %}
</ul>
</li>
{% endfor %} {% endfor %}
Expand Down