Skip to content

proposed fix for #147#163

Open
hoosierEE wants to merge 2 commits into
lustre-labs:mainfrom
hoosierEE:main
Open

proposed fix for #147#163
hoosierEE wants to merge 2 commits into
lustre-labs:mainfrom
hoosierEE:main

Conversation

@hoosierEE

@hoosierEE hoosierEE commented May 6, 2026

Copy link
Copy Markdown

This change does 2 things:

  1. adds a url_prefix option in the toml file so you can specify a prefix for the generated .js file to be used index.html
  2. makes the default prefix "" instead of "/" so that your webserver can be in a different directory. This addresses issue Add configuration option to use relative links #147

@hoosierEE

Copy link
Copy Markdown
Author

Add this to your gleam.toml file to restore the original behavior:

[tools.lustre.html]
url_prefix = "/"

@hayleigh-dot-dev

Copy link
Copy Markdown
Contributor

Hey, thanks for exploring this! There's a bit more to consider in a way that makes this tricky because we also handle static assets.

Assets get placed in the top-level assets/ directory and then are served during development, so a file like assets/img/wibble.png would be available at /img/wibble.png.

If we have a configurable base url for builds, how will that affect the source code that needs to reference these assets?

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

Successfully merging this pull request may close these issues.

2 participants