ionide / Fornax

Scriptable static site generator using type safe F# DSL to define page templates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adjust path to better develop fornax project for gh-pages.

Freymaurer opened this issue · comments

Is your feature request related to a problem? Please describe.
I am currently working on a fornax project to build gh-pages as docs for other repositories. The default gh-pages link is created somewhat like the following

https://{user_name}.github.io/{repo_name}/

After which the fornax structure is appended. This leads to the problem, that relative links, which work fine in dev (exmaple: /content/content.md) will not resolve to the correct page in gh-pages (/{repo_name}/content/content.md).

Describe the solution you'd like
Maybe give fornax watch not only an option to user an alternative port, but also to adjust the dev url.

I don't think it can/should be the responsibility of the cli tool to keep track of this?

I think it might make more sense to let loaders/generators handle URL structures like this. You could, for instance, load the prepended URL structure via a global loader and retrieve it as required in your generators based on some arbitrary dev/prod flag.

Yeah i figured out a way how to manage this. I use this syntax to distinguish the two cases.

#if WATCH
// something something during development
#else
// something something PLUS give the gh pages path as additional parameter