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

feat: add github-pages preset #1133

Merged
merged 7 commits into from
Apr 15, 2023
Merged

feat: add github-pages preset #1133

merged 7 commits into from
Apr 15, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Apr 12, 2023

πŸ”— Linked issue

resolves #798

nuxt/nuxt#12480
nuxt/nuxt#12570

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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 adds a basic GitHub Pages preset. It creates a .nojekyll file and by default uses https://github.com/tschaub/gh-pages as deploy command.

βœ… TODO

  • docs (including GH Actions workflow?)
  • rethinking deploy command
  • base URL support - this may need to be documentation

πŸ“ Checklist

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

@danielroe danielroe added the enhancement New feature or request label Apr 12, 2023
@danielroe danielroe self-assigned this Apr 12, 2023
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #1133 (2a4536e) into main (a45623d) will decrease coverage by 0.03%.
The diff coverage is 60.00%.

❗ Current head 2a4536e differs from pull request most recent head e1c2829. Consider uploading reports for the commit e1c2829 to get more accurate results

@@            Coverage Diff             @@
##             main    #1133      +/-   ##
==========================================
- Coverage   67.92%   67.89%   -0.03%     
==========================================
  Files          65       66       +1     
  Lines        6406     6426      +20     
  Branches      713      715       +2     
==========================================
+ Hits         4351     4363      +12     
- Misses       2041     2049       +8     
  Partials       14       14              
Impacted Files Coverage Ξ”
src/presets/github-pages.ts 55.55% <55.55%> (ΓΈ)
src/presets/index.ts 100.00% <100.00%> (ΓΈ)
src/presets/static.ts 100.00% <100.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@nuxt-studio
Copy link
Contributor

nuxt-studio bot commented Apr 12, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
nitro Edit on Studio β†—οΈŽ View Live Preview e1c2829

@danielroe danielroe requested a review from pi0 April 12, 2023 20:26
@danielroe danielroe marked this pull request as ready for review April 12, 2023 20:26
@danielroe danielroe marked this pull request as draft April 12, 2023 20:29
@danielroe danielroe marked this pull request as ready for review April 13, 2023 08:55
@@ -8,6 +8,7 @@ export const _static = defineNitroPreset({
},
prerender: {
crawlLinks: true,
routes: ["/404.html"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only makes sense for github i guess for default behavior (not sure what other static providers respect 404.html as fallback)

@pi0 pi0 merged commit e656948 into main Apr 15, 2023
@pi0 pi0 deleted the feat/github-pages branch April 15, 2023 13:45
@pi0 pi0 mentioned this pull request Apr 28, 2023
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.

GitHub Pages preset
2 participants