Hi Friends I see the following error while using t...
# kobweb
s
Hi Friends I see the following error while using the
kobwebExport
gradle task 👇 How do I resolve this?
I was hoping that
@Page("{...path?}")
would take care of it
d
Update to latest Kobweb
We just fixed that in the latest release
s
Oh okay, thanks! I missed it.
Crazy is that it was broken for like two years and you and someone else surface it with weeks of each other 🙂
s
LOL 😂 I just got done with my project and was planning to publish it, hence started looking into these commands, to set up a CI/CD pipeline via GitHub actions.
Following this guide, I am able to export the kobweb site successfully, but the generated artifact does not contain any html file(s), hence I'm seeing the 404 page as shown below. What do I need to verify to make sure that the generated artifact also contains the required html/css file(s) for the
static
web app to run?
d
Oh that guide doesn't factor dynamic routes
However!
It's solvable, one sec
But you can also create a page with the route "404" and just have it call
IndexPage
GitHub Pages tries to open a page called 404.html if the URL can't be found
s
But you can also create a page with the route "404" and just have it call
IndexPage
This sounds nice! Let me try...
d
Did it work??
s
Apologies, I got distracted by some work. But yes, it did work 👍🏼👍🏼 thanks David!
d
Awesome. I've grown to absolutely love GHP
🌟 1
s
If I follow this guide and change my basePath, the web app stops working on my local machine (basically it's not able to find any resources anymore) Is there a way to set difference basePath values for DEV and PROD environments?
Nevermind, I ended up doing this:
Copy code
- name: Push generated app to website branch
        uses: s0/git-publish-subdir-action@develop
        env:
          REPO: self
          BRANCH: website
          FOLDER: ./site/.kobweb/site
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
And used netlify to observe the
website
branch and auto-deploy instead. It's working perfectly fine I know, I could directly use Netlify's GH action as well. I'd probably do that only for easier code maintenance.
d
Can you give more detail about resources not being found? They should be.