chrisrhymes / bulma-clean-theme

A clean and modern Jekyll theme based on Bulma
http://www.csrhymes.com/bulma-clean-theme/
MIT License
383 stars 485 forks source link

Menubar (and Regular) TOC Not Displaying Title #112

Closed datallurgy closed 12 months ago

datallurgy commented 2 years ago

Using the following front-matter, the TOC title is not displaying.

---
title: Resources
subtitle: Commonly Used and Invaluable Things
layout: page
menubar_toc: true
toc_title: Things and Stuff
hide_hero: true
show_sidebar: false
---

I've verified my files against allejo/jekyll-toc but can't seem to find the issue.

image

chrisrhymes commented 2 years ago

Hello, I can't seem to replicate this issue. What version of the theme gem are you using?

datallurgy commented 2 years ago

I'm using bulma-clean-theme (0.12).

*** LOCAL GEMS ***

addressable (2.8.0)
bigdecimal (3.1.2, default: 1.4.1)
bulma-clean-theme (0.12)
bundler (2.3.6, default: 1.17.2)
cmath (default: 1.0.0)
colorator (1.1.0)
concurrent-ruby (1.1.9)
csv (3.2.2, default: 3.0.9)
date (3.2.2, default: 2.0.0)
dbm (1.1.0, default: 1.0.0)
e2mmap (default: 0.1.0)
em-websocket (0.5.3)
etc (1.3.0, default: 1.0.1)
eventmachine (1.2.7)
fcntl (1.0.1, default: 1.0.0)
ffi (1.15.5)
fiddle (1.1.0, default: 1.0.0)
fileutils (1.6.0, default: 1.1.0)
forwardable (1.3.2, default: 1.2.0)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.9.1, 0.9.5)
io-console (0.5.11, default: 0.4.7)
ipaddr (1.2.3, default: 1.2.2)
irb (1.4.1, default: 1.0.0)
jekyll (4.2.1, 3.9.1)
jekyll-feed (0.16.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.1.0, 1.5.2)
jekyll-seo-tag (2.7.1)
jekyll-sitemap (1.4.0)
jekyll-watch (2.2.1)
json (2.6.1, default: 2.1.0)
kramdown (2.3.1)
kramdown-parser-gfm (1.1.0)
liquid (5.1.0, 4.0.3)
listen (3.7.1)
logger (1.5.0, default: 1.3.0)
matrix (0.4.2, default: 0.1.0)
mercenary (0.4.0, 0.3.6)
mutex_m (0.1.1, default: 0.1.0)
openssl (default: 2.1.2)
ostruct (0.5.3, default: 0.1.0)
pathutil (0.16.2)
prime (0.1.2, default: 0.1.0)
psych (4.0.3, default: 3.1.0)
public_suffix (4.0.6)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
rdoc (6.4.0, default: 6.1.0)
reline (0.3.1)
rexml (3.2.5, default: 3.1.9)
rouge (3.27.0)
rss (0.2.9, default: 0.2.7)
rubygems-update (3.3.6)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (4.0.0)
sassc (2.4.0)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
shell (0.8.1, default: 0.7)
singleton (0.1.1)
stringio (3.0.1, default: 0.0.2)
strscan (3.0.1, default: 1.0.0)
sync (default: 0.5.0)
terminal-table (3.0.2, 2.0.0)
thwait (0.2.0, default: 0.1.0)
tracer (0.1.1, default: 0.1.0)
unicode-display_width (2.1.0, 1.8.0)
webrick (1.7.0, default: 1.4.2)
zlib (2.1.1, default: 1.0.0)
chrisrhymes commented 2 years ago

Hi, are you still experiencing this issue? Do you have a link to an example repo that replicates this issue? Thanks.

datallurgy commented 2 years ago

I resolved it by making the following change to _layouts/page.html.

{% if page.toc %}
    {% assign contentsTitle = page.toc_title | default: 'Contents' %}
    <p class="menu-label">{{ contentsTitle }}</p>
    {% include toc.html html=content class='menu-list' h_min=2 h_max=3 %}
{% endif %}

I removed contents_Title=contentsTitle from the include toc.html command because it's not an optional variable for that bit of code and bumped it to it's own bit of html and that fixed my issue.