Skip to content

docs: migrate website to vitepress #2359

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

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9bf22b1
docs: migrate website to vitepress
vmaerten Jul 24, 2025
2863d1e
remove old website
vmaerten Aug 7, 2025
7e531ad
remove old website
vmaerten Aug 7, 2025
220e2ad
remove check doc and check schema
vmaerten Aug 7, 2025
e4f4a32
fix taskfile
vmaerten Aug 8, 2025
f8e3e7a
remove todo
vmaerten Aug 8, 2025
7ba31d0
Apply suggestions from code review
vmaerten Aug 8, 2025
9815ed8
Update website/.vitepress/config.ts
vmaerten Aug 8, 2025
97b57b1
fix vitest => task
vmaerten Aug 8, 2025
1b700ed
add cleanUrls
vmaerten Aug 8, 2025
378a0c0
remove context
vmaerten Aug 8, 2025
6cd893e
fix: deploy needs build
vmaerten Aug 8, 2025
2601c0e
fix url
vmaerten Aug 8, 2025
7628e29
fix donate
vmaerten Aug 8, 2025
3c995f5
fix emoji
vmaerten Aug 8, 2025
9b6004f
add prettier
vmaerten Aug 8, 2025
c59da79
french to english
vmaerten Aug 8, 2025
98624f5
config prettier
vmaerten Aug 8, 2025
3acbfd9
formatting
vmaerten Aug 8, 2025
b8ede79
add link
vmaerten Aug 8, 2025
af2060e
fix custom container formatting
vmaerten Aug 8, 2025
50d9b78
apply prettier
vmaerten Aug 8, 2025
79ef2eb
remove .md
vmaerten Aug 8, 2025
f939221
add experiment template
vmaerten Aug 8, 2025
294d6ac
update contributing
vmaerten Aug 8, 2025
8cbf791
add icon on custom container
vmaerten Aug 8, 2025
cbc6213
remove emoji
vmaerten Aug 8, 2025
051be29
update contributing
vmaerten Aug 8, 2025
0452184
rework link
vmaerten Aug 8, 2025
0c75243
rework templating
vmaerten Aug 8, 2025
9029ba2
fix changelog
vmaerten Aug 8, 2025
a4946c0
remove <code>
vmaerten Aug 8, 2025
fec41dd
docs: usage, fix wrong taskfile
vmaerten Aug 8, 2025
41a1b3b
Update website/Taskfile.yml
vmaerten Aug 9, 2025
472c8a7
docs: small adjustment to donate page
andreynering Aug 9, 2025
cc400d5
docs(maintainers): add country flags
andreynering Aug 9, 2025
e277aba
docs(maintainers): add more socials
andreynering Aug 9, 2025
8c58ffe
chore: sync `team.ts` with `team.md`
andreynering Aug 9, 2025
3ee1aef
fix(author-card): fix socials for the wrong index being rendered
andreynering Aug 9, 2025
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
31 changes: 0 additions & 31 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,3 @@ jobs:

- name: check-jsonschema (metaschema)
run: check-jsonschema --check-metaschema website/static/schema.json
check_doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v46
with:
files: website/versioned_docs/**

- uses: actions/github-script@v7
if: steps.changed-files-specific.outputs.any_changed == 'true'
with:
script: |
core.setFailed('website/versioned_docs has changed. Instead you need to update the docs in the website/docs folder.')
check_schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v46
with:
files: |
website/static/schema.json
website/static/schema-taskrc.json
- uses: actions/github-script@v7
if: steps.changed-files-specific.outputs.any_changed == 'true'
with:
script: |
core.setFailed('schema.json or schema-taskrc.json has changed. Instead you need to update next-schema.json or next-schema-taskrc.json.')
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ jobs:
with:
go-version: 1.24.x

- name: Install Task
uses: arduino/setup-task@v2

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand All @@ -28,3 +40,9 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GH_PAT}}
GORELEASER_KEY: ${{secrets.GORELEASER_KEY}}

- name: Deploy Website
shell: bash
run: |
task website:deploy
39 changes: 2 additions & 37 deletions cmd/release/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,14 @@ import (
"time"

"github.com/Masterminds/semver/v3"
"github.com/otiai10/copy"
"github.com/spf13/pflag"

"github.com/go-task/task/v3/errors"
)

const (
changelogSource = "CHANGELOG.md"
changelogTarget = "website/docs/changelog.mdx"
docsSource = "website/docs"
docsTarget = "website/versioned_docs/version-latest"
schemaSource = "website/static/next-schema.json"
schemaTarget = "website/static/schema.json"
schemaTaskrcSource = "website/static/next-schema-taskrc.json"
schemaTaskrcTarget = "website/static/schema-taskrc.json"
changelogSource = "CHANGELOG.md"
changelogTarget = "website/docs/changelog.md"
)

var (
Expand Down Expand Up @@ -83,14 +76,6 @@ func release() error {
return err
}

if err := docs(); err != nil {
return err
}

if err := schema(); err != nil {
return err
}

return nil
}

Expand Down Expand Up @@ -173,23 +158,3 @@ func setJSONVersion(fileName string, version *semver.Version) error {
// Write the JSON file
return os.WriteFile(fileName, []byte(new), 0o644)
}

func docs() error {
if err := os.RemoveAll(docsTarget); err != nil {
return err
}
if err := copy.Copy(docsSource, docsTarget); err != nil {
return err
}
return nil
}

func schema() error {
if err := copy.Copy(schemaSource, schemaTarget); err != nil {
return err
}
if err := copy.Copy(schemaTaskrcSource, schemaTaskrcTarget); err != nil {
return err
}
return nil
}
18 changes: 3 additions & 15 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader
i18n

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vitepress/cache
.vitepress/dist
.task/
Empty file removed website/.nojekyll
Empty file.
1 change: 1 addition & 0 deletions website/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
5 changes: 5 additions & 0 deletions website/.vitepress/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue';
const component: DefineComponent<{}, {}, any>;
export default component;
}
97 changes: 97 additions & 0 deletions website/.vitepress/components/AuthorCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<template>
<div class="author-compact" v-if="author">
<img :src="author.avatar" :alt="author.name" class="author-avatar" />
<div class="author-info">
<div class="author-name-line">
<span class="author-name">{{ author.name }}</span>

<div class="author-socials">
<a
v-for="{ link, icon } in author.links"
:key="link"
:href="link"
target="_blank"
class="social-link"
>
<span :class="`vpi-social-${icon}`"></span>
</a>
</div>
</div>
<span class="author-bio">{{ author.title }}</span>
</div>
</div>
</template>

<script setup>
import { team } from '../team.ts';
import { computed } from 'vue';
const props = defineProps({
author: String
});

const author = computed(() => {
return team.find((m) => m.slug === props.author) || null;
});
</script>

<style scoped>
.author-compact {
display: flex;
align-items: center;
gap: 0.75rem;
margin: 1.5rem 0;
}

.author-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
object-fit: cover;
}

.author-info {
display: flex;
flex-direction: column;
gap: 0.1rem;
flex: 1;
}

.author-name-line {
display: flex;
align-items: center;
gap: 0.75rem;
}

.author-name {
font-weight: 600;
color: var(--vp-c-text-1);
font-size: 0.95rem;
}

.author-bio {
color: var(--vp-c-text-2);
font-size: 0.85rem;
}

.author-socials {
display: flex;
gap: 0.5rem;
}

.social-link {
color: var(--vp-c-text-2);
transition: color 0.2s;
display: flex;
align-items: center;
}

.social-link:hover {
color: var(--vp-c-brand-1);
}

@media (max-width: 768px) {
.author-compact {
margin-bottom: 1rem;
}
}
</style>
Loading
Loading