HubPress / hubpress.io

A web application to build your blog on GitHub
MIT License
2.81k stars 2.63k forks source link

Add "CNAME" repository support rather than setting it through the HubPress interface #431

Open Alxandr opened 8 years ago

Alxandr commented 8 years ago

The new github support for custom domains (I just set a "custom domain" in the settings) makes it so that when I go to https://alxandr.github.io/alxandr.me it redirects me to alxandr.me (which is what I want generally). However, if I go to /hubpress, it tries to load alxandr.me/alxandr.me/themes/casper/theme.json which does not exist (it adds the repo name after the domain name).

iacchus commented 8 years ago

Customs domains can make you use http://yourdomain.me to access your blog (if you setup everything correctly). If you want to access you admin area you can use http://yourdomain.me/hubpress. BUT, the downpoint is that currently you cannot access it via https (as far as I know) because of the SSL trust.

Alxandr commented 8 years ago

Yeah, that was not the issue at all here. There is a bug in the hubpress code that loads content files. I'd love to debug to show you exactly where, but debugging minified JS is not fun :-/. Anyways, the problem is that when hubpress is not configured with CNAME (there doesn't need to be CNAME files with github anymore), it tries to load theme.json using /<REPO_NAME>/themes/<THEME_NAME>/theme.json instead of using a relative to current directory path. Everything else loads correctly (at least up to that point).

jaredmorgs commented 7 years ago

The action items from this issue appear to be:

anthonny commented 7 years ago

It is because HubPress does not support yet custom domain defined in the settings of the repository. HubPress only work with the CNAME file which is create when you set the domain in the settings page of the HubPress administration.