Skip to content

Commit

Permalink
Merge pull request #29 from LethalCompany/vitepress-migration
Browse files Browse the repository at this point in the history
Migrate framework to VitePress
  • Loading branch information
legoandmars authored Dec 16, 2023
2 parents d2a1db6 + 26f55e5 commit eed46e8
Show file tree
Hide file tree
Showing 69 changed files with 2,863 additions and 5,590 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Wiki CI
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches-ignore:
- cwdin-backups
- 'crowdin/**'

env:
NODE_VERSION: 18.x

jobs:
deploy:
name: Deploy
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install packages
run: npm ci
- name: Build
run: npm run build
- name: Configure GitHub Pages
uses: actions/configure-pages@v2
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
- name: Deploy Wiki
id: deployment
uses: actions/deploy-pages@v1
132 changes: 132 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,134 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vitepress build output
docs/.vitepress/dist
docs/.vitepress/cache

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

_site/
.jekyll-cache/
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,33 @@ This guide is a fork of [trombone.wiki](https://trombone.wiki).

## Developer Guide

[Docsify Guide](https://docsify.js.org/#/quickstart)
To run locally:
[Vitepress Guide](https://vitepress.dev/guide/getting-started)

To install dependencies:
```
npm i
```

Run a preview of the wiki locally:
```
npm run dev
```

Build the wiki into `docs/.vitepress/dist`:
```
docsify serve
```
npm run build
```

## Licensing / Credits

This wiki contains content from the following wikis, and would not be possible without contributions from them:
- [trombone.wiki](https://github.com/tc-mods/TromboneChampModdingWiki)
- [Gorilla Tag Modding Guide](https://github.com/burritosoftware/GorillaTag-Modding-Guide)
- [bsmg.wiki](https://github.com/bsmg/wiki)

The content of this wiki is licensed under the [ISC License](https://github.com/LethalCompany/ModdingWiki/blob/master/LICENSE.md).

Vitepress wiki build pages are based on [bsmg.wiki](https://bsmg.wiki), which is licensed under the [MIT LICENSE](https://github.com/bsmg/wiki/blob/master/LICENSE).

Some content on the pages `beginners-guide.md` and `index.md` are based on the content of [bsmg.wiki](https://bsmg.wiki), which is licensed under the [Creative Commons BY-NC-SA 4.0 License](https://github.com/bsmg/wiki/blob/master/wiki/LICENSE).

40 changes: 40 additions & 0 deletions docs/.vitepress/components/Home.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- Based on https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/components/VPFeatures.vue -->
<template>
<div class="VPFeatures">
<div class="container">
<div class="items">
<slot />
</div>
</div>
</div>
</template>

<style scoped>
.VPFeatures {
position: relative;
padding: 0 24px;
}

@media (min-width: 640px) {
.VPFeatures {
padding: 0 48px;
}
}

@media (min-width: 960px) {
.VPFeatures {
padding: 0 64px;
}
}

.container {
margin: 0 auto;
max-width: 1152px;
}

.items {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
</style>
109 changes: 109 additions & 0 deletions docs/.vitepress/components/HomeGroup.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<script setup lang="ts">
defineProps<{
title: string
}>()
</script>

<template>
<div class="item">
<div class="VPFeature" :no-icon="true">
<article class="box">
<h2 class="title" v-html="title"></h2>
<ul class="details">
<slot />
</ul>
</article>
</div>
</div>
</template>

<style scoped>
.item {
width: 100%;
padding: 8px;
}
@media (min-width: 960px) {
.item {
width: calc(100% / 3);
}
}
.VPFeature {
display: block;
border: 1px solid var(--vp-c-bg-soft);
border-radius: 12px;
height: 100%;
background-color: var(--vp-c-bg-soft);
transition:
border-color 0.25s,
background-color 0.25s;
height: fit-content;
}
.VPFeature.link:hover {
border-color: var(--vp-c-brand);
background-color: var(--vp-c-bg-soft-up);
}
.box {
display: flex;
flex-direction: column;
padding: 24px;
height: 100%;
}
.VPFeature:deep(.VPImage) {
width: 48px;
height: 48px;
margin-bottom: 20px;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
border-radius: 6px;
background-color: var(--vp-c-bg-soft-down);
width: 48px;
height: 48px;
font-size: 24px;
transition: background-color 0.25s;
}
.title {
line-height: 24px;
font-size: 16px;
font-weight: 600;
}
.details {
flex-grow: 1;
padding-top: 8px;
line-height: 24px;
font-size: 14px;
font-weight: 500;
color: var(--vp-c-text-2);
}
.link-text {
padding-top: 8px;
}
.link-text-value {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 500;
color: var(--vp-c-brand);
}
.link-text-icon {
display: inline-block;
margin-left: 6px;
width: 14px;
height: 14px;
fill: currentColor;
}
</style>
22 changes: 22 additions & 0 deletions docs/.vitepress/components/HomeItem.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script setup lang="ts">
defineProps<{
name: string
href: string
}>()
</script>

<template>
<li>
<a :href="href">{{ name }}</a>
</li>
</template>

<style scoped>
a {
transition: color 0.25s;
}
a:hover {
color: var(--vp-c-brand);
}
</style>
Loading

0 comments on commit eed46e8

Please sign in to comment.