diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..7c571464 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,12 @@ +{ + "name": "rapids-site", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "forwardPorts": [1313], + "features": { + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": { + "jqVersion": "latest", + "yqVersion": "latest" + } + }, + "postCreateCommand": "./scripts/devcontainer-init.sh" +} diff --git a/.gitignore b/.gitignore index cba21314..8b3b8d37 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ _site .netlify .hugo_build.lock public +resources diff --git a/README.md b/README.md index 8b2c6598..d64d4c30 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ #
  [RAPIDS.ai](https://rapids.ai.com) Website -Code and content for the [RAPIDS.ai](https://rapids.ai) static public website. This is a refactor from the previous Jekyll backed version to use the [Hugo](https://gohugo.io/about/) static site framework and the [Bulma](https://bulma.io/) css framework. On occasion it uses [Apline.js](https://alpinejs.dev/start-here). +This repository contains the source code and content for the [RAPIDS.ai](https://rapids.ai) website. The site uses [Hugo](https://gohugo.io/about/) for generating static HTML and [Bulma](https://bulma.io/) as a CSS framework. On occasion it uses [Apline.js](https://alpinejs.dev/start-here). ## Design and Layout -Use the [Template Design Guide](template.html) and [RAPIDS Brand Guide](brand.html) for reference with starting new pages. Refer to the [Bulma Documentation](https://bulma.io/documentation/) for reference to the CSS class names and components. Note: many CSS classes are overwritten through `custom.css`. - [Column System](https://bulma.io/documentation/columns/basics/) @@ -15,16 +14,21 @@ Hugo uses templates, layouts, and directories to build pages. The `/layouts/_def ## Requirements -The site required Hugo in order to be built. Follow the [Hugo documentation](https://gohugo.io/about/) for assistance. All logos and images are located in the [images](/static/images) folder. Externally (no website) referenced files should be placed in the [assets](/assets) folder. Font Icons are used from [Font Awesome](https://fontawesome.com/), and include Pro account icons. -In the future it will employ the more optimized assets and hugo pipe features. +In the future it will employ the more optimized assets and Hugo pipe features. -## Hosting, Development and Previews -After installing Hugo, run `hugo server` to see a developer preview and `hugo` to build for production. You can also preview pages locally from the `/public` dir after building, but may need to use `python -m http.server` or similar for all functionality. +## Pull Request Previews -Hosting is currently done through [Netlify](https://www.netlify.com/), which should create a preview when PRs are pushed to the main repository. +[Netlify](https://www.netlify.com/) will create a preview environment when PRs are opened. +## Contributing + +You can use the included devcontainer for local development. + +Start the container and run `hugo serve` to start a development server. + +The development server can be viewed in a browser at . \ No newline at end of file diff --git a/config.toml b/config.toml deleted file mode 100644 index d28aadd0..00000000 --- a/config.toml +++ /dev/null @@ -1,13 +0,0 @@ -baseURL = 'https://rapids.ai/' -languageCode = 'en-us' -title = 'RAPIDS' -enableRobotsTXT = true -googleAnalytics = 'G-RKXFW6CM42' - - -disableKinds = ["taxonomy", "term"] - -[sitemap] - changefreq = 'monthly' - filename = 'sitemap.xml' - priority = 0.5 diff --git a/hugo.yaml b/hugo.yaml new file mode 100644 index 00000000..9c1c376e --- /dev/null +++ b/hugo.yaml @@ -0,0 +1,12 @@ +baseURL: https://rapids.ai/ +languageCode: en-us +title: RAPIDS +enableRobotsTXT: true +googleAnalytics: G-RKXFW6CM42 + +disableKinds: [taxonomy, term] + +sitemap: + changefreq: monthly + filename: sitemap.xml + priority: 0.5 diff --git a/netlify.toml b/netlify.toml index 9027e9e5..512bda0a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,6 +3,6 @@ publish = "public" command = "hugo --gc --minify && cp _redirects public" [build.environment] -HUGO_VERSION = "0.108.0" +HUGO_VERSION = "0.119.0" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" diff --git a/scripts/devcontainer-init.sh b/scripts/devcontainer-init.sh new file mode 100755 index 00000000..7380bb41 --- /dev/null +++ b/scripts/devcontainer-init.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euo pipefail + +# Install Hugo version from `netlify.toml` file +mkdir -p ~/.local/bin +HUGO_VERSION=$(yq -oy '.build.environment.HUGO_VERSION' netlify.toml) +wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" -O - | \ +tar -xzvf - -C ~/.local/bin hugo