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

Add support for DISPLAY_PAGES_ON_MENU #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ For enhancements, bug tracking, and requests please check my [github repo](https
* `SITESUBTITLE = 'String'`
* `FOOTER_TEXT = 'Replace pelican credit'`
* `DISPLAY_CATEGORIES_ON_MENU = True/False`
* `DISPLAY_PAGES_ON_MENU = True/False`
* `LINKS = (('Site', 'http://url.com'), ('Site 2', 'http://another.url.com'))`
* `SINGLE_AUTHOR = True/False`
* `MINT = True/False`
Expand All @@ -18,4 +19,4 @@ For enhancements, bug tracking, and requests please check my [github repo](https
* [tBunnyMan](http://bunnyman.info) (Pelican v1.0)

## Licence
Modified and released under the GNU General Public License, full details in `LICENSE.txt` file.
Modified and released under the GNU General Public License, full details in `LICENSE.txt` file.
2 changes: 2 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ <h1 id="site-title"><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
{% for title, link in MENUITEMS %}
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in PAGES %}
<li{% if p == page %} class="active"{% endif %} class="menu-item menu-item-type-post_type menu-item-object-page"><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories %}
<li{% if cat == category %} class="active"{% endif %} class="menu-item menu-item-type-post_type menu-item-object-page"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
Expand Down