Closed blakelee closed 2 years ago
Thanks for giving Kobweb a try! And for filling this issue.
So if I understand, your repro steps are,
And it isn't picking up the new page.
I'll try to repro that today.
What OS are you using? And what version of the Kobweb libraries are you using? (You can find that in gradle/libs.versions.toml)
If you need an easy workaround for now, you should be able to delete your build directory before re-exporting.
On Tue, Mar 22, 2022, 8:32 AM Blake @.***> wrote:
I followed the directions for setting up a static page for github pages here. https://bitspittle.dev/blog/2022/staticdeploy#kobweb-to-the-rescue
I was able to generate the initial files after trying the instructions maybe 5 or so times. I then created a new page that works when I run kobweb run but when I try and generate the files with kobweb export --layout static no new files get made in the /docs folder.
This is happening with Kobweb CLI 0.9.7
— Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONAQ5PAQK6EUJO4NDBYLVBHRXPANCNFSM5RLIXU2Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Following my own steps, I wasn't able to reproduce your issue. I might be missing something that you're doing.
(I'm using Linux, also with 0.9.7 CLI, and libs version 0.9.10)
One question though - did you stop kobweb run
before you did the kobweb export
? Otherwise, it's possible those two commands are interfering with each other?
Yup, those are the repro steps. I'm on Mac 12.3 and my gradle/libs.versions.toml
shows kobweb = "0.9.10"
If I stop the Kobweb server and then run the export the issue persists.
I just tried cloning my project and then running the command again and it seemed to generate the files. I'm wondering if there is some cache that is not being updated?
Actually, playing around with this a bit more and I think I got it to happen. Investigating...
It seems what may be important, not sure yet, is
docs
)kobweb export
while kobweb run
is still in progress.I just tried cloning my project and then running the command again and it seemed to generate the files. I'm wondering if there is some cache that is not being updated?
One way or another, I'm jumping into Gradle-infested waters today.
I did find a reference to ".kobweb/site" hardcoded in my logic, from before I introduced the ability to configure it, which is causing my logic to not delete the directory before starting the export. I think this alone may fix it.
If you run into trouble again, can you try just deleting your docs/
folder instead, and rerunning the export? I think that will fix it.
OK! I think the issue was indeed my stale hardcoded reference to ".kobweb/site"
I'll try to push out a new version of the Kobweb libraries in the next few days which will have a fix for this (0.9.11
). Until then, my apologies - please just delete the docs/
folder each time before you rerun kobweb export
Thanks again for reporting.
One interesting thing when I was trying to follow the initial directions is that I couldn't get the docs/
folder to generate at all. It took several attempts of deleting project and starting from scratch where finally at the end it would export properly and create the docs/
folder. I will give it a shot when it happens again. Thanks for your hard work.
Yikes, I never heard of anything like that. I'll keep an eye out for it. Feel free to open a new issue if you see that happening again especially after 0.9.11
goes out.
Heads up that 0.9.11
went out today, in case you wanted to upgrade your version and see if things work more consistently after that. (We can reopen this issue if not!)
I also changed the CLI binary to prevent users from doing an export while a server is already running, just in case that was related to these issues (even if not, I had wanted to do that for a while anyway). Latest CLI is now 0.9.8
.
I followed the directions for setting up a static page for github pages here. https://bitspittle.dev/blog/2022/staticdeploy#kobweb-to-the-rescue
I was able to generate the initial files after trying the instructions maybe 5 or so times. I then created a new page that works when I run
kobweb run
but when I try and generate the files withkobweb export --layout static
no new files get made in the/docs
folder.This is happening with Kobweb CLI 0.9.7 on Mac