
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
nuxt-github-pages
Advanced tools
Nuxt module to fix trailing slash issues when deploying to GitHub Pages. This module ensures your static Nuxt site works correctly with GitHub Pages' file resolution behavior.
When deploying a Nuxt 3 static site to GitHub Pages:
/docs/page works fine initially/docs/page/ returns a 404 error/docs/page.html but GitHub Pages expects /docs/page/index.htmlThis module automatically creates duplicate HTML files during the build process. For every /path/index.html, it creates a /path.html file, ensuring URLs work with or without trailing slashes.
# npm
npm install nuxt-github-pages
# pnpm
pnpm add nuxt-github-pages
# yarn
yarn add nuxt-github-pages
# bun
bun add nuxt-github-pages
Add nuxt-github-pages to the modules section of nuxt.config.ts:
export default defineNuxtConfig({
modules: ['nuxt-github-pages']
})
That's it! The module will automatically run during nuxt generate.
You can configure the module by adding options:
export default defineNuxtConfig({
modules: ['nuxt-github-pages'],
githubPages: {
// Enable or disable the module (default: true)
enabled: true,
// Directories to check for output files (default: ['dist', '.output/public'])
outputDirs: ['dist', '.output/public'],
// Show verbose logging (default: true)
verbose: true
}
})
enabledbooleantrueoutputDirsstring[]['dist', '.output/public']verbosebooleantruenuxt generate build process, this module hooks into the prerender:done eventindex.html filesindex.html found at /path/to/page/index.html, it creates a duplicate at /path/to/page.html/path/to/page and /path/to/page/ resolve correctly on GitHub PagesGiven this generated structure:
dist/
βββ index.html
βββ about/
β βββ index.html
βββ docs/
β βββ index.html
β βββ getting-started/
β βββ index.html
The module creates these additional files:
dist/
βββ about.html β Created
βββ docs.html β Created
βββ docs/
β βββ getting-started.html β Created
After building with nuxt generate, deploy the output directory to GitHub Pages as usual:
# Build your site
pnpm run generate
# Deploy to GitHub Pages (example using gh-pages)
npx gh-pages -d dist
.html filesWhile you could use a custom post-build script, this module:
Netlify-specific _redirects only work on Netlify. This module works everywhere.
These require server configuration access, which you don't have with GitHub Pages.
nuxt generate (not nuxt build)nitro.preset is set to 'static' (this is the default for nuxt generate)outputDirsverbose: true to see detailed loggingIf you use a custom output directory, add it to the configuration:
export default defineNuxtConfig({
modules: ['nuxt-github-pages'],
githubPages: {
outputDirs: ['my-custom-dist', 'dist', '.output/public']
}
})
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'feat: add amazing feature')git push origin feature/amazing-feature)# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Run Vitest
pnpm run test
pnpm run test:watch
# Release new version
pnpm run release
See NOTICE.md for additional copyright and license information.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
This module was created to solve the long-standing trailing slash issue when deploying Nuxt sites to GitHub Pages.
Created by MITRE for the open source community.
FAQs
Nuxt module to fix trailing slash issues for GitHub Pages deployments
The npm package nuxt-github-pages receives a total of 7 weekly downloads. As such, nuxt-github-pages popularity was classified as not popular.
We found that nuxt-github-pages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.