-
Notifications
You must be signed in to change notification settings - Fork 712
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
🐛 BUG: Static page with a category named 'functions' (public/functions/index.html) gets discarded #2240
Comments
Experiencing the same problem. The |
Another user ran into this issue today: https://canary.discord.com/channels/595317990191398933/789155108529111069/1050476515017633883 |
We are fixing this problem with: mv docs/functions docs/funcs && sed -i'.bak' 's/href=\"functions/href=\"funcs/g' docs/*.html |
I had to do this: mv dist/functions dist/funcs
find ./dist -type f -name '*.html' \
| xargs sed -i.bak --regexp-extended 's:(href="[^"]+)functions/:\1funcs/:g' to account for deeply nested html files, and Cloudflare, this took too long for me to figure out (I'm not a sed expert), and I shouldn't have to do this anyway. Not happy. 😢 |
This is a relatively old issue now that's impacted numerous users - with the symptoms made worse that there is no output to indicate that the Can't this either:
At the very least, users should be made aware that folders are being ignored. |
Hello, we just stumbled upon this issue while deploying a Storybook v7 build. |
People are still hitting this bug: https://discord.com/channels/595317990191398933/1142480994734178346/1142480994734178346 It used to work quite some time ago, but #2103 introduced this as a breaking change. That PR fixed other things, but this functionality was never revisited as a regression. |
closes: #9681 refs: #9729 ## Description - Updates typedoc to latest version - Adds script to rewrite `/functions` path to `/funcs` to avoid cloudflare/workers-sdk#2240 - includes renaming files, anchor links in html files, and a base64 encoded navigation state object in a js file ### Security Considerations n/a ### Scaling Considerations n/a ### Documentation Considerations n/a ### Testing Considerations CI and manual QA ### Upgrade Considerations n/a
I just created a script that solve this issue. It could be include in your pipeline using the next code: - name: Build Doc
run: |
# Replace with your doc command
pnpm doc
curl -O https://gist.githubusercontent.com/j0nl1/7f9b5210c9e6ecbabe322baa16dcb5db/raw/760de77327bf83671cfb6bd4e64181299ba26113/typedoc-fix-cf.mjs
# Replace docs for your folder path it uses the folder where was downloaded like root path (its a mandatory provide a path)
node typedoc-fix-cf.mjs docs |
Cloudflare treats the "functions" dir as a special directory, so files in this dir will not be deployed. This is now fixed by changing that directory to "funcs" instead. See cloudflare/workers-sdk#2240
What version of
Wrangler
are you using?0.0.0
What operating system are you using?
Windows
Describe the Bug
I have a tutorials website made with HUGO on CF Pages and the public folder of the site is hosted on GitHub. Since the general release of CF functions a couple of days ago (11/15/22) the section of my site named ‘functions’, vanished off, this is, example.com/functions/ returns a 404 despite the page exists on the repository inside the public/functions folder. It seems that CF Pages discards that section because of its name. Maybe, this behaviour could be addresed cheking if there is an index.html inside the functions folder
As I wouldn’t like to change the name of the section of my site I'm wondering if there’s any way to solve this issue that could potentially affect any page on CF Pages with a 'functions' section.
The text was updated successfully, but these errors were encountered: