Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

hugo-theme-bleak wont work on a subdirectory in webserver #21

Open
aravindhsampath opened this issue Apr 4, 2017 · 7 comments
Open

Comments

@aravindhsampath
Copy link

First of all, thanks for building this theme. I absolutely love it.

I tried to setup a personal blog with hugo and theme it with huge-theme-bleak, and landed into this problem. The issue is reproducible here.
Blog link: https://aravindh.net/blog/
^ leads to a page that shows cards of my two trial posts.

However, when I click on either of the posts it wouldnt load. Browser console doesnt report any errors either.

Weirdly, if I try the urls for the posts directly manually, it seems to work as perfectly. Something is broken with establishing that link from posts page to the actual post.

direct link to post: https://aravindh.net/blog/post/great-post.html

I posted the entire hugo directory into a git repo here: https://github.com/aravindhsampath/hugo_blog
PS: I was trying all sorts of paramm fields in config.toml (UglyURLs, CanonifyURLS, relativeURLs) in hope that they would fix the problem, but they made no difference.
Any help figuring this is greatly appreciated. Thanks in advance.

@Lusitaniae
Copy link
Contributor

Hi @aravindhsampath, I've tried 3 browsers here and everything seems to work fine.

@aravindhsampath
Copy link
Author

Hi @Lusitaniae , between my post and now, I tried to add tags to every post I made, and it seems to magically making them work as intended.
If I create a new post and not have tags = ["tag1"] in its header, it doesn't work...
I dont remember reading anywhere in the repo README about tags.

Thanks for the response.

@curtiscde
Copy link
Contributor

I'm currently working on a fix for issues with the static files loading under a sub-directory:

https://github.com/CurtTimson/hugo-theme-bleak

This is caused by the static files having references such as /js/main.js.

There's an example of the version I've created in use here:

https://curttimson.github.io/curtis-timson/

@curtiscde
Copy link
Contributor

I've opened a new issue, #23, as the fix I've worked on is only for loading static files, and not general issues with loading the application in a sub-directory.

@Zenithar
Copy link
Owner

Zenithar commented Apr 7, 2017

Ok PR merged, check and close this issue.
Thanks for contribution.

@aravindhsampath
Copy link
Author

@CurtTimson Thanks for the fix.
I pulled your changes in. It does work within the sub directory now. However, I'm still seeing a weird situation where links(only those with my domain name in it) are tagged with specific classes, while other links on the same post works just fine...
<a href="https://aravindh.net" class="js-ajax-link js-show-index">my website - aravindh.net</a>
You can see the issue in my post here : https://aravindh.net/blog/post/first-post/
The same happens with the logo image I added. Asking here because it leads to an empty very similar to the original issue..

Any suggestions how I can make that class="js-ajax-link js-show-index" go away?

@NicoHood
Copy link
Contributor

NicoHood commented May 20, 2018

For me my page is only loading forever and no blog posts are shown. Locally everything works fine. Any ideas how to solve this?

Edit:
It seems there are still some references missing in index.html:

    <link rel="preload" href="/js/main.js" as="script" />
    <link rel="preload" href="/css/main.css" as="style" />

Edit2:
I found the reason:
a55a4df#r29052515

Edit3:
Tried to fix it partial: #47

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

5 participants