Skip to content
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

fix(prerender): allow disabling html sub-folders #1676

Merged
merged 7 commits into from
Aug 30, 2023
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Aug 30, 2023

πŸ”— Linked issue

Related: #1394, #607

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR allows disabling prerendering in subfolders.

It also includes a potential fix for cloudflare pages/vercel presets, which I need to test. (Opening PR in the interim to get feedback on the API/implementation.)

I think safer to merge this first and treat cf/vercel preset issues separately.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added the enhancement New feature or request label Aug 30, 2023
@danielroe danielroe self-assigned this Aug 30, 2023
@danielroe danielroe marked this pull request as draft August 30, 2023 10:35
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #1676 (f54a0d0) into main (f126cbf) will increase coverage by 0.02%.
The diff coverage is 92.85%.

@@            Coverage Diff             @@
##             main    #1676      +/-   ##
==========================================
+ Coverage   77.78%   77.80%   +0.02%     
==========================================
  Files          76       76              
  Lines        7827     7839      +12     
  Branches      804      805       +1     
==========================================
+ Hits         6088     6099      +11     
- Misses       1737     1738       +1     
  Partials        2        2              
Files Changed Coverage Ξ”
src/prerender.ts 85.94% <80.00%> (-0.11%) ⬇️
src/options.ts 97.00% <100.00%> (+0.01%) ⬆️
src/types/nitro.ts 100.00% <100.00%> (ΓΈ)

@pi0 pi0 changed the title feat: allow disabling rendering HTML in subfolders fix(prerender): allow disabling html sub-folders Aug 30, 2023
@pi0 pi0 mentioned this pull request Aug 30, 2023
1 task
src/prerender.ts Outdated Show resolved Hide resolved
@danielroe danielroe marked this pull request as ready for review August 30, 2023 10:52
@pi0
Copy link
Member

pi0 commented Aug 30, 2023

@danielroe I think we can move forward to test on edge directly and revert if any issues before patch release πŸ‘πŸΌ

@pi0 pi0 merged commit 83e980b into main Aug 30, 2023
7 checks passed
@pi0 pi0 deleted the feat/prerender-index branch August 30, 2023 15:54
Copy link
Collaborator

atinux commented Sep 8, 2023

FYI: 11a2412

Would be nice to think of updating the docs when adding new options πŸ‘€

@pi0
Copy link
Member

pi0 commented Sep 8, 2023

Thanks! And yes we should automate it sometime soon similar to nuxt options...

Also after testing, this option shall be automatically enabled for providers. That's why merged as fix rather than feat.

Copy link
Collaborator

atinux commented Sep 8, 2023

I don't think we need to automate this as we can just better explain the configuration and it does not take much time to add in docs.

It's just a process we need to get used to.

@pi0
Copy link
Member

pi0 commented Sep 8, 2023

Without automation it is impossible to not forget and keep docs in sync (with version as well). I plan to do this for the upcming h3 docs as well...

@Hebilicious
Copy link
Contributor

Hebilicious commented Sep 8, 2023

Without automation it is impossible to not forget and keep docs in sync (with version as well). I plan to do this for the upcming h3 docs as well...

Even if we list the existing options in the docs, we should write JSDOC comments to explain what they do (so that its reflected in TS), a lot of the options are not documented anywhere, or just in their implementation PR currently.

@pi0
Copy link
Member

pi0 commented Sep 8, 2023

@Hebilicious yes true. that's the plan to use jsdocs (similar to nuxt) and automatically extract them to the docs kept in sync :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants