Skip to content

Commit

Permalink
Port website from Hugo to Astro (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum committed Dec 15, 2024
1 parent d7ed70a commit 6f637a2
Show file tree
Hide file tree
Showing 494 changed files with 10,702 additions and 4,025 deletions.
4 changes: 0 additions & 4 deletions .devcontainer/devcontainer.json

This file was deleted.

7 changes: 1 addition & 6 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Hugo setup
uses: peaceiris/[email protected]
with:
hugo-version: 0.134.2
extended: true
- name: NPM install
run: npm ci
- name: Build
Expand All @@ -27,5 +22,5 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./dist
cname: maplibre.org
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Hugo setup
uses: peaceiris/[email protected]
with:
hugo-version: 0.134.2
extended: true
- name: NPM install
run: npm ci
- name: Build
Expand Down
34 changes: 18 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# Generated files by hugo
.DS_Store
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
# build output
dist/

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux
# generated types
.astro/

# Temporary lock file while building
/.hugo_build.lock
# dependencies
node_modules/

node_modules
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

static/files
# environment variables
.env
.env.production

public
# macOS-specific files
.DS_Store

.hugo
# jetbrains setting folder
.idea/
16 changes: 2 additions & 14 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Temporary lock file while building
/.hugo_build.lock

/dist/
/.astro
node_modules

static/files

public

render-heading.html
layouts/_default/_markup/render-link.html
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

12 changes: 12 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
17 changes: 0 additions & 17 deletions .vscode/tasks.json

This file was deleted.

36 changes: 12 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,23 @@ Features:

- News and blog posts can be published
- External dependencies are handled via NPM
- Hugo is bundling the CSS and JS

## Building
## 🧞 Commands

1. [Install Hugo](https://gohugo.io/getting-started/installing/), which meets the version requirement `>=v0.97.3+extended` (the `+extended` indicates that the "extended" version of Hugo is required).
Alternative: If Hugo is not available in a recent version on your platform, then use the wrapper script `./hugow --get-extended`.
2. Run `npm install` to setup the dependencies
3. Run `npm run serve` or `./hugow --get-extended serve`
4. Open the URL which is printed in the terminal
All commands are run from the root of the project, from a terminal:

After making any changes, make sure to run `npm run format` and `npm run format-check`.

## Building for Production

In order to build the website run `npm run build`. The built website is available in `public/`.

## maplibre-rs weekly

In order to create a news post for maplibre-rs do the following:

```bash
HUGO_SINCE=2022-05-26 hugo new -k maplibre-rs-news news/2022-05-23-maplibre-rs-weekly.md
```

This will fetch the last weeks issues and PRs and prepare a post for you.
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## MapLibre community map

The data for https://maplibre.org/community/ is managed at `data/community.json`.
The data for https://maplibre.org/community/ is managed at `src/content/community.json`.
It shows a map of the MapLibre community members.

The map shows contributors to MapLibre projects as recorded in the public git committer history.
Expand All @@ -43,7 +31,7 @@ Location information was taken from people's public GitHub profiles.

### Please Add Me

If you would like to be included in the MapLibre community map, fork this repo, edit `data/community.json`, and make a pull request. Or just open an issue...
If you would like to be included in the MapLibre community map, fork this repo, edit `src/content/community.json`, and make a pull request. Or just open an issue...

### Please Remove Me

Expand Down
Empty file removed _index.md
Empty file.
5 changes: 0 additions & 5 deletions archetypes/default.md

This file was deleted.

35 changes: 0 additions & 35 deletions archetypes/maplibre-rs-news.md

This file was deleted.

3 changes: 0 additions & 3 deletions assets/devicon/android.svg

This file was deleted.

3 changes: 0 additions & 3 deletions assets/devicon/apple.svg

This file was deleted.

3 changes: 0 additions & 3 deletions assets/devicon/typescript.svg

This file was deleted.

Loading

0 comments on commit 6f637a2

Please sign in to comment.