andrewbanchich/forty-jekyll-theme

Exposed .css hyperlinks in /#menu

Closed this issue · 2 comments

While testing out a /404.md, I noticed a bug in the #menu that causes hyperlinks to pages that aren't supposed to be exposed (e.g. 404.html, main.css, style.css). This bug is reproducible in Internet Explorer 11, Firefox 52 ESR, and Chrome 59.

menu_exposed_css

Potential solution:

  • Make nav-menu a required property in the .md files
  • Update \_includes\header.html to add logic for nav-menu
Before:
{% for page in site.pages %}
	{% if page.layout != "home"}
		<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li>
	{% endif %}
{% endfor %}
After:
{% for page in site.pages %}
	{% if page.layout != "home" and page.nav-menu == true %}
		<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li>
	{% endif %}
{% endfor %}

menu_fixed

@milesgratz nice catch! i just pushed this fix to master on gitlab, so it should be on github soon. sorry for the late response.

thanks!