diff --git a/.github/workflows/docstrings.yml b/.github/workflows/docstrings.yml index 2403737098e..156fff7dbef 100644 --- a/.github/workflows/docstrings.yml +++ b/.github/workflows/docstrings.yml @@ -11,23 +11,23 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout site - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod path: site - name: Checkout coast - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: British-Oceanographic-Data-Centre/COAsT ref: develop path: external - name: add python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.10 - name: covert docstrings run: | @@ -44,8 +44,10 @@ jobs: git config --global user.email "bodcsoft@bodc.ac.uk" git config --global author.email "bodcsoft@bodc.ac.uk" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + git fetch origin git checkout develop git pull + [ ! -f content/en/docs/Reference/index.md ] || mv content/en/docs/Reference/index.md content/en/docs/Reference/index_class.md git add content/en/docs/Reference/* git commit -am "Updated docstrings from coast repo." git push origin develop diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 56bd89f2fe3..37b8b2666eb 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -9,7 +9,7 @@ jobs: deploy: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod @@ -17,11 +17,11 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.70.0' + hugo-version: '0.120.1' extended: true - name: Setup nodejs - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 12 diff --git a/.github/workflows/markdown-altimetry.yml b/.github/workflows/markdown-altimetry.yml index 5c91890719b..58254d7d86e 100644 --- a/.github/workflows/markdown-altimetry.yml +++ b/.github/workflows/markdown-altimetry.yml @@ -14,14 +14,14 @@ jobs: shell: bash -l {0} steps: - name: Checkout site - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod path: site - name: Checkout coast - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: British-Oceanographic-Data-Centre/COAsT ref: develop @@ -32,7 +32,6 @@ jobs: with: activate-environment: coast environment-file: external/environment.yml - python-version: 3.8.10 - name: prep exec notebooks run: | conda info @@ -67,6 +66,7 @@ jobs: git config --global user.email "bodcsoft@bodc.ac.uk" git config --global author.email "bodcsoft@bodc.ac.uk" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + git fetch origin git checkout develop git pull git add content/en/docs/Examples/Notebooks/Altimetry/* diff --git a/.github/workflows/markdown-general.yml b/.github/workflows/markdown-general.yml index 9135d5caa00..c9ab6eff47d 100644 --- a/.github/workflows/markdown-general.yml +++ b/.github/workflows/markdown-general.yml @@ -13,14 +13,14 @@ jobs: shell: bash -l {0} steps: - name: Checkout site - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod path: site - name: Checkout coast - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: British-Oceanographic-Data-Centre/COAsT ref: develop @@ -31,7 +31,6 @@ jobs: with: activate-environment: coast environment-file: external/environment.yml - python-version: 3.8.10 - name: prep exec notebooks run: | conda info @@ -45,6 +44,9 @@ jobs: mkdir -p ./example_scripts/notebook_tutorials/markdown/general ls ./example_scripts/notebook_tutorials pip install . + sudo apt-get update + sudo apt-get install -y libgeos-dev + pip install cartopy==0.21.0 mv config ./example_scripts/notebook_tutorials/runnable_notebooks/general/config bash notebook_to_md.sh general - name: convert notebooks @@ -58,6 +60,8 @@ jobs: mv ./markdown/general/climatology_tutorial.md $GITHUB_WORKSPACE/site/content/en/docs/Examples/Notebooks/General/ mv ./markdown/general/dask_wrapper_template_tutorial.md $GITHUB_WORKSPACE/site/content/en/docs/Examples/Notebooks/General/ mv ./markdown/general/mask_maker_tutorial.md $GITHUB_WORKSPACE/site/content/en/docs/Examples/Notebooks/General/ + mv ./markdown/general/polar_plotting.md $GITHUB_WORKSPACE/site/content/en/docs/Examples/Notebooks/General/ + mv ./markdown/general/zarr_files.md $GITHUB_WORKSPACE/site/content/en/docs/Examples/Notebooks/General/ echo "Move images" rsync -r ./markdown_images/general/ $GITHUB_WORKSPACE/site/static @@ -69,8 +73,9 @@ jobs: git config --global user.email "bodcsoft@bodc.ac.uk" git config --global author.email "bodcsoft@bodc.ac.uk" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + git fetch origin git checkout develop - git pull + git pull git add content/en/docs/Examples/Notebooks/General/* git add static/* git commit -am "Updated General notebook pages from coast repo." diff --git a/.github/workflows/markdown-gridded.yml b/.github/workflows/markdown-gridded.yml index d3154cf7d4c..4ca7dfa46ac 100644 --- a/.github/workflows/markdown-gridded.yml +++ b/.github/workflows/markdown-gridded.yml @@ -13,14 +13,14 @@ jobs: shell: bash -l {0} steps: - name: Checkout site - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod path: site - name: Checkout coast - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: British-Oceanographic-Data-Centre/COAsT ref: develop @@ -31,7 +31,6 @@ jobs: with: activate-environment: coast environment-file: external/environment.yml - python-version: 3.8.10 - name: prep exec notebooks run: | conda info @@ -71,8 +70,9 @@ jobs: git config --global user.email "bodcsoft@bodc.ac.uk" git config --global author.email "bodcsoft@bodc.ac.uk" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + git fetch origin git checkout develop - git pull + git pull git add content/en/docs/Examples/Notebooks/Gridded/* git add static/* git commit -am "Updated Gridded notebook pages from coast repo." diff --git a/.github/workflows/markdown-profile.yml b/.github/workflows/markdown-profile.yml index 745a2350a04..f070482ea7b 100644 --- a/.github/workflows/markdown-profile.yml +++ b/.github/workflows/markdown-profile.yml @@ -13,14 +13,14 @@ jobs: shell: bash -l {0} steps: - name: Checkout site - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod path: site - name: Checkout coast - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: British-Oceanographic-Data-Centre/COAsT ref: develop @@ -31,7 +31,6 @@ jobs: with: activate-environment: coast environment-file: external/environment.yml - python-version: 3.8.10 - name: prep exec notebooks run: | conda info @@ -64,6 +63,7 @@ jobs: git config --global user.email "bodcsoft@bodc.ac.uk" git config --global author.email "bodcsoft@bodc.ac.uk" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + git fetch origin git checkout develop git pull git add content/en/docs/Examples/Notebooks/Profile/* diff --git a/.github/workflows/markdown-tidegauge.yml b/.github/workflows/markdown-tidegauge.yml index 497f597c566..e926163a7a7 100644 --- a/.github/workflows/markdown-tidegauge.yml +++ b/.github/workflows/markdown-tidegauge.yml @@ -13,14 +13,14 @@ jobs: shell: bash -l {0} steps: - name: Checkout site - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive # Fetch Hugo themes and all extra projects fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod path: site - name: Checkout coast - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: British-Oceanographic-Data-Centre/COAsT ref: develop @@ -31,7 +31,6 @@ jobs: with: activate-environment: coast environment-file: external/environment.yml - python-version: 3.8.10 - name: prep exec notebooks run: | conda info @@ -67,6 +66,7 @@ jobs: git config --global user.email "bodcsoft@bodc.ac.uk" git config --global author.email "bodcsoft@bodc.ac.uk" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + git fetch origin git checkout develop git pull git add content/en/docs/Examples/Notebooks/Tidegauge/* diff --git a/README.md b/README.md index 3eecfad39f8..772e5c21f16 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,53 @@ -# COAsT docsy +# COAsT Documentation Website -This is the website repo for the COAsT python package it uses [Docsy](https://github.com/google/docsy) a Hugo theme for technical documentation sites, providing easy site navigation, structure, and more. +This is the repository for the COAsT Python package documentation website. This site utilizes the [Docsy](https://github.com/google/docsy) theme, a Hugo theme designed for technical documentation sites, offering streamlined navigation, structure, and more. +## Prerequisites -## Cloning the COAsT Project website +Before you get started, make sure you have the following prerequisites in place: -The following will give you a project that is set up and ready to use (don't forget to use `--recurse-submodules` or you won't pull down some of the code you need to generate a working site). The `hugo server` command builds and serves the site. If you just want to build the site, run `hugo` instead. +1. **Node.js and npm Installation**: Download and install Node.js, which includes npm, from the official [Node.js website](https://nodejs.org/). We recommend using version 18 or later. + +2. **Hugo Installation**: You'll need an extended version of Hugo, preferably version 0.120.1 or later, for local builds and previews of sites that use Docsy. To ensure you have the correct Hugo version, follow these steps: + + - If you install Hugo from the release page, make sure to select the **extended Hugo version** to support SCSS. + + - After installation, verify your Hugo version by running `hugo version`. Your output should resemble the following: + + ```bash + hugo v0.120.2-9c2b2414d231ec1bdaf3e3a030bf148a45c7aa17+extended linux/amd64 BuildDate=2023-10-31T16:27:18Z VendorInfo=gohugoio + ``` + + Ensure that the version name includes the string *"extended"*. + +## Getting Started + +Follow these steps to set up your project and get it ready for use. Begin by cloning the repository: ```bash -git clone --recurse-submodules --depth 1 https://github.com/British-Oceanographic-Data-Centre/COAsT-site.git -cd docsy-example -hugo server +git clone --recurse-submodules --depth 1 git@github.com:British-Oceanographic-Data-Centre/COAsT-site.git +cd COAsT-site ``` -The theme is included as a Git submodule: +Now, proceed to install the dependencies and essential scripts: ```bash -▶ git submodule - a053131a4ebf6a59e4e8834a42368e248d98c01d themes/docsy (heads/master) +npm install # Install package dependencies +npm run prepare # Fetch the submodule used as the theme for this website and install its dependencies ``` -If you want to do SCSS edits and want to publish these, you need to install `PostCSS` (not needed for `hugo server`): +The `npm run prepare` command will install all the necessary dependencies for your theme, including `PostCSS`, `Bootstrap`, and `Autoprefixer`. + +## Running the Website Locally + +After cloning the site repository, navigate to the repository's root folder, and execute the following command to serve the website locally: ```bash -npm install +hugo server ``` +The `hugo server` command builds and serves the site. If you only want to build the site without serving it locally, run `hugo` instead. + - -## Running the website locally - -Once you've cloned the site repo, from the repo root folder, run: - -``` -hugo server -``` +To pull in changes, see `pull-deps.sh` script in the theme.--> \ No newline at end of file diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss index 256902739d6..c3c8277f784 100644 --- a/assets/scss/_variables_project.scss +++ b/assets/scss/_variables_project.scss @@ -4,3 +4,50 @@ Add styles or override variables from the theme here. */ +.text-shadow-black-3{ + text-shadow: 3px 3px rgba(0,0,0,1); +} +.text-shadow-black-2{ + text-shadow: 2px 2px rgba(0,0,0,1); +} + +.text-shadow-white-3{ + text-shadow: 3px 3px rgba(255,255,255,1); +} +.text-shadow-white-2{ + text-shadow: 2px 2px rgba(255,255,255,1); +} + +.link-size{ + width: 12rem; +} + +.icon-size{ + height: 2rem; +} + +.foot-link{ + :hover{ + opacity: 0.7; + } +} + +.td-search__input:not(:focus){ + background: rgba(0,0,0,0.3) !important; +} + + +.td-footer { + min-height: 130px !important; + padding-top: 2.5rem !important; +} + + +#td-cover-block-0 { + background-image: linear-gradient(45deg, rgba(255,255,255, 0.2), rgba(255,255,255, 0.2)), url(/COAsT/feature-background_hu7bd19a57cd689ada407cd31cc8f06f38_227588_960x540_fill_q75_catmullrom_top.jpg) !important; +} +@media only screen and (min-width: 1200px) { + #td-cover-block-0 { + background-image: linear-gradient(45deg, rgba(255,255,255, 0.2), rgba(255,255,255, 0.2)), url(/COAsT/feature-background_hu7bd19a57cd689ada407cd31cc8f06f38_227588_960x540_fill_q75_catmullrom_top.jpg) !important; + } +} \ No newline at end of file diff --git a/config.toml b/config.toml index 0c033fb0ac5..be32700845c 100644 --- a/config.toml +++ b/config.toml @@ -17,7 +17,7 @@ defaultContentLanguageInSubdir = false # Useful when translating. enableMissingTranslationPlaceholders = true -disableKinds = ["taxonomy", "taxonomyTerm"] +disableKinds = ["taxonomy"] # Highlighting config pygmentsCodeFences = true @@ -54,6 +54,7 @@ id = "UA-00000000-0" [languages] [languages.en] +[languages.en.params] title = "COAsT" description = "A Docsy site - full of documention" languageName ="English" @@ -66,7 +67,10 @@ weight = 1 #contentDir = "content/no" #time_format_default = "02.01.2006" #time_format_blog = "02.01.2006" - +[module] + [[module.mounts]] + source = "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" + target = "assets/js/bootstrap.bundle.min.js" [markup] [markup.goldmark] [markup.goldmark.renderer] @@ -119,7 +123,7 @@ offlineSearch = true # User interface configuration [params.ui] # Enable to show the side bar menu in its compact state. -sidebar_menu_compact = false +sidebar_menu_compact = true # Set to true to disable breadcrumb navigation. breadcrumb_disable = false # Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) @@ -127,7 +131,7 @@ sidebar_search_disable = false # Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar navbar_logo = true # Set to true to disable the About link in the site footer -footer_about_disable = false +footer_about_disable = true # Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events. # This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set. @@ -147,10 +151,18 @@ enable = true [params.links] # End user relevant links. These will show up on left side of footer and in the community page if you have one. +[[params.links.user]] + name = "COAsT Github" + url = "https://github.com/British-Oceanographic-Data-Centre/COAsT" + desc = "COAsT GitHub Repository." [[params.links.user]] name = "COAsT Pypi" url = "https://pypi.org/project/COAsT/#history" - desc = "COAsT python package." + desc = "COAsT pip python package." +[[params.links.user]] + name = "COAsT Anaconda" + url = "https://anaconda.org/BODC/coast" + desc = "COAsT anaconda package." #[[params.links.user]] # name ="Twitter" # url = "https://example.org/twitter" diff --git a/content/en/_index.html b/content/en/_index.html index 076d0833ae5..065fb5adec1 100644 --- a/content/en/_index.html +++ b/content/en/_index.html @@ -4,41 +4,73 @@ +++ -{{< blocks/cover title="Welcome to the documentation: A Docsy site for COAsT" image_anchor="top" height="full" color="orange" >}} -
COAsT
- {{< blocks/link-down color="info" >}} +COAsT is Diagnostic and Assessment toolbox for kilometric scale regional models. + It's aim is to deliver a flexible, community-ready framework for assessing kilometric scale ocean models.
+The focus, initially, is be on delivering novel diagnostics for processes that are emergent + at the kilometric scale and with NEMO model output.
+COAsT is an open source project that anyone in the community can use, improve, and enjoy. + We'd love you to join us! Here's a few ways to find out what's happening and get involved.
+Using or want to use COAsT? Find out more here:
+ +If you want to get more involved by contributing to COAsT, join us on our Github Repository -{{< /blocks/section >}} +
You can find out how to contribute to these docs in our Contribution Guidelines. +