Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Freymaurer opened this issue Jun 6, 2022 · 2 comments
Open

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

Freymaurer opened this issue Jun 6, 2022 · 2 comments

Comments

@Freymaurer
Copy link
Contributor

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.

@drewknab
Copy link
Contributor

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.

@Freymaurer
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants