impossible to test pages deployment in forks
short version
current value of baseurl
in _config.yml
generates all hrefs and uris as /Engagement/websites/people-of-gnome/<asset>
but forks typically publish the static content to the /people-of-gnome
. this essentially inhibits proper testing of pages in forks
if we refer the deployment of @Asmit2952 's fork: https://asmit2952.pages.gitlab.gnome.org (at time of writing) there are no styles because the href to the CSS stylesheets are different from their actual locations
all the deets
right now
- after 87f90fc0 (MR !82 (merged)) Jekyll generates all hrefs/uris using the
relative_url
liquid filter-
relative_url
generates uris relative to/
based on the value ofbaseurl
- assuming baseurl =
/people-of-gnome
-
{{ "/assets/img/hello.png" | relative_url }}
➡ /people-of-gnome/assets/img/hello.png
-
- current value in _config.yml is `/Engagement/websites/people-of-gnome/
-
the before
- before this commit we used
prepend: site.url
to generate the hrefs/uris-
at b8e45062
site.url
was defined ashttps://teams.pages.gitlab.gnome.org/Engagement/websites/people-of-gnome
(ref) -
so the entire url was prepended to
/assets/img/hello.png
-
when
jekyll serve
is run with the--host=localhost
flag (as in run.sh#L19)site.url
's value is overrwritten- so there are no issues with locally running
jekyll serve
- so there are no issues with locally running
-
but in forks, when
jekyll build
is run, the generated hrefs/uris ALWAYS pointed to upstream deploymente.g https://arijitk.pages.gitlab.gnome.org/people-of-gnome
while this shows styling and loads resources, changes to styles in the fork will not reflect here (until merge)
-
now is better... but...
-
after !82 (merged) this is partially resolved. i.e. the first part.
e.g https://asmit2952.pages.gitlab.gnome.org/people-of-gnome/
now there's no problem of domain/subdomain since we're starting at
/
; but the path is wrong
what resolves it?
i did a hacky patch and now the deployment of my fork at https://kevinnls.pages.gitlab.gnome.org/people-of-gnome/ is all right
basically, the value of baseurl
needs to change for each fork.