Skip to content

Commit

Permalink
add static generation (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmsuseluda committed Jun 10, 2021
1 parent 001e26a commit 02c81de
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUBLIC_URL=techradar/
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?
* 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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 02c81de

Please sign in to comment.