Skip to content

create anchors to each subsection#79

Merged
sappelhoff merged 5 commits intobids-standard:gh-pagesfrom
robertoostenveld:issue73
Jan 15, 2020
Merged

create anchors to each subsection#79
sappelhoff merged 5 commits intobids-standard:gh-pagesfrom
robertoostenveld:issue73

Conversation

@robertoostenveld
Copy link
Copy Markdown
Collaborator

This adds some javascript code to address #73

Each section (e.g. h1, h2, h3, etc.) now gets an anchor, using https://www.bryanbraun.com/anchorjs.

@robertoostenveld
Copy link
Copy Markdown
Collaborator Author

robertoostenveld commented Jan 8, 2020

Screenshot 2020-01-08 at 12 33 57

Here is an example. Note however that the latest change (enabling the anchor also for h1) somehow also enables it for the website title and subtitle... That is something to address.

This is due to the header and subheader being specified in default.html as

    <h1 class="project-name">{{ site.title }}</h1>
    <h2 class="project-tagline">{{ site.description }}</h2>

… Only show them when hovering over the element, or on on a touch screen.
@robertoostenveld
Copy link
Copy Markdown
Collaborator Author

Since I opened this PR, I propose that someone else approves of it and merges it for release on the website.

Copy link
Copy Markdown
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it on my fork, and it works nicely. Thanks @robertoostenveld

One question on how you currently test on your fork:

I just merged your PR with my master to have it rendered on http://stefanappelhoff.com/bids-website/

Now I'll have to revert the merge on my fork to go back to master.

Also this is not ideal if I want to review several PRs.

How are you doing it?

@sappelhoff sappelhoff merged commit bf2fac2 into bids-standard:gh-pages Jan 15, 2020
@robertoostenveld
Copy link
Copy Markdown
Collaborator Author

robertoostenveld commented Jan 15, 2020

How are you doing it?

I am doing it basically the same: I also have a gh-pages and a master branch on http://github.com/robertoostenveld/bids-website, where the master is the one I am rendering on https://robertoostenveld.github.io/bids-website. My idea right now (and far from ideal) was that I would try stuff in the master and revert (or delete and make a new master) when needed, just like you.

Note that so far I did most testing on my local laptop, which I already knew how to do (since the FT website is also based on Jekyll).

We definitely need a "neutral" place where PRs and/or branches can be rendered.

@robertoostenveld robertoostenveld deleted the issue73 branch May 7, 2021 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants