Hi, @thellimist. Thank you for sharing that link to how you resolved the issue. It looks like you are using a worker to transform the URLs in the HTML on the fly as the page is requested. This changes the references to the assets in the HTML to match the pattern used in the URL.
I think you could have also solved this by linking to any assets in the HTML by changing absolute URLs to relative URLs. Meaning instead of references like this:
<link rel="stylesheet" href="/example.css">
To this instead:
<link rel="stylesheet" href="example.css">
<link rel="stylesheet" href="./example.css">
The point is: there is a way to make the links work regardless of how they are proxied to.
Note, I’m not an expert with Ghost. I can tell you what needs to change about the HTML but I won’t necessarily know how to get Ghost to make that change. Whatever change is required should be possible, I just don’t know Ghost well enough to know what the change in Ghost needs to be, I’ll only be able to say what need to change in the page itself.
Also, I’m only guessing about the solution above because I don’t actually know what problem you are experiencing.
I keep asking you to see the real URLs and the actual site HTML. I need this information to answer your questions. You said “CSS was not working correctly for the blog” but the details of what wasn’t working matter and a required for me to answer. I still don’t have the specifics.
If you want to use examples instead of real pages and links, more details would help me to answer. Such an example would ideally include:
- A working URL
- A not working URL
- The section of HTML from the page which works with the first URL and not the second URL