goodrobots / devFrame

devFrame is a 3D printable, Open Source quadcopter and rover (coming soon) frame design. Supports 300-500 class quadcopter frames in Stretch X, Hybrid X and H configurations, as well as skid steer rovers (coming soon).
Other
7 stars 6 forks source link

Absolute URLs hardcoded into markup #109

Open fnoop opened 4 years ago

fnoop commented 4 years ago

When trying to load the compiled site through nginx, it fails because links/images/references are all hardcoded with '/devFrame' prefix. URLs should ideally be relative, so the site can be hosted anywhere.

Screenshot 2020-04-24 at 10 01 05
cglusky commented 4 years ago

not hardcoded. pulls from config.yaml. via tokens inserted into liquid template syntax.

[build section]({{ site.baseurl }}/docs/build-intro/)

from config.yaml...

# Site 

locale: "en-US"
title: "devFrame docs"
description: >- # this means to ignore newlines 
"devFrame is an Open Source quadcopter and rover frame design." 
url: "https://goodrobots.github.io"
baseurl: "/devFrame"
stlurl: "/blob/master/stl/"
fnoop commented 4 years ago

Ah! Cool ok, I'll look into that, either making it relative or perhaps adding a custom config.yaml for maverick. Is there a particular reason you've moved it to /devFrame rather than . or /?

cglusky commented 4 years ago

did not want to hog root as it probably should be some sort of index to goodrobots projects. eventually. my understanding is to host from root of github org you have to create a separate repo as well.

cglusky commented 4 years ago

likely be best to run a custom config yaml in case someone does want to create a PR from maverick devframe docs. the baseurl property really helps for local dev so you can easily mirror githib setups.