Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Mar 31, 2024
1 parent 1a13ff7 commit 6a44c30
Show file tree
Hide file tree
Showing 82 changed files with 4,198 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/docs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
112 changes: 112 additions & 0 deletions packages/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-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

# node-waf configuration
.lock-wscript

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

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# pnpm link folder
pnpm-global

# dotenv environment variables file
.env
.env.test

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

# rollup.js default build output
dist/

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

# Serverless directories
.serverless/

# Temporary folders
tmp/
temp/
TODOs.md
src/api/index.json
src/examples/data.json
src/tutorial/data.json
draft.md
6 changes: 6 additions & 0 deletions packages/docs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 75
}
75 changes: 75 additions & 0 deletions packages/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { defineConfig } from 'vitepress'
import { zhConfig } from './config/zh'

export default defineConfig({
srcDir: 'src',
appearance: false,
locales: {
root: {
label: '中文简体',
lang: 'zh-CN', // optional, will be added as `lang` attribute on `html` tag
...zhConfig
},
},
head: [
[
'meta',
{
name: 'keywords',
content: 'hexo,nexmoe,theme,blog,beautiful,simple'
}
],
[
'link',
{
rel: 'shortcut icon',
type: 'image/x-icon',
sizes: '32x32',
href: `/favicon.ico`
}
],
[
'script',
{
src: 'https://www.googletagmanager.com/gtag/js?id=G-HG5GSWYXHL',
async: 'true'
}
],
['script', { src: '/gtag.js' }],
[
'script',
{
async: 'true',
crossorigin: 'anonymous',
src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2058306854838448'
}
]
],

themeConfig: {
search: {
provider: 'local',
options: {
_render(src, env, md) {
const html = md.render(src, env)
if (env.frontmatter?.search === false) return ''
if (!env.relativePath.startsWith('v4.2')) return ''
return html
}
}
},

socialLinks: [
{ icon: 'twitter', link: 'https://twitter.com/nexmoe' },
{
icon: 'github',
link: 'https://github.com/theme-nexmoe/hexo-theme-nexmoe'
}
],

editLink: {
pattern:
'https://github.com/theme-nexmoe/hexo-theme-nexmoe/edit/master/packages/docs/src/:path'
}
}
})
120 changes: 120 additions & 0 deletions packages/docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'

const ogUrl = 'https://docs.nexmoe.com/'
const ogDescription = '🔥 A rather special Hexo theme'
const ogLogo = '/icon.svg'

export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
title: 'Hexo Theme Nexmoe',
titleTemplate: '🔥 A rather special Hexo theme',
description: ogDescription,
head: [
['meta', { property: 'og:url', content: ogUrl }],
['meta', { property: 'og:description', content: ogDescription }]
],

themeConfig: {
nav: [
{
text: 'Quick Start',
link: '/v4.0/',
activeMatch: `^/v4.0/`
},
{
text: 'Version',
items: [
{
text: 'v4.0',
link: '/v4.0/',
activeMatch: `^/v4.0/`
},
{
text: 'v3.2',
link: '/v3.2/',
activeMatch: `^/v3.2/`
}
]
}
],
sidebar: {
'/v4.0/': [
{
items: [
{
text: 'Quick Start',
link: '/v4.0/'
},
{
text: 'FAQ',
link: '/v4.0/faq'
}
]
},
{
text: 'Theme Config',
items: [
{
text: 'yml',
link: '/v4.0/config/yml'
},
{
text: 'Slot',
link: '/v4.0/config/slot'
},
{
text: 'Style',
link: '/v4.0/config/style'
}
/*
{
text: 'Icon',
link: '/v4.0/config/icon'
},
{
text: 'Search',
link: '/v4.0/config/search'
}
*/
]
},
{
text: 'Posts & Pages',
items: [
{
text: 'Front-matter',
link: '/v4.0/post/front-matter'
},
// {
// text: "Archive",
// link: "/v4.0/article/archive",
// },
// {
// text: "Cover",
// link: "/v4.0/article/cover",
// },
{
text: 'Gallery',
link: '/v4.0/post/gallery'
},
{
text: 'Gallery Pro',
link: '/v4.0/post/gallery_pro'
},
{
text: 'Links',
link: '/v4.0/post/links'
}
]
},
{
items: [
{
text: 'Contribution',
link: '/v4.0/contribution'
}
]
}
]
}
}
}
Loading

0 comments on commit 6a44c30

Please sign in to comment.