tomjoht / documentation-theme-jekyll

A Jekyll-based theme designed for documentation and help systems. See the link for detailed instructions on setting up and configuring everything.

Home Page:http://idratherbewriting.com/documentation-theme-jekyll/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accessing a page of the form /abc/def that does not exist results in buggy behaviour

dcol97 opened this issue · comments

For example, visiting the URL https://idratherbewriting.com/documentation-theme-jekyll/abc/def or https://idratherbewriting.com/documentation-theme-jekyll/news/def results in the CSS not properly displaying, then clicking on other links (such as the home button) results in the a redirect to .../abc/index.html (for example). Ideally, the website .../abc/def would display the 404 screen as it does when you visit say https://idratherbewriting.com/documentation-theme-jekyll/neghfhgfjhfgo.

I don't reproduce this behavior. Clicking either of the two sample URLs at the beginning of the report gets me a Not Found page with the usual I'd Rather Be Writing logo, top bar, Disqus box, and recent blog posts at the bottom. The page looks the same to me as what I get when I visit the third ("negh...") link in the report.

Maybe if you offered more detail about what you mean by "the CSS not properly displaying"?

Thank you for your feedback. See the attached screenshots below:

Screenshot_2019-06-26_12-06-53
Screenshot_2019-06-26_12-06-39
Screenshot_2019-06-26_12-06-30
The simplest example is accessing https://idratherbewriting.com/documentation-theme-jekyll/abc versus accessing https://idratherbewriting.com/documentation-theme-jekyll/abc/. Note the first two screenshots - links that are clicked have /abc/ appended to what is usually the URL. I suspect something is going on with the removal of slashes in the routing and the lack of support for nested directories.

On my note regarding CSS, I was referring to the fact that the topnav colour is black (as opposed to the usual blue), and that the search bar looks misaligned. Javascript doesn't seem to be properly working either, e.g the side nav bar just displays hyperlinks.

I think this is also a problem for pages which do exist but that don't live at the top level. In _includes/head.html all the stylesheets are accessed with relative paths. This should be changed to use absolute paths. Likewise, the sidebar paths are treated as relative (going so far as stripping out the leading slash) so they won't work from subdirectories.