Fixed broken links, fixed broken anchors, removed duplicate main.css, fixed newline issue with site's description, fixed guide layout, and fixed slug in the guide's sidebar #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR features lots of bug fixes. Some of these bugs were only present if you browsed your gh-pages version of the site and so they weren't present on chaijs.com. You can see my gh-pages here, http://aaronsofaly.github.io/chai-docs/.
I'll explain each commit.
This commit fixes broken links. Some links didn't have
{{site.github.url}}
, so when you browsed your gh-pages version of the site then the links would be 404.This commit fixes broken anchors.
This commit fixes duplicate main.css references in head.html. You can see the duplicate references on lines 10 and 20.
This commit fixes a newline issue in the site's description. I was only seeing this issue on my gh-pages and not on chaijs.com. Here is the original _config.yml. Because the description used a
|
, the second line of the description was converted to a<br>
. I changed it from a|
to a>
because the>
will convert a newline to a space instead of a<br>
. This Stackoverflow answers explains it pretty well.This commit fixes the sidebar in the guide. This one was tricky. The _config.yml file declares that the layout and body classes should be
"guide"
. However, gh-pages is completely ignoring that instead uses the default layout and does not add a body class. Therefore the guide doesn't have a sidebar on the chaijs.com/guide/ site. My local Jekyll compiles the sidebar just fine but for some reason gh-pages doesn't compile it properly and completely ignores what's in _config.yml. So I have moved what was declared in _config.yml to each of the guide pages.This commit fixes the slugs in the guide's sidebar. The installation guide has a subheading of
Node.js
. When the subheading is parsed by Markdown then you get<h3 id="nodejs">
. However, the guide's sidebar code creates a slug of<a href="#node-js">
. So when you click the link in the sidebar it doesn't work because they don't match. So I updated the slug in the sidebar to preserve the period inNode.js
and then I use a string filter to remove the period from the slug and so then you get<a href="#nodejs">
.There is still an outstanding issue though. Notice the sidebar on the resources page of the guide. There are two links of
Getting Help
andContributing
. However, the page content doesn't have these subheadings and so the sidebar links don't work. We need to change the links in the sidebar to match the actual subheadings in the page content.