Skip to content

Commit

Permalink
chore: add redirect page to docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
Topener committed Nov 2, 2023
1 parent 1aa10fb commit 805c5a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
18 changes: 18 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Redirecting to Developer Portal</title>
</head>
<body>
<p>Redirecting to <a id="url" href="#">Developer Portal</a>...</p>

<script>
const hash = window.location.hash.substring(2)

const newUrl = `https://developers.dhis2.org/docs/app-platform/${hash}`
document.querySelector('p a').href = newUrl
window.location.href = newUrl
</script>
</body>
</html>
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"pwa-demo": "yarn build:pwa && yarn build:adapter && yarn workspace pwa-app demo",
"start:example": "yarn workspace simple-app start --force",
"start": "yarn build:adapter && yarn start:example",
"docs:serve": "d2-utils-docsite serve ./docs -o ./dist",
"docs:build": "d2-utils-docsite build ./docs -o ./dist",
"docs:build": "mkdir -p dist && cp docs/index.html dist/",
"test:adapter": "yarn workspace @dhis2/app-adapter test",
"test:cli": "yarn workspace @dhis2/cli-app-scripts test",
"test": "yarn test:adapter && yarn test:cli"
Expand Down

0 comments on commit 805c5a5

Please sign in to comment.