-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite website in Vitepress + Blog post (#6)
- Loading branch information
Showing
138 changed files
with
3,415 additions
and
10,400 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,47 @@ | ||
name: Docs | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
push: | ||
branches: [master] | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
checks: | ||
if: github.event_name != 'push' | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
- name: Test Build | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run docs:build | ||
- name: Copy assets contents | ||
run: | | ||
if [ -e yarn.lock ]; then | ||
yarn install --frozen-lockfile | ||
elif [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
fi | ||
npm run build | ||
gh-release: | ||
if: github.event_name != 'pull_request' | ||
cp .nojekyll .vitepress/dist/ | ||
- name: Fix permissions | ||
run: | | ||
chmod -c -R +rX "./vitepress/dist/" | while read line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: .vitepress/dist/ | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
needs: build | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
- name: Build | ||
run: | | ||
cd website | ||
if [ -e yarn.lock ]; then | ||
yarn install --frozen-lockfile | ||
elif [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
fi | ||
npm run build | ||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: website/build | ||
repository-name: naoTimesdev/website | ||
clean: true | ||
ssh-key: ${{ secrets.GH_PAGES_DEPLOY }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,5 @@ website/i18n/**/* | |
#!website/i18n/fr/**/* | ||
|
||
.netlify | ||
.vitepress/dist/ | ||
.vitepress/cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,265 @@ | ||
import { DefaultTheme, defineConfig } from 'vitepress' | ||
|
||
function sidebarDocs(): DefaultTheme.SidebarItem[] { | ||
return [ | ||
{ | ||
text: 'Selamat Datang', | ||
link: '/docs/', | ||
collapsed: false, | ||
}, | ||
{ | ||
text: 'Perintah Bot', | ||
link: '/docs/perintah/', | ||
collapsed: false, | ||
items: [ | ||
{ | ||
text: 'Animanga, VN, dan VTuber', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'Anime & Manga', link: '/docs/perintah/anivn/animanga' }, | ||
{ text: 'Visual Novel', link: '/docs/perintah/anivn/vn' }, | ||
{ text: 'VTuber', link: '/docs/perintah/anivn/vtuber' } | ||
] | ||
}, | ||
{ | ||
text: 'NSFW', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'nH', link: '/docs/perintah/bahaya/nh' }, | ||
{ text: 'ImageBooru', link: '/docs/perintah/bahaya/imagebooru' }, | ||
] | ||
}, | ||
{ | ||
text: '"Fun"', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'Info Peladen dan User', link: '/docs/perintah/fun/info' }, | ||
{ text: 'Tanya Bot', link: '/docs/perintah/fun/tanya' }, | ||
{ text: 'Random', link: '/docs/perintah/fun/random' }, | ||
{ text: 'Reaksi Kustom', link: '/docs/perintah/fun/reaksi' }, | ||
{ text: 'Pengingat', link: '/docs/perintah/fun/pengingat' }, | ||
] | ||
}, | ||
{ | ||
text: 'Kutubuku', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'KBBI dan Tesaurus', link: '/docs/perintah/kutubuku/kbbi' }, | ||
{ text: 'Antonim dan Sinonim', link: '/docs/perintah/kutubuku/kateglo' }, | ||
{ text: 'Padanan Kata', link: '/docs/perintah/kutubuku/padanan' }, | ||
{ text: 'Merriam Webster', link: '/docs/perintah/kutubuku/webster' }, | ||
{ text: 'Jisho', link: '/docs/perintah/kutubuku/jisho' }, | ||
{ text: 'Translasi', link: '/docs/perintah/kutubuku/translasi' }, | ||
{ text: 'Matematika', link: '/docs/perintah/kutubuku/matematika' }, | ||
] | ||
}, | ||
{ | ||
text: 'Moderasi', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'Automoderasi', link: '/docs/perintah/mod/automod' }, | ||
{ text: 'Kanal', link: '/docs/perintah/mod/kanal' }, | ||
{ text: 'Pesan', link: '/docs/perintah/mod/pesan' }, | ||
{ text: 'Pengguna', link: '/perintah/mod/pengguna' }, | ||
{ text: 'Utas atau Thread', link: '/docs/perintah/mod/thread' }, | ||
{ text: 'Pencatatan Peladen', link: '/docs/perintah/mod/log' }, | ||
] | ||
}, | ||
{ | ||
text: 'Peninjau Website', | ||
link: '/docs/perintah/peninjau/', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'Anibin', link: '/docs/perintah/peninjau/anibin' }, | ||
{ text: 'Cuaca', link: '/docs/perintah/peninjau/cuaca' }, | ||
{ text: 'Kurs Mata Uang', link: '/docs/perintah/peninjau/kurs' }, | ||
{ text: 'Pencari Saus', link: '/docs/perintah/peninjau/saus' }, | ||
] | ||
}, | ||
{ | ||
text: 'Moderasi', | ||
collapsed: false, | ||
items: [ | ||
{ text: 'Introduksi', link: '/docs/perintah/mod/intro' }, | ||
{ text: 'Pengunjung', link: '/docs/perintah/mod/user' }, | ||
{ text: 'Staf', link: '/docs/perintah/mod/staff' }, | ||
{ text: 'Administrasi', link: '/perintah/mod/admin' }, | ||
{ text: 'Alias', link: '/docs/perintah/mod/alias' }, | ||
{ text: 'Kolaborasi', link: '/docs/perintah/mod/kolaborasi' }, | ||
] | ||
}, | ||
{ | ||
text: 'Musik', | ||
link: '/docs/perintah/musik/', | ||
collapsed: true, | ||
items: [ | ||
{ text: 'Perintah', link: '/docs/perintah/musik/cmd' }, | ||
] | ||
}, | ||
{ | ||
text: 'FansubRSS', | ||
link: '/docs/perintah/fansubrss', | ||
collapsed: false, | ||
}, | ||
{ | ||
text: 'Voting dan Giveaway', | ||
link: '/docs/perintah/vote', | ||
collapsed: false, | ||
} | ||
] | ||
}, | ||
{ | ||
text: 'Integrasi', | ||
collapsed: false, | ||
items: [ | ||
{ | ||
text: 'naoTimes WebUI', | ||
link: '/docs/integrasi/naotimesui', | ||
}, | ||
{ | ||
text: 'Status Proyek di Website', | ||
link: '/docs/integrasi/website', | ||
} | ||
] | ||
}, | ||
{ | ||
text: 'Referensi', | ||
collapsed: false, | ||
items: [ | ||
{ | ||
text: 'Time String Format', | ||
link: '/docs/referensi/timestring', | ||
} | ||
] | ||
}, | ||
{ | ||
text: 'Self-Hosting', | ||
collapsed: false, | ||
items: [ | ||
{ | ||
text: 'Introduksi', | ||
link: '/docs/selfhost/', | ||
}, | ||
{ | ||
text: 'Preparasi', | ||
link: '/docs/selfhost/prepare', | ||
}, | ||
{ | ||
text: 'Setup Bot', | ||
link: '/docs/selfhost/setup', | ||
} | ||
] | ||
}, | ||
{ | ||
text: 'Kredit', | ||
link: '/docs/credits', | ||
collapsed: false, | ||
}, | ||
{ | ||
text: 'Perubahan', | ||
link: '/docs/changelog', | ||
collapsed: false, | ||
} | ||
] | ||
} | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "naoTimes", | ||
description: "Bot berbahasa Indonesia untuk membantu tracking garapan fansubber", | ||
lastUpdated: true, | ||
metaChunk: true, | ||
cleanUrls: true, | ||
|
||
sitemap: { | ||
hostname: 'https://naoti.me', | ||
}, | ||
|
||
head: [ | ||
['link', { rel: 'icon', type: 'image/png', href: '/assets/img/nt32.png' }], | ||
['meta', { name: 'theme-color', content: '#fd8455' }], | ||
['meta', { property: 'og:type', content: 'website' }], | ||
['meta', { property: 'og:locale', content: 'en' }], | ||
['meta', { property: 'og:title', content: 'naoTimes' }], | ||
['meta', { property: 'og:site_name', content: 'naoTimes' }], | ||
['meta', { property: 'og:image', content: 'https://naoti.me/assets/img/nt256.png' }], | ||
['meta', { property: 'og:url', content: 'https://naoti.me/' }], | ||
['script', { src: 'https://tr.n4o.xyz/js/plausible.js', async: '', defer: '', 'data-domain': 'naoti.me' }] | ||
], | ||
|
||
themeConfig: { | ||
logo: { | ||
src: '/assets/img/nt256.png', | ||
width: 24, | ||
height: 24, | ||
}, | ||
|
||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: 'Invite', link: '/invite', activeMatch: '/invite/' }, | ||
{ text: 'Dokumentasi', link: '/docs', activeMatch: '^/docs/' }, | ||
{ text: 'Blog', link: '/blog', activeMatch: '^/blog' }, | ||
{ | ||
text: 'Tentang', | ||
items: [ | ||
{ | ||
text: 'Tentang Kami', | ||
link: '/tentang', | ||
}, | ||
{ | ||
text: 'Kebijakan Privasi', | ||
link: '/privasi', | ||
}, | ||
{ | ||
text: 'Syarat dan Ketentuan', | ||
link: '/terms', | ||
}, | ||
{ | ||
text: 'Kontak', | ||
link: '/kontak', | ||
}, | ||
{ | ||
text: 'Donasi', | ||
link: '/donasi', | ||
noIcon: true, | ||
}, | ||
{ | ||
text: 'Status', | ||
link: 'https://status.n4o.xyz/status/naotimes', | ||
rel: 'noopener noreferrer', | ||
target: '_blank', | ||
} | ||
] | ||
}, | ||
], | ||
|
||
sidebar: { | ||
'/docs/': sidebarDocs(), | ||
'/blog/': { base: '/blog/', items: [] }, | ||
}, | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/naoTimesdev', ariaLabel: 'GitHub' }, | ||
{ icon: 'discord', link: 'https://discord.gg/7KyYecn', ariaLabel: 'Discord' }, | ||
// { icon: 'donate', link: '/donasi', ariaLabel: 'Donasi' } | ||
], | ||
|
||
footer: { | ||
message: 'Dibuat dengan ❤️ oleh tim naoTimes', | ||
copyright: 'Copyright © 2021-present naoTimes Dev', | ||
} | ||
}, | ||
|
||
srcExclude: [ | ||
'**/node_modules/**', | ||
'**/.git/**', | ||
'**/.vitepress/**', | ||
'**/.github/**', | ||
'**/website/**', | ||
|
||
// Custom made one | ||
'**/privacy/**', | ||
'**/terms/**', | ||
'README.md', | ||
], | ||
}) |
Oops, something went wrong.