#is it possible to render html from public folder?
12 messages · Page 1 of 1 (latest)
Open a New Issue
https://github.com/withastro/astro/issues/new/choose
As a quick work-around, you maybe able to place the .html files in src/pages/. Those should get copied to your final build output.
Yes, but then I should redo the internal links. But I'll give it a try, thanks!
You shouldn't need to I don't think? For example src/pages/bread/index.html and public/bread/index.html should be equivalent I think.
I've achieved exactly what you describe, perhaps my repo can inspire your solution.
I made an EmbedLayout which extends my base layout. This way I still have my main site navigation around the embedded page. https://github.com/tvandinther/mioi/blob/master/src/layouts/EmbedLayout.astro
Then I placed my original webpages into folders in public. E.g. public/legacy_pages/index.html
Finally I made pages which used the embed layout for the intended access point of the legacy pages. https://github.com/tvandinther/mioi/blob/master/src/pages/legacy/farmvalue.astro
Note that the folder in public has a different path to the pages in src It's possible still to navigate to the legacy pages directly, but the main site navigation keeps you within the base layout with the navigation.
I'll take a look, thanks!
the problem is that index.html uses main.css, and this can't live directly innthe pages folder. I should rename it and Inhave thousands of files...
If you have public/main.css you can refer to that file from any HTML file whether it is in public/ or src/pages/:
<link rel="stylesheet" href="/main.css">
thanks, i'll try it too