I followed the standard guide to migrate from Forestry to Tina. All seems to be working, except the correct layout of our website (see attached)… Who can help?
Yes, for continuity purposes I created a forward from www.algorithmaudit.eu to a version (partially) successfully deployed through my personal Github pages. I prefer however to host directly through Tina + Netlify, rather than Github.
Tina + Netlify: If I remove the temporarily forward to Github Pages, the Github repo I referred to in my earlier post is still displayed as the “markdownify” layout;
Github Pages: Some images (e.g., landing page) are visible, but images on others pages not (e.g., subdomain). This is due to the images path: src="/AlgorithmAudit_website/images/X.svg" works, src="/images/X.svg"doesn’t. But hardcoding the images paths to the former structure, isn’t successful according to my most recent git commits. There seems to be happening some path parsing in the deploying phase?
First, getting it working on GitHub Pages… it will help you understand some of the basics of URL resolution. The baseURL needs to match the GitHub Pages project URL. For example:
baseURL = 'https://user.github.io/project/'
As you have noticed, things can break when a site is served from a subdirectory. Some themes support this configuration, some do not. This article describes the challenge, and offers a solution.
After you have it working on GitHub Pages, then work on the migration to Netlify. Start by using the correct baseURL:
For the current workaround on Github Pages, I changed the baseURL to my Github repo: https://www.jfparie.github.io/AlgorithmAudit_website/
I started reading about image render hooks, but don’t fully get it how this would resolve the issue to display all images properly on Github Pages. Seem very arbitrary to my why for some image path stuctures in subdomains /AlgorithmAudit_website/ is added as a prefix, while for others only src="images/X.svg is loaded. E.g., when inspecting the top page image for subdomain ‘about’ the prefix is loaded, while for ‘events’ it is not…
OK, so markdown render hooks are not going to help you with all of the hardcoded img and a elements in all of those content shortcodes.
Typically, when an author hardcodes a URL in a template, they pass it through one of the URL transformation functions: relURL, absURL, relLangURL, or absLangURL. Something like:
Thanks for looking into this. I included in both config.toml files (in the root directory) and in (config >_default): canonifyURLs = true, without direct result.
After merging the new PR, I set up GitHub Pages and linked a custom domain (algorithmaudit.eu) to my GitHub domain. I changed the DNS records accordingly and all seems to work now! Happy to have this alternative for Tina Many many thanks for your help! Without this community I would have been lost in fixing this all myself.