Skip to content

Commit

Permalink
Initialize VitePress
Browse files Browse the repository at this point in the history
- Add theme submodule
- Add initial configuration files
- Override theme-default VPHero/VPFooter with custom theme version
- Update README
  • Loading branch information
lifehackerhansol committed Sep 27, 2024
1 parent afcba54 commit 9446e21
Show file tree
Hide file tree
Showing 7 changed files with 2,424 additions and 28 deletions.
26 changes: 4 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
# Vim
*~
*.sw[p_]

# Sublime Text
*.sublime-project
*.sublime-workspace

# Ruby Gem
*.gem
.bundle
Gemfile.lock
**/vendor/bundle

# Node.js and NPM
node_modules
npm-debug.log*
package-lock.json
codekit-config.json

# VitePress
docs/.vitepress/cache
docs/.vitepress/dist

# macOS
.DS_Store

# Jekyll generated files
.jekyll-cache
.jekyll-metadata
.sass-cache
_asset_bundler_cache
_site

# torrent stuff
torrents
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/.vitepress/theme"]
path = docs/.vitepress/theme
url = https://github.com/hacks-guide/vitepress-theme
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ https://3ds.hacks.guide/
## Running the site locally

This requires the following installed on your system:
- ruby(-dev)
- bundler
- node.js

To test the website locally, clone the source code:

```sh
git clone https://github.com/hacks-guide/Guide_3DS --recurse-submodules
cd Guide_3DS
Expand All @@ -19,9 +19,8 @@ cd Guide_3DS
Then simply run the following commands:

```sh
bundle config set --local path vendor/bundle
bundle install
bundle exec jekyll serve
npm ci
npm run docs:dev
```

The website should now be running on http://127.0.0.1:4000/.
The website should now be running on http://127.0.0.1:5173/ (or a port shown on the terminal).
30 changes: 30 additions & 0 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Copyright (C) 2024 Nintendo Homebrew
SPDX-License-Identifier: MIT
*/

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vitepress'

export default defineConfig({
title: "3DS Hacks Guide",
description: "A complete guide to 3DS custom firmware",
vite: {
resolve: {
alias: [
{
find: /^.*\/VPHero\.vue$/,
replacement: fileURLToPath(
new URL('./theme/components/VPHero.vue', import.meta.url)
)
},
{
find: /^.*\/VPFooter\.vue$/,
replacement: fileURLToPath(
new URL('./theme/components/VPFooter.vue', import.meta.url)
)
}
]
}
},
})
1 change: 1 addition & 0 deletions docs/.vitepress/theme
Submodule theme added at 798ac6
Loading

0 comments on commit 9446e21

Please sign in to comment.