Skip to content

deps: upgrade hugo and docsy #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
HUGO_VERSION="0.107.0"
DOCSY_VERSION="v0.6.0"
HUGO_VERSION="0.133.1"
DOCSY_VERSION="v0.11.0"
5 changes: 3 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Add hugo nodejs dependencies
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: 'npm'

- name: Setup Hugo
Expand All @@ -36,7 +36,8 @@ jobs:
env:
HUGO_ENV: "production"
run: |
yarn install
npm install
hugo mod get
hugo --minify --gc

- name: Deploy to Pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
env:
HUGO_ENV: "production"
run: |
yarn install
npm install
hugo --minify --gc -d $GITHUB_WORKSPACE/dist
- name: run htmltest
continue-on-error: true
Expand Down
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
ARG HUGO_VERSION=0.107.0
ARG HUGO_VERSION=0.133.1
ARG DIST_TAG=-ext-ubuntu
FROM klakegg/hugo:${HUGO_VERSION}${DIST_TAG}
FROM floryn90/hugo:${HUGO_VERSION}${DIST_TAG}

ARG DOCSY_VERSION=v0.6.0
ARG DOCSY_VERSION=v0.11.0

LABEL maintainer="CoMSES Net <[email protected]>"

WORKDIR /src
COPY config.toml package.json /src/
COPY . /src/

RUN git config --global --add safe.directory /src \
&& hugo mod init github.com/openmodelingfoundation/openmodelingfoundation.github.io \
&& hugo mod get github.com/google/docsy@${DOCSY_VERSION}
RUN git config --global --add safe.directory /src

COPY . /src/
RUN hugo mod get
RUN npm install

CMD ["server"]
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This GitHub pages site is generated with [hugo](https://gohugo.io) using the [do

### Setup

To create a local setup of this site you can install `Docker` and `docker-compose` or `hugo` and `yarn` on your local operating system.
To create a local setup of this site you can install `Docker` and `docker-compose` or `hugo` and `npm` on your local operating system.

Clone this repository via `git clone --recurse-submodules -j8 https://github.com/openmodelingfoundation/openmodelingfoundation.github.io.git`

Expand All @@ -31,17 +31,18 @@ Open a hugo shell in the docker container
% make shell
```

#### Install hugo and npm locally


#### Install hugo and yarn locally
If you don't have docker installed and don't mind installing things in your operating system, you can do the following:

- Install the extended version of hugo from the [releases page](https://github.com/gohugoio/hugo/releases).
- Install yarn via your operating system's package manager or from the [yarn site](https://yarnpkg.com/getting-started/install).
- Run `yarn install` in the base directory
- Use hugo commands to render the site.
- Install npm via your operating system's package manager or from the [npm site](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
- Use hugo commands and npm to build/render the site.

```bash
% hugo mod get
% npm install
% hugo serve # dev server without drafts
# OR
% hugo serve -D # dev server with drafts
```
52 changes: 18 additions & 34 deletions assets/scss/main.scss → assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
@import "support/functions";
@import "variables_project";
@import "variables";
@import "support/mixins";

@import "../vendor/bootstrap/scss/bootstrap";

@import "../vendor/Font-Awesome/scss/fontawesome.scss";
@import "../vendor/Font-Awesome/scss/solid.scss";
@import "../vendor/Font-Awesome/scss/brands.scss";

@import "support/utilities";
@import "colors";
@import "boxes";
@import "blog";
@import "code";
@import "nav";
@import "sidebar-tree";
@import "sidebar-toc";
@import "sidebar-tree-with-links";
@import "buttons";
@import "breadcrumb";
@import "alerts";
@import "content";
@import "search";
@import "main-container";
@import "blocks/blocks";
@import "section-index";
@import "pageinfo";

@if $td-enable-google-fonts {
@import url($web-font-path);
a {
text-decoration: none;
}

footer {
Expand All @@ -54,6 +24,22 @@ footer {
}
}

.person-entry {
display: flex;

&__portrait {
flex-shrink: 0;
margin-right: 1.5rem;
width: 200px;
}

&__bio {
flex-shrink: 1;
margin-top: 1.5rem;
max-width: 70%;
}
}

.td-toc a {
font-size: 0.9rem;
font-weight: normal;
Expand Down Expand Up @@ -114,5 +100,3 @@ footer {
visibility: hidden;
}
}

@import "styles_project";
182 changes: 0 additions & 182 deletions config.toml

This file was deleted.

6 changes: 3 additions & 3 deletions content/en/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3 class="font-weight-light text-center">
</div>
{{< /blocks/section >}}

{{< blocks/section color="dark" >}}
{{< blocks/section color="dark" type="row" >}}
<div class="col-12 text-center mb-5"><h2><b>Standards</b></h2></div>
{{% blocks/standard icon="fas fa-search" title="Accessibility" url="/standards/accessibility" %}}
Support best practices for discovery and access to model code, documentation, and metadata.
Expand All @@ -39,9 +39,9 @@ <h3 class="font-weight-light text-center">
{{< /blocks/section >}}


{{< blocks/section color="light" >}}
{{< blocks/section color="light" type="row" >}}
{{% blocks/feature icon="fas fa-project-diagram" title="How to Participate" url="/contribute" url_text="How to contribute" %}}
You can [contribute to OMF activities]({{< relref "contribute" >}}) as a representative of a member organization or
You can [contribute to OMF activities]({{< relref "contribute" >}}) as a representative of a member organization or
as an individual in a [Working Group]({{< relref "working-groups" >}}).
{{% /blocks/feature %}}

Expand Down
Loading
Loading