docusaurus-amplify-fix

Copy generated HTML files to trailing-slash friendly index.html paths in Docusaurus builds on AWS Amplify.

11|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/Takazudo/claude-resources --skill docusaurus-amplify-fix
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docusaurus-amplify-fix
Source: https://github.com/Takazudo/claude-resources/tree/main/skills/docusaurus-amplify-fix
Command: npx skills add https://github.com/Takazudo/claude-resources --skill docusaurus-amplify-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Docusaurus sites deployed on AWS Amplify can return 404 errors for pages accessed with trailing slashes. This skill provides a reliable workaround by generating trailing-slash-compatible index.html copies during build and adjusting the deployment workflow.

Core Features & Use Cases

  • Detects the Docusaurus root by locating docusaurus.config.* in the project.
  • Adds a script to copy .html pages into trailing-slash friendly index.html files.
  • Updates amplify.yml build commands to run the fix after building the site.

Quick Start

Run the fix script after your Docusaurus build to ensure both /docs/page.html and /docs/page/ resolve correctly.

Frequently Asked Questions about docusaurus-amplify-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Docusaurus site return 404 errors on AWS Amplify when accessing pages with trailing slashes?▼

Docusaurus sites using trailingSlash false on AWS Amplify return 404s because Amplify expects directory-based index.html files. The skill solves this by copying generated HTML files into trailing-slash friendly index.html paths during the build process.

How do I fix trailing-slash 404 issues in a Docusaurus deployment on Amplify?▼

Run a build script that detects the Docusaurus root by locating docusaurus.config.*, copies .html pages into trailing-slash compatible index.html files, and update amplify.yml to execute the script automatically after each build.

What's the best way to configure AWS Amplify build settings for a Docusaurus site with trailingSlash false?▼

Update amplify.yml to run a post-build script that generates trailing-slash friendly index.html copies of your pages, ensuring both /docs/page.html and /docs/page/ resolve without 404 errors on Amplify hosting.

Does this trailing-slash fix work with any Docusaurus project deployed on AWS Amplify?▼

It works with Docusaurus projects using trailingSlash false and deployed on AWS Amplify hosting. The script automatically detects the Docusaurus root by locating docusaurus.config.* files within the project structure.

Can I automate the trailing-slash index.html fix in my Amplify deployment pipeline?▼

Yes, you update amplify.yml build commands to run the fix script after building the site. This automates copying .html pages into trailing-slash friendly index.html files during every deployment pipeline execution.

Trailing-slash 404 errors persist on my Docusaurus Amplify site, what am I missing?▼

If 404s persist, verify amplify.yml runs the fix script after the Docusaurus build step. The script must detect the Docusaurus root via docusaurus.config.* and copy HTML files into directory-based index.html paths to resolve the issue.