-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from GeoscienceAustralia/benji
Merging latest changes into the main branch
- Loading branch information
Showing
327 changed files
with
2,589 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,3 @@ | |
Thumbs.db | ||
.DS_Store | ||
_build | ||
content/tags | ||
content/notebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
BUILD_MODE=local # local / demo / production | ||
|
||
LOCAL_ENABLE_REDIRECTS=Yes | ||
LOCAL_ENABLE_TAGS=Yes | ||
LOCAL_ENABLE_USER_GUIDES=Yes | ||
LOCAL_ENABLE_DATA_PRODUCTS=Yes | ||
LOCAL_ENABLE_NOTEBOOKS=Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.md linguist-detectable | ||
*.rst linguist-detectable | ||
*.ipynb linguist-detectable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "dea-notebooks"] | ||
path = docs/notebooks | ||
url = git@github.com:GeoscienceAustralia/dea-notebooks.git | ||
url = https://github.com/GeoscienceAustralia/dea-notebooks.git | ||
branch = stable | ||
shallow = true | ||
ignore = untracked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ COPY docs /docs | |
COPY build-local.sh /setup | ||
CMD /bin/bash -c "/setup/build-local.sh" | ||
|
||
EXPOSE 8011 | ||
EXPOSE 8062 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,3 @@ | ||
# DEA Knowledge Hub | ||
|
||
To contribute content to this site, please [follow the publication process](https://geoscienceau.sharepoint.com/:w:/r/sites/DEA/_layouts/15/Doc.aspx?sourcedoc=%7BE75F31A8-1648-4DA3-9E36-9BB8135921B2%7D&file=DEA%20Publication%20Process.docx&action=default&mobileredirect=true). | ||
|
||
## Git workflow | ||
|
||
You should do your work on the `develop` branch or, ideally, branch off into your own branch (e.g. `alex` branch or `feature/something` branch). Then, preview your changes by pushing to one of the demo branches (`demo1`, `demo2`, or `demo3`) before merging into `develop` and then creating a pull request into the `main` branch. | ||
|
||
![Git workflow diagram](https://mermaid.ink/svg/pako:eNqNkT9PAzEMxb9KZOl0SxmgW0aoxMIGYxY3cS8Rl-SUOlTVKd-d9C_t6RBsz88_20_yCDoaAglNM7rgWIpRtJ3j14SDbWvVbm3cvUTvHb_hmvrqbbDfUimiNI0KKlxo8fEsVRBCH-GDWicM2gpDX9TH4dizpD9j5jtvyu9jTg8n_evMxZuy110zKXx8nDAzmz2ljv4VYe7A098HbujlHePRhZ8E5wlYQK1ry9QfjYe2ArbkSYGs0tAGc88KVCgVxczxfR80SE6ZFpAHg0wrh11CfzLLN_hJsJw) | ||
|
||
<!-- ```mermaid --> | ||
<!-- %%{init: { 'gitGraph': {'showCommitLabel': false}} }%% --> | ||
<!-- --> | ||
<!-- gitGraph TB: --> | ||
<!-- commit --> | ||
<!-- branch develop --> | ||
<!-- checkout develop --> | ||
<!-- commit --> | ||
<!-- branch your-branch --> | ||
<!-- checkout develop --> | ||
<!-- checkout your-branch --> | ||
<!-- commit --> | ||
<!-- commit --> | ||
<!-- branch demo1 --> | ||
<!-- commit --> | ||
<!-- checkout develop --> | ||
<!-- merge your-branch --> | ||
<!-- checkout develop --> | ||
<!-- commit --> | ||
<!-- branch demo2 --> | ||
<!-- commit --> | ||
<!-- checkout develop --> | ||
<!-- branch demo3 --> | ||
<!-- checkout main --> | ||
<!-- merge develop --> | ||
<!-- ``` --> | ||
|
||
# Overwriting demo branches | ||
|
||
Instead of merging into the demo branches, it's easier to overwrite them with the exact contents of your branch. | ||
|
||
```bash | ||
git checkout demo1 | ||
git reset --hard your-branch | ||
git push origin demo1 --force | ||
``` | ||
To contribute content to this site, please [follow the publication process and git workflow](https://geoscienceau.sharepoint.com/:w:/r/sites/DEA/_layouts/15/Doc.aspx?sourcedoc=%7BE75F31A8-1648-4DA3-9E36-9BB8135921B2%7D&file=DEA%20Publication%20Process.docx&action=default&mobileredirect=true). |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// This function handles redirect logic | ||
|
||
async function handler(event) { | ||
const request = event.request; | ||
const uri = event.request.uri; | ||
const deaToolsSourceCodePattern = /dea_tools\/(.*)\.py$/g; | ||
const indexHtmlPattern = /\/index\.html$/g; | ||
const filetypeExtensionsPattern = /\.(html|rst|md|ipynb|py)$/g; | ||
|
||
const status301MovedPermanently = { | ||
statusCode: 301, | ||
statusDescription: "Moved Permanently" | ||
}; | ||
|
||
// Redirect DEA Tools source code URLs to the relevant 'automodule' page generated from the source code. | ||
// E.g. "../Tools/dea_tools/coastal.py" => "/notebooks/Tools/gen/dea_tools.coastal/" | ||
// E.g. "../Tools/dea_tools/app/animations.py" => "/notebooks/Tools/gen/dea_tools.app.animations/" | ||
|
||
if (deaToolsSourceCodePattern.test(uri)) { | ||
const sourceCodePath = uri.match(deaToolsSourceCodePattern)[1]; | ||
const automoduleName = sourceCodePath.replaceAll("/", "."); | ||
const automoduleUri = `/notebooks/Tools/gen/dea_tools.${deaToolsName}/`; | ||
|
||
return Object.assign(status301MovedPermanently, { | ||
headers: { | ||
location: { | ||
value: automoduleUri | ||
} | ||
} | ||
}); | ||
} | ||
|
||
// Redirect URLs ending in "index.html" to end in "/" instead. E.g. /page/index.html => /page/ | ||
|
||
if (indexHtmlPattern.test(uri)) { | ||
return Object.assign(status301MovedPermanently, { | ||
headers: { | ||
location: { | ||
value: uri.replace(indexHtmlPattern, "/") | ||
} | ||
} | ||
}); | ||
} | ||
|
||
// Redirect URLs ending in certain extensions (".html", ".rst", and others) to end in "/" instead. E.g. /example.html => /example/ | ||
|
||
if (filetypeExtensionsPattern.test(uri)) { | ||
return Object.assign(status301MovedPermanently, { | ||
headers: { | ||
location: { | ||
value: uri.replace(filetypeExtensionsPattern, "/") | ||
} | ||
} | ||
}); | ||
} | ||
|
||
return request; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.