diff --git a/.env b/.env new file mode 100644 index 0000000..e491e9a --- /dev/null +++ b/.env @@ -0,0 +1 @@ +PUBLIC_URL=techradar/ \ No newline at end of file diff --git a/README.md b/README.md index c83b3c8..d9c2f8e 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,24 @@ Serve cd build python3 -m http.server 8080 ``` + Then open here: http://localhost:8080 +## Run a prepared static version + +In most cases you have the techradar available at `/techradar`, and for reasons want all correct pages to be accessable. + +Until this setup improves, you can use the following way to generate the correct techradar: + +``` +yarn generateJson +PUBLIC_URL=techradar/ yarn buildRadar +yarn createStaticFiles +cp -r build techradar +``` + +(This is rather workaroundish for now, but does the job.) + ## Usage For a new Technology Radar release, create a folder of the release date @@ -83,9 +99,9 @@ merged with the old ones and a new history entry is created for that item. ## Open points -* static build necessary? -* measure file sizes necessary? -* dotenv necessary? -* check browsers necessary? -* copy public folder necessary? -* specific webpack configurations necessary? \ No newline at end of file +* static build necessary? -> for SEO necessary +* dotenv necessary? -> Could be necessary for other companies +* measure file sizes necessary? -> no +* check browsers necessary? -> no +* copy public folder necessary? -> no +* specific webpack configurations necessary? -> no \ No newline at end of file diff --git a/package.json b/package.json index 86cb667..abebe63 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "bin": { "generateJson": "scripts/generateJson.js", - "buildRadar": "scripts/buildRadar.js" + "buildRadar": "scripts/buildRadar.js", + "createStaticFiles": "bin/tasks/create-static.js" }, "scripts": { "prepare": "husky install && yarn build:tasks && yarn build",