Fornax icon indicating copy to clipboard operation
Fornax copied to clipboard

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

Open Freymaurer opened this issue 2 years ago • 2 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.

Freymaurer avatar Jun 06 '22 18:06 Freymaurer

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.

drewknab avatar Oct 18 '22 16:10 drewknab

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

Freymaurer avatar Oct 19 '22 05:10 Freymaurer