diff --git a/.browserslistrc b/.browserslistrc
deleted file mode 100644
index 52aa41a9..00000000
--- a/.browserslistrc
+++ /dev/null
@@ -1,4 +0,0 @@
-Last 2 versions
-> 1%
-maintained node versions
-not dead
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 6167ce99..00000000
--- a/.eslintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-public
-static
-.cache
-content
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 1ac9f095..00000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "extends": ["airbnb", "airbnb/hooks", "prettier"],
- "parserOptions": {
- "ecmaVersion": 2020
- },
- "plugins": ["react", "jsx-a11y", "import"],
- "rules": {
- "no-console": "off",
- "react/prefer-stateless-function": "off",
- "react/prop-types": "off",
- "react/no-danger": "off",
- "jsx-a11y/anchor-is-valid": [
- "error",
- {
- "components": ["Link"],
- "specialLink": ["hrefLeft", "hrefRight", "to"],
- "aspects": ["noHref", "invalidHref", "preferButton"]
- }
- ],
- "jsx-a11y/control-has-associated-label": [ 2, {
- "ignoreElements": [
- "th"
- ]
- }],
- "no-plusplus": [
- "error",
- {
- "allowForLoopAfterthoughts": true
- }
- ]
- },
- "settings": {
- "import/core-modules": []
- },
- "env": {
- "browser": true
- }
-}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e98360e9..79631274 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,39 +1,22 @@
-name: Test-Build ModuleSite
+name: Test-build website
-# Trigger the workflow on all pull requests
on: pull_request
env:
GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_GITHUB_TOKEN }}
jobs:
- gatsby-build:
+ build:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: ["24", "26"]
steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
+ - uses: actions/checkout@v7
+ - uses: actions/setup-node@v7
with:
- node-version: '18'
- # Globally caches yarn dependencies
- cache: 'yarn'
- - name: Install Project Dependencies
- run: yarn install --frozen-lockfile --immutable
- - name: Build ModuleSite
- run: yarn run build
- gatsby-build-mutable-lockfile:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: '18'
- # Globally caches yarn dependencies
- cache: 'yarn'
- - name: Install Project Dependencies
- run: yarn install
- - name: Build ModuleSite
- run: yarn run build
+ node-version: ${{ matrix.node-version }}
+ cache: npm
+ - run: npm ci
+ - run: npm run check
+ - run: npm run build
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index c0a12666..15349803 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -1,15 +1,11 @@
-name: Publish ModuleSite on gh-pages
+name: Publish website on GitHub Pages
on:
- # Trigger the workflow on push only for master branch
push:
branches:
- master
-
- # Allows to run workflow manually from Actions tab
workflow_dispatch:
-# Sets permissions of GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
@@ -20,44 +16,25 @@ concurrency:
group: "pages"
cancel-in-progress: true
-# Default to bash
-defaults:
- run:
- shell: bash
-
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_GITHUB_TOKEN }}
steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
+ - uses: actions/checkout@v7
+ - uses: actions/setup-node@v7
with:
- node-version: '18'
- # Globally caches yarn dependencies
- cache: 'yarn'
- # TODO: include pages setup action (actions/configure-pages@v2)
- # when/after cleaning up path prefix weirdness
- # - name: Setup Pages
- # id: pages
- # uses:
- # with:
- # # Automatically inject pathPrefix in your Gatsby configuration file.
- # static_site_generator: gatsby
- - name: Install Project Dependencies
- run: yarn install --frozen-lockfile --immutable
- - name: Build ModuleSite
- run: yarn run build
+ node-version: "24"
+ cache: npm
+ - name: Setup Pages
+ uses: actions/configure-pages@v6
+ - run: npm ci
+ - run: npm run build
- name: Upload artifact
- # packaging static assets and uploading artifact that can be deployed to GitHub Pages
- # https://github.com/actions/upload-pages-artifact
- uses: actions/upload-pages-artifact@v3
+ uses: actions/upload-pages-artifact@v5
with:
- # path to static assets that will be packaged and uploaded
- path: ./public
+ path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
@@ -67,7 +44,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
- # action expects artifact named `github-pages` to have been created prior to execution
- # this is done automatically using `actions/upload-pages-artifact`
- # https://github.com/actions/deploy-pages
- uses: actions/deploy-pages@v4
+ uses: actions/deploy-pages@v5
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index e0601b3d..0f9f9664 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -1,74 +1,40 @@
-name: Lint ModuleSite Code
+name: Lint website code
-# Trigger the workflow on all pull requests with base branch 'master' and commits to 'master'.
on:
pull_request:
- branches: [ "master" ]
+ branches: ["master"]
push:
- branches: [ "master" ]
+ branches: ["master"]
+
jobs:
- build:
- runs-on: ubuntu-latest
- env:
- GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_GITHUB_TOKEN }}
- steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: '18'
- # Globally caches yarn dependencies
- cache: 'yarn'
- - name: Install Project Dependencies
- run: yarn install --frozen-lockfile --immutable
- - name: Build ModuleSite
- run: yarn run build
- - name: Upload generated resources
- uses: actions/upload-artifact@v4
- with:
- name: generated
- path: src/generated
eslint:
- needs: build
runs-on: ubuntu-latest
permissions:
+ contents: read
security-events: write
steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: '18'
- # Globally caches yarn dependencies
- cache: 'yarn'
- - name: Install Project Dependencies
- run: yarn install --frozen-lockfile --immutable
- - name: Download generated resources from build job
- uses: actions/download-artifact@v4
+ - uses: actions/checkout@v7
+ - uses: actions/setup-node@v7
with:
- name: generated
- path: src/generated
- - name: Lint JavaScript
- run: yarn run lint:js --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif
- - name: Upload analysis results to GItHub
- uses: github/codeql-action/upload-sarif@v3
+ node-version: "24"
+ cache: npm
+ - run: npm ci
+ - name: Lint JavaScript/TypeScript/Astro
+ run: npm run lint:js -- --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif
+ - name: Upload analysis results to GitHub
+ if: always()
+ uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
- prettier:
+ format-and-styles:
runs-on: ubuntu-latest
steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
+ - uses: actions/checkout@v7
+ - uses: actions/setup-node@v7
with:
- node-version: '18'
- # Globally caches yarn dependencies
- cache: 'yarn'
- - name: Install Project Dependencies
- run: yarn install --frozen-lockfile --immutable
- - name: Validate JavaScript Formatting
- run: yarn run format-check:js
+ node-version: "24"
+ cache: npm
+ - run: npm ci
+ - run: npm run format:check
+ - run: npm run lint:css
diff --git a/.gitignore b/.gitignore
index 5e00711c..6e41ad01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,17 +48,6 @@ jspm_packages
.yarn-integrity
-# Build Files
-public/
-.cache/
-
-# Gatsby context
-.gatsby-context.js
-
-# Bundle stats
-bundle-stats.json
-
-# Generated JSON
-src/generated/
-plugins/source-terasology-modules/data.json
-plugins/source-terasology-engine/data.json
+# Build output and Astro caches
+dist/
+.astro/
diff --git a/.gitpod.yml b/.gitpod.yml
index 4417aaaa..ed7852a1 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -1,7 +1,7 @@
tasks:
- - init: yarn install
- command: yarn run develop
+ - init: npm install
+ command: npm run dev -- --host
ports:
- - port: 8000
+ - port: 4321
onOpen: open-preview
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..1d9791cb
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,8 @@
+dist/
+.astro/
+node_modules/
+package-lock.json
+blog/
+public/
+*.md
+.vscode/
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 00000000..637ecab9
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,5 @@
+{
+ "printWidth": 100,
+ "plugins": ["prettier-plugin-astro"],
+ "overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }]
+}
diff --git a/.stylelintrc b/.stylelintrc
deleted file mode 100644
index ca5ab619..00000000
--- a/.stylelintrc
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": [
- "stylelint-config-standard-scss",
- "stylelint-config-prettier"
- ],
- "rules": {
- "indentation": 2
- }
-}
diff --git a/README.md b/README.md
index 2af5ce2b..66324c64 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ We are present in nearly the complete round-up of social networks. Follow/friend
-
+
`) are copied as-is.
### Blog Post Template
@@ -104,60 +105,35 @@ THe lower part is your blog post content. You'll also see an example of how to i
## Development
-The Terasology website is built with [Gatsby](https://www.gatsbyjs.org/).
-A respective development environment can be installed on macOS, Windows, and Linux (Debian or Ubuntu recommended).
-Youβll need at least 1GB of available RAM.
-
-Make sure that you install the following tools to be able to build and serve the website locally:
-* [Node.js](https://nodejs.org/en/)
-* [Yarn](https://yarnpkg.com/en/)
-
-
-To install all dependencies, run
+The Terasology website is built with [Astro](https://astro.build/) and a few React islands for the interactive parts (blog search, module search, gallery lightbox, download picker).
+You need [Node.js](https://nodejs.org/en/) 24 or newer; npm ships with it.
```sh
-yarn install
+npm install # install dependencies
+npm run dev # dev server with live reload on http://localhost:4321
+npm run build # static build into dist/
+npm run preview # serve the last build
+npm run check # type-check Astro/TS files
+npm run lint:js # ESLint; lint:css = Stylelint, format = Prettier
+npm run clean # remove build output and caches
```
-You can then use the [Gatsby CLI commands](https://www.gatsbyjs.com/docs/reference/gatsby-cli/) `build`, `clean`, `develop` and `serve`.
-
-Our custom source plugin fetches information from GitHub, and therefore needs a GitHub [personal access token] in the environment named `GITHUB_TOKEN`.
+Module and "Good First Issue" data come from the GitHub GraphQL API and need a GitHub [personal access token] (no extra scopes) in the environment as `GITHUB_TOKEN`.
+Without it the build still completes: it warns and renders module pages from previously cached data, or empty if there is none.
+Fetched data is cached for 12 hours in `.astro/`; `npm run clean` forces a refetch.
+Contributor program topics and mentors come from public Trello boards and need no token.
[personal access token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
> π§° Access Tokens in CI
>
> If the token expires, you can follow the ["How to fix an expired GitHub Action token"](https://terasology.org/Terasology/#/Maintenance?id=how-to-fix-an-expired-github-action-token) instructions with the following adjustments:
-> * the token required for the custom source plugin does not require additional scopes, which means you can skip step 2
+> * the token required for the module data does not require additional scopes, which means you can skip step 2
> * steps 4 and 5 should be performed in the [repository settings for actions] and in the [repository settings for dependabot] on the respective `MODULE_FETCH_GITHUB_TOKEN` secrets
[repository settings for actions]: https://github.com/MovingBlocks/movingblocks.github.com/settings/secrets/actions
[repository settings for dependabot]: https://github.com/MovingBlocks/movingblocks.github.com/settings/secrets/dependabot
-To build the website, run
-
-```sh
-yarn run build
-```
-
-To serve the website from a previous build, run
-
-```sh
-yarn run serve
-```
-
-To compile and serve a preview of the website that reflects your source code changes in the browser in real time, run
-
-```sh
-yarn run develop
-```
-
-To clean up built assets and caches, run
-
-```sh
-yarn run clean
-```
-
> To learn more about the project structure and working of the project please refer to our [docs](docs/project-structure.md).
diff --git a/astro.config.mjs b/astro.config.mjs
new file mode 100644
index 00000000..b885eeab
--- /dev/null
+++ b/astro.config.mjs
@@ -0,0 +1,17 @@
+// @ts-check
+import react from "@astrojs/react";
+import sitemap from "@astrojs/sitemap";
+import { defineConfig } from "astro/config";
+import blogAssets from "./src/integrations/blog-assets.ts";
+
+export default defineConfig({
+ site: "https://terasology.org",
+ integrations: [react(), sitemap(), blogAssets()],
+ image: {
+ // mentor avatars: trello.com attachment URLs redirect to signed files.trello.com URLs
+ remotePatterns: [
+ { protocol: "https", hostname: "trello.com" },
+ { protocol: "https", hostname: "files.trello.com" },
+ ],
+ },
+});
diff --git a/blog/2017-07-14-gsoc-2017-an-overview/index.md b/blog/2017-07-14-gsoc-2017-an-overview/index.md
index 0583ef09..88888c8f 100644
--- a/blog/2017-07-14-gsoc-2017-an-overview/index.md
+++ b/blog/2017-07-14-gsoc-2017-an-overview/index.md
@@ -3,7 +3,7 @@ posttype: "blog"
title: "GSOC 2017 - An Overview"
cover: "./cover.jpg"
description: "The first hurdle of Google Summer of Code is already over for our students, so it's about time to happily announce
-that all ten students have passed the first evaluation."
+ that all ten students have passed the first evaluation."
author: "Skaldarnar"
date: "2017-07-14"
tags: ["GSoC"]
diff --git a/blog/2021-07-31-terasaturday-15-a-summer-of-code/index.md b/blog/2021-07-31-terasaturday-15-a-summer-of-code/index.md
index 266a807c..e4f25355 100644
--- a/blog/2021-07-31-terasaturday-15-a-summer-of-code/index.md
+++ b/blog/2021-07-31-terasaturday-15-a-summer-of-code/index.md
@@ -70,9 +70,9 @@ We are happy to announce that all five students passed their halftime evaluation
Check out [TeraSpotlight: GSOC 2021 Halftime Show & Tell] to find out about the students' achievements over the past few weeks. Below are some canapΓ©s:




{formatDate(current.date)}
+- An open source voxel world - imagine the possibilities! -
-- The Terasology project was born from a Minecraft-inspired tech demo - in 2011. Over the years it has been a playground for different kinds - of technical experiments and proof of concepts. The community - strives to make Terasology a stable platform for various types of - gameplay settings in a voxel world. -
-- The project was founded in 2011 by {`Benjamin "Begla" Glatzel `} - while researching procedural terrain generation and effective - rendering techniques. He succeeded in creating a minecraft-like - demo engine, the foundation stone for what Terasology is today. -
-- We are always on the lookout for contributors with expertise in - rendering, networking and concurrency, as well as in-game - physics and AI technology. -
-- If you are interested in game engine development, come check out - our{" "} - - Terasology Engine & Module Land - - . -
-- From the ground up, Terasology was built to be very modular and - support different kinds of gameplay ideas. We still host a large - number of modules under the {`"Terasology" `}GitHub organization - providing basic and advanced gameplay content as well as world - generation options and technical libraries. -
-- Combining these modules allows to create very different kinds of - gameplay in our voxel worlds. The possibilities are manifold and - range from crafting- or trading-oriented survival over - capture-the-flag to puzzle-style experiences and tower defenses. -
-- We especially appreciate expertise or interest in UI/UX, world - generation or well-thought out gameplay mechanics, but also - always have an open ear for crazy ideas for existing or new - modules and gameplay content. -
-- If you are interested in gameplay development, come check out - our{" "} - - Terasology Engine & Module Land - - . -
-- The Terasology community is a diverse mix of software - developers, designers, game testers, graphic artists, musicians - and other open source loving {`"Gooeys"`}. We value a positive, - inclusive and respectful environment without harassment, attacks - or inappropriate activities of any form. -
-- We encourage and appreciate contributions from everybody, and - try to accept constructive criticism even by newcomers as - gracefully and warmly as possible. and welcoming as possible to - newcomers. -
-- If you want to talk to us or be the next in our group of Gooeys, - come join us on our{" "} - - Terasology Discord - - . -
-
+ )}
+ {name}
+ {message}
+{excerpt}
+ {author ? ( +