Comments (5)
At a basic level, setting trailingSlash: true,
fixes the issue for me. As noted in the stack overflow threads, it does mean ADRs are rendered as directories, such as http://localhost/adr/0001-record-architecture-decisions/
. However, that could actually be a good thing if we get inline images working, because then those assets could be included in the ADR path.
from log4brains.
How do you enable that?
from log4brains.
You can set it in next.config.js: https://nextjs.org/docs/api-reference/next.config.js/trailing-slash
from log4brains.
For anyone coming to this issue looking to apply this fix, you can use patch-package while we wait for this change to be merged:
The autogenerated output from patch-package is below :)
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @log4brains/[email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@log4brains/web/dist/next.config.js b/node_modules/@log4brains/web/dist/next.config.js
index a5dd2e9..4d14fab 100644
--- a/node_modules/@log4brains/web/dist/next.config.js
+++ b/node_modules/@log4brains/web/dist/next.config.js
@@ -13,6 +13,16 @@ module.exports = withBundleAnalyzer({
reactStrictMode: true,
target: "serverless",
poweredByHeader: false,
+ /**
+ * This patch is to ensure that next outputs page/index.html instead of page.html
+ * Without this, links to pages other than the index file will not work on s3
+ *
+ * without:
+ * .log4brains/out/adr/2022022-document-frontend-infra-decisions.html
+ * with:
+ * .log4brains/out/adr/2022022-document-frontend-infra-decisions/index.html
+ */
+ trailingSlash: true,
serverRuntimeConfig: {
PROJECT_ROOT: __dirname, // https://github.com/vercel/next.js/issues/8251
VERSION: process.env.HIDE_LOG4BRAINS_VERSION ? "" : packageJson.version
This issue body was partially generated by patch-package.
from log4brains.
LGTM. Thank you all
from log4brains.
Related Issues (20)
- How to link to image inside of ADR?
- Cannot run CLI commands HOT 3
- Contributing Onboarding HOT 2
- Docker build for arm64 HOT 1
- log4brains build broken on node 14.21.3 HOT 3
- Using superseded adrs with multi package project. HOT 1
- External JS Libraries HOT 1
- html comments containing reference link defentions crash clientside renderer
- Build output to a single HTML file
- Is this project DEAD? (canary issue) HOT 5
- ERR_REQUIRE_ESM with Node 18.2 HOT 5
- Stop using yarn.lock and pin the exact versions of dependencies in the package.json files
- cannot read property 'incrementalOptions' of undefined HOT 5
- Preview fails with `Cannot read property 'incrementalOptions' of undefined` HOT 4
- Issue with comment in MD file HOT 2
- Log4brains is broken on Node v18.x HOT 1
- Is there a way to customise the primary theme color - 2176AE
- CLI commands for workflow/lifecycle management - And/or Github integration HOT 1
- Decision Log Package Filtering HOT 5
- Support for mermaid.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4brains.