Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Question: I want to have my H2s not be folded by default #1

Open
jdsimcoe opened this issue Oct 26, 2016 · 4 comments
Open

Question: I want to have my H2s not be folded by default #1

jdsimcoe opened this issue Oct 26, 2016 · 4 comments

Comments

@jdsimcoe
Copy link

Loving node-slate but I want my H2s not to collapse and expand by default, only H3s. How would I go about this?

@sibartlett
Copy link
Contributor

sibartlett commented Oct 27, 2016

I think you'd need to modify source/javascripts/app/_toc.js, but I am not sure exactly how. I realize this is not very helpful 😞

@MikeRalphson
Copy link

MikeRalphson commented Oct 27, 2016

@jdsimcoe might be worth asking in Ruby Slate, as this applies to all versions of Slate using tocify? I had a quick look at the tocify website, but I couldn't see any way to keep the H2s in the TOC but all expanded by default - if that's what you meant?

If you only want H1s and H3s in the TOC you can change source/javascripts/app/_toc.js to have

  var makeToc = function() {
    global.toc = $("#toc").tocify({
      selectors: 'h1, h3',

@jdsimcoe
Copy link
Author

@MikeRalphson Yeah I want the H2s in there but everything (except expanded except the H3s)

@jdsimcoe
Copy link
Author

Thanks @sibartlett, I'll look into it.

MadMed677 pushed a commit to MadMed677/checkout-js-docs that referenced this issue May 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants