Website generated by Franklin (and hosted on GitHub) is not rendering properly

Hi everyone,

I have a website made with Franklin that looks good locally. Unfortunately, the one that is deployed through gh-pages on GitHub is missing most of the formatting, plus the links to the other parts of the website do not work. This is what it looks like when i use serve() locally:

And this is what it looks like on GitHub Pages:

I’m sure that the problem is some basic issue with the file structure but I can’t figure out what (I’m very new to web hosting on GitHub), especially since the file structure was generated automatically by Franklin.

For reference,

Any help is gratefully appreciated.

The styles (jtd.css) do not load:

I have no experience with Franklin and github hosted web pages, so I can’t tell more.

Thank you. I see. Those resources are there, but not where the computer is looking for it. For example, logo.png is at https://eduardo-zambrano.github.io/equistatlab/assets/logo.png but the computer is looking for it at https://eduardo-zambrano.github.io/assets/logo.png. Same with jtd.css. The machine is looking for it at https://eduardo-zambrano.github.io/css/jtd.css but jtd.css is at https://eduardo-zambrano.github.io/equistatlab/css/jtd.css.

1 Like

In the meantime, you can checkout the gh-pages branch via git and manually edit the appropriate style tag.

1 Like

Thank you. I manually went through the html pages inside gh-pages and changed things like <link rel="stylesheet" href="/css/jtd.css"> to <link rel="stylesheet" href="./css/jtd.css"> in many places. Now the website renders correctly. The remaining question is: what do I need to do so that these manual changes are no longer needed the next time I update the site locally?

1 Like

I think you are missing the prepath argument that is mentioned in the big red box here: Deploying your website

4 Likes

Thank you. Your answer makes sense to me. Having said that, I don’t know how to fix the problem. The url for the site is https://eduardo-zambrano.github.io/equistatlab/, so in my config.md I wrote prepath = "equistatlab", which I think is what I’m supposed to do. Unfortunately, that does not solve the problem, which means I must be writing the information incorrectly in my config.md file. Here is the content of my config.md: https://github.com/eduardo-zambrano/equistatlab/blob/main/config.md.

1 Like

@eduardo-zambrano you’re almost there

bring back the +++ in your config file and you’ll be ok

+++
author = "Eduardo Zambrano"
mintoclevel = 2

# uncomment and adjust the following line if the expected base URL of your website is something like [www.thebase.com/yourproject/]
# please do read the docs on deployment to avoid common issues: https://franklinjl.org/workflow/deploy/#deploying_your_website
prepath = "equistatlab"

# Add here files or directories that should be ignored by Franklin, otherwise
# these files might be copied and, if markdown, processed by Franklin which
# you might not want. Indicate directories by ending the name with a `/`.
# Base files such as LICENSE.md and README.md are ignored by default.
ignore = ["node_modules/"]

# RSS (the website_{title, descr, url} must be defined to get RSS)
generate_rss = true
website_title = "EquiStat Lab"
website_descr = "Inequality Sensitive Treatment Effect Estimation"
website_url   = "https://eduardo-zambrano.github.io/equistatlab/"
+++

<!--
Add here global latex commands to use throughout your pages.
-->
\newcommand{\R}{\mathbb R}
\newcommand{\scal}[1]{\langle #1 \rangle}
2 Likes

Thank you so much for looking into this @tlienart. I copied the text above inside my config.md file to make sure I did not mess anything up, and it still does not work. My response to @oheil above still applies.

1 Like

can you try Update deploy.yml by tlienart · Pull Request #2 · eduardo-zambrano/equistatlab · GitHub please? your changes are not being deployed properly which you can see here GitHub - eduardo-zambrano/equistatlab at gh-pages (e.g. index.html was last updated yesterday while you just made changes to it)

1 Like

Note for onlookers, this is now resolved, it also required small adjustments in the gha deployment file :slight_smile:

4 Likes