backup
This commit is contained in:
parent
fb32b23ae8
commit
0b0cd0054c
20
.eslintrc.json
Normal file
20
.eslintrc.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
||||
"plugins": ["svelte3", "@typescript-eslint"],
|
||||
"ignorePatterns": ["*.cjs"],
|
||||
"overrides": [{ "files": ["*.svelte"], "processor": "svelte3/svelte3" }],
|
||||
"settings": {
|
||||
"svelte3/typescript": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 2019
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2017": true,
|
||||
"node": true
|
||||
}
|
||||
}
|
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
35
.github/CONTRIBUTING.md
vendored
Normal file
35
.github/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Contributing
|
||||
|
||||
Thanks for ur interest in contributing to Urara! Please take a moment to read this document before submitting a pull request.
|
||||
|
||||
## Pull requests
|
||||
|
||||
pls ask before u start working on any important new feature.
|
||||
|
||||
for minor features and bug fixes: I will accept them as long as I think the code quality is good enough.
|
||||
|
||||
### Commit message
|
||||
|
||||
This is not mandatory at this time, but pls use [gitmoji](https://gitmoji.dev) and [Conventional Commits](https://www.conventionalcommits.org) whenever possible.
|
||||
|
||||
### Check the code
|
||||
|
||||
Run this command to check the code:
|
||||
|
||||
```bash
|
||||
pnpm check
|
||||
```
|
||||
|
||||
In general, expect to see output like this:
|
||||
|
||||
```text
|
||||
svelte-check found 0 errors, 0 warnings, and 0 hints
|
||||
```
|
||||
|
||||
### Format the code
|
||||
|
||||
run this command to format the code:
|
||||
|
||||
```bash
|
||||
pnpm format
|
||||
```
|
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
|
@ -1,7 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 20
|
24
.gitignore
vendored
Executable file → Normal file
24
.gitignore
vendored
Executable file → Normal file
|
@ -1,2 +1,24 @@
|
|||
# build output
|
||||
build
|
||||
static
|
||||
.svelte-kit
|
||||
.netlify
|
||||
.vercel
|
||||
|
||||
# dependencies
|
||||
node_modules
|
||||
.deploy_git
|
||||
|
||||
# env
|
||||
*.local
|
||||
|
||||
# logs
|
||||
pnpm-debug.log*
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# temp file
|
||||
src/routes/**/+page.svelte.md
|
||||
src/routes/**/+page.md
|
||||
*.config.js
|
||||
urara.js
|
7
.prettierignore
Normal file
7
.prettierignore
Normal file
|
@ -0,0 +1,7 @@
|
|||
.svelte-kit/**
|
||||
static/**
|
||||
build/**
|
||||
node_modules/**
|
||||
pnpm-lock.yaml
|
||||
.netlify/**
|
||||
.vercel_build_output/**
|
13
.prettierrc.json
Normal file
13
.prettierrc.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"printWidth": 128,
|
||||
"useTabs": false,
|
||||
"tabWidth": 2,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf",
|
||||
"arrowParens": "avoid",
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": true,
|
||||
"bracketSameLine": true,
|
||||
"htmlWhitespaceSensitivity": "ignore"
|
||||
}
|
3
.vscode/extensions.json
vendored
Normal file
3
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"recommendations": ["svelte.svelte-vscode", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
|
||||
}
|
10
.vscode/settings.json
vendored
Normal file
10
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"files.eol": "\n",
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
"css.lint.unknownAtRules": "ignore",
|
||||
"svelte.plugin.css.diagnostics.enable": false,
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
106
_config.yml
106
_config.yml
|
@ -1,106 +0,0 @@
|
|||
# Hexo Configuration
|
||||
## Docs: https://hexo.io/docs/configuration.html
|
||||
## Source: https://github.com/hexojs/hexo/
|
||||
|
||||
# Site
|
||||
title: Hubert's Blog
|
||||
subtitle:
|
||||
description:
|
||||
keywords:
|
||||
author: Hubert Chen
|
||||
language: zh-CN
|
||||
timezone: Asia/Shanghai
|
||||
|
||||
|
||||
url: https://trle5.tk/
|
||||
permalink: :year/:month/:day/:title/
|
||||
permalink_defaults:
|
||||
pretty_urls:
|
||||
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
|
||||
trailing_html: true # Set to false to remove trailing '.html' from permalinks
|
||||
|
||||
# Directory
|
||||
source_dir: source
|
||||
public_dir: public
|
||||
tag_dir: tag
|
||||
archive_dir: archives
|
||||
category_dir: categories
|
||||
code_dir: downloads/code
|
||||
i18n_dir: :lang
|
||||
skip_render:
|
||||
|
||||
# Writing
|
||||
new_post_name: :title.md # File name of new posts
|
||||
default_layout: post
|
||||
titlecase: false # Transform title into titlecase
|
||||
external_link:
|
||||
enable: true # Open external links in new tab
|
||||
field: site # Apply to the whole site
|
||||
exclude: ''
|
||||
filename_case: 0
|
||||
render_drafts: false
|
||||
post_asset_folder: true
|
||||
relative_link: false
|
||||
future: true
|
||||
highlight:
|
||||
enable: true
|
||||
line_number: true
|
||||
auto_detect: false
|
||||
tab_replace: ''
|
||||
wrap: true
|
||||
hljs: false
|
||||
prismjs:
|
||||
enable: false
|
||||
preprocess: true
|
||||
line_number: true
|
||||
tab_replace: ''
|
||||
|
||||
# Home page setting
|
||||
# path: Root path for your blogs index page. (default = '')
|
||||
# per_page: Posts displayed per page. (0 = disable pagination)
|
||||
# order_by: Posts order. (Order by date descending by default)
|
||||
index_generator:
|
||||
path: ''
|
||||
per_page: 5
|
||||
order_by: -date
|
||||
|
||||
# Category & Tag
|
||||
default_category: uncategorized
|
||||
category_map:
|
||||
tag_map:
|
||||
|
||||
# Metadata elements
|
||||
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
|
||||
meta_generator: true
|
||||
|
||||
# Date / Time format
|
||||
## Hexo uses Moment.js to parse and display date
|
||||
## You can customize the date format as defined in
|
||||
## http://momentjs.com/docs/#/displaying/format/
|
||||
date_format: YYYY-MM-DD
|
||||
time_format: HH:mm:ss
|
||||
## updated_option supports 'mtime', 'date', 'empty'
|
||||
updated_option: 'mtime'
|
||||
|
||||
# Pagination
|
||||
## Set per_page to 0 to disable pagination
|
||||
per_page: 10
|
||||
pagination_dir: page
|
||||
|
||||
# Include / Exclude file(s)
|
||||
## include:/exclude: options only apply to the 'source/' folder
|
||||
include:
|
||||
exclude:
|
||||
ignore:
|
||||
|
||||
# Extensions
|
||||
## Plugins: https://hexo.io/plugins/
|
||||
## Themes: https://hexo.io/themes/
|
||||
theme: Chic
|
||||
|
||||
# Deployment
|
||||
## Docs: https://hexo.io/docs/one-command-deployment
|
||||
deploy:
|
||||
type: git
|
||||
repository: https://github.com/interstellar750/interstellar750.github.io.git
|
||||
branch: hexo-chic-old
|
110
mdsvex.config.ts
Normal file
110
mdsvex.config.ts
Normal file
|
@ -0,0 +1,110 @@
|
|||
// mdsvex config type
|
||||
import type { MdsvexOptions } from 'mdsvex'
|
||||
|
||||
// rehype plugins
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
import rehypeExternalLinks from 'rehype-external-links'
|
||||
|
||||
// urara remark plugins
|
||||
import type { Node, Data } from 'unist'
|
||||
import { statSync } from 'fs'
|
||||
import { parse, join } from 'path'
|
||||
import { visit } from 'unist-util-visit'
|
||||
import { toString } from 'mdast-util-to-string'
|
||||
import Slugger from 'github-slugger'
|
||||
import remarkFootnotes from 'remark-footnotes'
|
||||
|
||||
// highlighter
|
||||
import { escapeSvelte } from 'mdsvex'
|
||||
import { lex, parse as parseFence } from 'fenceparser'
|
||||
import { renderCodeToHTML, runTwoSlash, createShikiHighlighter } from 'shiki-twoslash'
|
||||
type VALUE = { [key in string | number]: VALUE } | Array<VALUE> | string | boolean | number
|
||||
|
||||
const remarkUraraFm =
|
||||
() =>
|
||||
(tree: Node<Data>, { data, filename }: { data: { fm?: Record<string, unknown> }; filename?: string }) => {
|
||||
const filepath = (filename as string).split('/src/routes')[1]
|
||||
const { dir, name } = parse(filepath)
|
||||
if (!data.fm) data.fm = {}
|
||||
// Generate slug & path
|
||||
data.fm.slug = filepath
|
||||
data.fm.path = join(dir, `/${name}`.replace('/+page', '').replace('.svelte', ''))
|
||||
// Generate ToC
|
||||
if (data.fm.toc !== false) {
|
||||
const [slugs, toc]: [slugs: Slugger, toc: { depth: number; title: string; slug: string }[]] = [new Slugger(), []]
|
||||
visit(tree, 'heading', (node: { depth: number }) => {
|
||||
toc.push({
|
||||
depth: node.depth,
|
||||
title: toString(node),
|
||||
slug: slugs.slug(toString(node), false)
|
||||
})
|
||||
})
|
||||
data.fm.toc = toc
|
||||
}
|
||||
// Auto-read created & updated
|
||||
if (!data.fm.created || !data.fm.updated) {
|
||||
const { ctime, mtime } = statSync(new URL(`./urara${filepath}`, import.meta.url))
|
||||
if (!data.fm.created) data.fm.created = ctime
|
||||
if (!data.fm.updated) data.fm.updated = mtime
|
||||
}
|
||||
}
|
||||
|
||||
// Better type definitions needed
|
||||
const remarkUraraSpoiler = () => (tree: Node<Data>) =>
|
||||
visit(tree, 'paragraph', (node: any) => {
|
||||
const { children } = node
|
||||
const text = children[0].value
|
||||
const re = /\|\|(.{1,}?)\|\|/g
|
||||
if (re.test(children[0].value)) {
|
||||
children[0].type = 'html'
|
||||
children[0].value = text.replace(re, (_match: unknown, p1: string) => `<span class="spoiler">${p1}</span>`)
|
||||
}
|
||||
return node
|
||||
})
|
||||
|
||||
const defineConfig = (config: MdsvexOptions) => config
|
||||
|
||||
export default defineConfig({
|
||||
extensions: ['.svelte.md', '.md'],
|
||||
smartypants: {
|
||||
dashes: 'oldschool'
|
||||
},
|
||||
layout: {
|
||||
_: './src/lib/components/post_layout.svelte'
|
||||
},
|
||||
highlight: {
|
||||
highlighter: async (code, lang, meta) => {
|
||||
let fence: Record<string, VALUE> | null
|
||||
let twoslash: any
|
||||
try {
|
||||
fence = parseFence(lex([lang, meta].filter(Boolean).join(' ')))
|
||||
} catch (error) {
|
||||
throw new Error(`Could not parse the codefence for this code sample \n${code}`)
|
||||
}
|
||||
if (fence?.twoslash === true) twoslash = runTwoSlash(code, lang as string)
|
||||
return `{@html \`${escapeSvelte(
|
||||
renderCodeToHTML(
|
||||
code,
|
||||
lang as string,
|
||||
fence ?? {},
|
||||
{ themeName: 'material-default' },
|
||||
await createShikiHighlighter({ theme: 'material-default' }),
|
||||
twoslash
|
||||
)
|
||||
)}\` }`
|
||||
}
|
||||
},
|
||||
remarkPlugins: [remarkUraraFm, remarkUraraSpoiler, [remarkFootnotes, { inlineNotes: true }]],
|
||||
rehypePlugins: [
|
||||
rehypeSlug,
|
||||
[rehypeAutolinkHeadings, { behavior: 'wrap' }],
|
||||
[
|
||||
rehypeExternalLinks,
|
||||
{
|
||||
rel: ['nofollow', 'noopener', 'noreferrer', 'external'],
|
||||
target: '_blank'
|
||||
}
|
||||
]
|
||||
]
|
||||
})
|
8
netlify.toml
Normal file
8
netlify.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[build]
|
||||
command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm build"
|
||||
publish = "build"
|
||||
[build.environment]
|
||||
NPM_FLAGS = "--version"
|
||||
AWS_LAMBDA_JS_RUNTIME = "nodejs16.x"
|
||||
[functions]
|
||||
node_bundler = "esbuild"
|
4207
package-lock.json
generated
4207
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
95
package.json
95
package.json
|
@ -1,28 +1,75 @@
|
|||
{
|
||||
"name": "hexo-site",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"name": "urara",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"license": "WTFPL",
|
||||
"repository": "importantimport/urara",
|
||||
"homepage": "https://github.com/importantimport/urara",
|
||||
"bugs": "https://github.com/importantimport/urara/issues",
|
||||
"author": "藍+85CD",
|
||||
"scripts": {
|
||||
"build": "hexo generate",
|
||||
"clean": "hexo clean",
|
||||
"deploy": "hexo deploy",
|
||||
"server": "hexo server"
|
||||
"clean": "node urara.js clean",
|
||||
"tsc": "tsc -p tsconfig.node.json",
|
||||
"tsc:watch": "tsc -w -p tsconfig.node.json",
|
||||
"urara:build": "node urara.js build",
|
||||
"urara:watch": "node urara.js watch",
|
||||
"kit:dev": "cross-env NODE_OPTIONS=--max_old_space_size=7680 vite dev",
|
||||
"kit:build": "cross-env NODE_OPTIONS=--max_old_space_size=7680 vite build",
|
||||
"dev:parallel": "npm-run-all -p -r tsc:watch urara:watch \"kit:dev {@} \" --",
|
||||
"dev": "npm-run-all -s tsc \"dev:parallel {@} \" --",
|
||||
"build": "npm-run-all -s tsc urara:build kit:build clean",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
|
||||
"format": "prettier --write --plugin-search-dir=. ."
|
||||
},
|
||||
"hexo": {
|
||||
"version": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"hexo": "^6.3.0",
|
||||
"hexo-deployer-git": "^3.0.0",
|
||||
"hexo-generator-archive": "^1.0.0",
|
||||
"hexo-generator-category": "^1.0.0",
|
||||
"hexo-generator-index": "^2.0.0",
|
||||
"hexo-generator-tag": "^1.0.0",
|
||||
"hexo-renderer-ejs": "^2.0.0",
|
||||
"hexo-renderer-marked": "^5.0.0",
|
||||
"hexo-renderer-stylus": "^2.1.0",
|
||||
"hexo-server": "^3.0.0",
|
||||
"hexo-theme-landscape": "^0.0.3",
|
||||
"hexo-util": "^2.6.1"
|
||||
"devDependencies": {
|
||||
"@iconify-json/heroicons-outline": "^1.1.4",
|
||||
"@iconify-json/heroicons-solid": "^1.1.5",
|
||||
"@sveltejs/adapter-auto": "next",
|
||||
"@sveltejs/adapter-node": "next",
|
||||
"@sveltejs/adapter-static": "next",
|
||||
"@sveltejs/kit": "1.0.0-next.479",
|
||||
"@tailwindcss/typography": "^0.5.7",
|
||||
"@types/node": "^18.7.16",
|
||||
"@types/unist": "^2.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"chalk": "^5.0.1",
|
||||
"chokidar": "^3.5.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"cssnano": "^5.1.13",
|
||||
"daisyui": "^2.25.0",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-svelte3": "^4.0.0",
|
||||
"fenceparser": "2.0.0",
|
||||
"fff-flavored-frontmatter": "~0.2.2",
|
||||
"github-slugger": "^1.4.0",
|
||||
"mdast-util-to-string": "^3.1.0",
|
||||
"mdsvex": "^0.10.6",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^8.4.16",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-svelte": "^2.7.0",
|
||||
"rehype-autolink-headings": "^6.1.1",
|
||||
"rehype-external-links": "^1.0.1",
|
||||
"rehype-slug": "^5.0.1",
|
||||
"remark": "^14.0.2",
|
||||
"remark-footnotes": "~2.0.0",
|
||||
"shiki-twoslash": "^3.1.0",
|
||||
"svelte": "^3.50.1",
|
||||
"svelte-check": "^2.9.0",
|
||||
"svelte-preprocess": "^4.10.7",
|
||||
"tailwindcss": "^3.1.8",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "^4.8.3",
|
||||
"unist-util-visit": "^4.1.1",
|
||||
"unocss": "^0.45.18",
|
||||
"vite": "^3.1.0",
|
||||
"vite-plugin-pwa": "^0.12.7",
|
||||
"workbox-window": "^6.5.4"
|
||||
}
|
||||
}
|
||||
}
|
6562
pnpm-lock.yaml
Normal file
6562
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -1,251 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="author" content="Hubert Chen">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<title>Hello World | Hubert's Blog</title>
|
||||
|
||||
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- stylesheets list from _config.yml -->
|
||||
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- scripts list from _config.yml -->
|
||||
|
||||
<script src="/js/script.js"></script>
|
||||
|
||||
<script src="/js/tocbot.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="generator" content="Hexo 6.2.0"></head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// this function is used to check current theme before page loaded.
|
||||
(() => {
|
||||
const currentTheme = window.localStorage && window.localStorage.getItem('theme') || '';
|
||||
const isDark = currentTheme === 'dark';
|
||||
const pagebody = document.getElementsByTagName('body')[0]
|
||||
if (isDark) {
|
||||
pagebody.classList.add('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Dark"
|
||||
} else {
|
||||
pagebody.classList.remove('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Light"
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-header header-logo"><a href="/">Hubert's Blog</a></div>
|
||||
<div class="menu navbar-right">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
<input id="switch_default" type="checkbox" class="switch_default">
|
||||
<label for="switch_default" class="toggleBtn"></label>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="navbar-mobile" id="nav-mobile">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<div>
|
||||
<a href="/">Hubert's Blog</a><a id="mobile-toggle-theme">· Light</a>
|
||||
</div>
|
||||
<div class="menu-toggle" onclick="mobileBtn()">☰ 菜单</div>
|
||||
</div>
|
||||
<div class="menu" id="mobile-menu">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<script>
|
||||
var mobileBtn = function f() {
|
||||
var toggleMenu = document.getElementsByClassName("menu-toggle")[0];
|
||||
var mobileMenu = document.getElementById("mobile-menu");
|
||||
if(toggleMenu.classList.contains("active")){
|
||||
toggleMenu.classList.remove("active")
|
||||
mobileMenu.classList.remove("active")
|
||||
}else{
|
||||
toggleMenu.classList.add("active")
|
||||
mobileMenu.classList.add("active")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="post-toc">
|
||||
<div class="tocbot-list">
|
||||
</div>
|
||||
<div class="tocbot-list-menu">
|
||||
<a class="tocbot-toc-expand" onclick="expand_toc()">展开全部</a>
|
||||
<a onclick="go_top()">回到顶端</a>
|
||||
<a onclick="go_bottom()">查看底部</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var tocbot_timer;
|
||||
var DEPTH_MAX = 6; // 为 6 时展开所有
|
||||
var tocbot_default_config = {
|
||||
tocSelector: '.tocbot-list',
|
||||
contentSelector: '.post-content',
|
||||
headingSelector: 'h1, h2, h3',
|
||||
orderedList: false,
|
||||
scrollSmooth: true,
|
||||
onClick: extend_click,
|
||||
};
|
||||
|
||||
function extend_click() {
|
||||
clearTimeout(tocbot_timer);
|
||||
tocbot_timer = setTimeout(function () {
|
||||
tocbot.refresh(obj_merge(tocbot_default_config, { hasInnerContainers: true }));
|
||||
}, 420); // 这个值是由 tocbot 源码里定义的 scrollSmoothDuration 得来的
|
||||
}
|
||||
|
||||
document.ready(function () {
|
||||
tocbot.init(obj_merge(tocbot_default_config, { collapseDepth: 1 }));
|
||||
});
|
||||
|
||||
function expandToc() {
|
||||
var b = document.querySelector('.tocbot-toc-expand');
|
||||
var expanded = b.getAttribute('data-expanded');
|
||||
expanded ? b.removeAttribute('data-expanded') : b.setAttribute('data-expanded', true);
|
||||
tocbot.refresh(obj_merge(tocbot_default_config, { collapseDepth: expanded ? 1 : DEPTH_MAX }));
|
||||
b.innerText = expanded ? 'Expand all' : 'Collapse all';
|
||||
}
|
||||
|
||||
function go_top() {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
function go_bottom() {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
}
|
||||
|
||||
function obj_merge(target, source) {
|
||||
for (var item in source) {
|
||||
if (source.hasOwnProperty(item)) {
|
||||
target[item] = source[item];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<article class="post-wrap">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">Hello World</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
|
||||
|
||||
|
||||
<span class="post-time">
|
||||
日期: <a href="#">24 一月, 2022 00:00:00</a>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
<p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
|
||||
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
|
||||
|
||||
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p>
|
||||
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
|
||||
|
||||
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p>
|
||||
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
|
||||
|
||||
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p>
|
||||
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
|
||||
|
||||
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<section class="post-tags">
|
||||
<div>
|
||||
<span>标签:</span>
|
||||
<span class="tag">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:window.history.back();">返回</a>
|
||||
<span>· </span>
|
||||
<a href="/">主页</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="post-nav">
|
||||
|
||||
<a class="prev" rel="prev" href="/2022/01/26/02.pages/">这是一个测试页面</a>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer id="footer" class="footer">
|
||||
<div class="copyright">
|
||||
<span>Hubert Chen © 2022 | Powered by <a href="https://hexo.io" target="_blank">Hexo</a> & <a href="https://github.com/Siricee/hexo-theme-Chic" target="_blank">Chic</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,186 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="author" content="Hubert Chen">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<title>这是一个测试页面 | Hubert's Blog</title>
|
||||
|
||||
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- stylesheets list from _config.yml -->
|
||||
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- scripts list from _config.yml -->
|
||||
|
||||
<script src="/js/script.js"></script>
|
||||
|
||||
<script src="/js/tocbot.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="generator" content="Hexo 6.2.0"></head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// this function is used to check current theme before page loaded.
|
||||
(() => {
|
||||
const currentTheme = window.localStorage && window.localStorage.getItem('theme') || '';
|
||||
const isDark = currentTheme === 'dark';
|
||||
const pagebody = document.getElementsByTagName('body')[0]
|
||||
if (isDark) {
|
||||
pagebody.classList.add('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Dark"
|
||||
} else {
|
||||
pagebody.classList.remove('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Light"
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-header header-logo"><a href="/">Hubert's Blog</a></div>
|
||||
<div class="menu navbar-right">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
<input id="switch_default" type="checkbox" class="switch_default">
|
||||
<label for="switch_default" class="toggleBtn"></label>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="navbar-mobile" id="nav-mobile">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<div>
|
||||
<a href="/">Hubert's Blog</a><a id="mobile-toggle-theme">· Light</a>
|
||||
</div>
|
||||
<div class="menu-toggle" onclick="mobileBtn()">☰ 菜单</div>
|
||||
</div>
|
||||
<div class="menu" id="mobile-menu">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<script>
|
||||
var mobileBtn = function f() {
|
||||
var toggleMenu = document.getElementsByClassName("menu-toggle")[0];
|
||||
var mobileMenu = document.getElementById("mobile-menu");
|
||||
if(toggleMenu.classList.contains("active")){
|
||||
toggleMenu.classList.remove("active")
|
||||
mobileMenu.classList.remove("active")
|
||||
}else{
|
||||
toggleMenu.classList.add("active")
|
||||
mobileMenu.classList.add("active")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
|
||||
|
||||
|
||||
|
||||
<article class="post-wrap">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">这是一个测试页面</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
|
||||
|
||||
|
||||
<span class="post-time">
|
||||
日期: <a href="#">26 一月, 2022 00:00:00</a>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
<p><u>测试下划线</u><br><code>测试等宽abc</code><br><a target="_blank" rel="noopener" href="https://github.com/">测试链接</a><br><img src="/images/post/02/test.png" alt="测试图片"><br>test netease music</p>
|
||||
<iframe border="0" marginwidth="0" marginheight="0" src="//music.163.com/outchain/player?type=2&id=1300697588&auto=0&height=66" width="330" height="86" frameborder="no"></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="post-tags">
|
||||
<div>
|
||||
<span>标签:</span>
|
||||
<span class="tag">
|
||||
|
||||
|
||||
<a href="/tag/%E6%B5%8B%E8%AF%95/"># 测试</a>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:window.history.back();">返回</a>
|
||||
<span>· </span>
|
||||
<a href="/">主页</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="post-nav">
|
||||
|
||||
<a class="prev" rel="prev" href="/2022/01/26/03.testagain/">testagain</a>
|
||||
|
||||
|
||||
<a class="next" rel="next" href="/2022/01/24/01.hello-world/">Hello World</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer id="footer" class="footer">
|
||||
<div class="copyright">
|
||||
<span>Hubert Chen © 2022 | Powered by <a href="https://hexo.io" target="_blank">Hexo</a> & <a href="https://github.com/Siricee/hexo-theme-Chic" target="_blank">Chic</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,185 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="author" content="Hubert Chen">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<title>testagain | Hubert's Blog</title>
|
||||
|
||||
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- stylesheets list from _config.yml -->
|
||||
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- scripts list from _config.yml -->
|
||||
|
||||
<script src="/js/script.js"></script>
|
||||
|
||||
<script src="/js/tocbot.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="generator" content="Hexo 6.2.0"></head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// this function is used to check current theme before page loaded.
|
||||
(() => {
|
||||
const currentTheme = window.localStorage && window.localStorage.getItem('theme') || '';
|
||||
const isDark = currentTheme === 'dark';
|
||||
const pagebody = document.getElementsByTagName('body')[0]
|
||||
if (isDark) {
|
||||
pagebody.classList.add('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Dark"
|
||||
} else {
|
||||
pagebody.classList.remove('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Light"
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-header header-logo"><a href="/">Hubert's Blog</a></div>
|
||||
<div class="menu navbar-right">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
<input id="switch_default" type="checkbox" class="switch_default">
|
||||
<label for="switch_default" class="toggleBtn"></label>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="navbar-mobile" id="nav-mobile">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<div>
|
||||
<a href="/">Hubert's Blog</a><a id="mobile-toggle-theme">· Light</a>
|
||||
</div>
|
||||
<div class="menu-toggle" onclick="mobileBtn()">☰ 菜单</div>
|
||||
</div>
|
||||
<div class="menu" id="mobile-menu">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<script>
|
||||
var mobileBtn = function f() {
|
||||
var toggleMenu = document.getElementsByClassName("menu-toggle")[0];
|
||||
var mobileMenu = document.getElementById("mobile-menu");
|
||||
if(toggleMenu.classList.contains("active")){
|
||||
toggleMenu.classList.remove("active")
|
||||
mobileMenu.classList.remove("active")
|
||||
}else{
|
||||
toggleMenu.classList.add("active")
|
||||
mobileMenu.classList.add("active")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
|
||||
|
||||
|
||||
|
||||
<article class="post-wrap">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">testagain</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
|
||||
|
||||
|
||||
<span class="post-time">
|
||||
日期: <a href="#">26 一月, 2022 23:40:35</a>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
<iframe border="0" marginwidth="0" marginheight="0" src="//music.163.com/outchain/player?type=2&id=1300697588&auto=0&height=66" width="330" height="86" frameborder="no"></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="post-tags">
|
||||
<div>
|
||||
<span>标签:</span>
|
||||
<span class="tag">
|
||||
|
||||
|
||||
<a href="/tag/%E6%B5%8B%E8%AF%95/"># 测试</a>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:window.history.back();">返回</a>
|
||||
<span>· </span>
|
||||
<a href="/">主页</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="post-nav">
|
||||
|
||||
<a class="prev" rel="prev" href="/2022/03/01/04.%E6%AC%A2%E8%BF%8E%E5%8F%82%E8%A7%82/">欢迎参观</a>
|
||||
|
||||
|
||||
<a class="next" rel="next" href="/2022/01/26/02.pages/">这是一个测试页面</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer id="footer" class="footer">
|
||||
<div class="copyright">
|
||||
<span>Hubert Chen © 2022 | Powered by <a href="https://hexo.io" target="_blank">Hexo</a> & <a href="https://github.com/Siricee/hexo-theme-Chic" target="_blank">Chic</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,254 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="author" content="Hubert Chen">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<title>欢迎参观 | Hubert's Blog</title>
|
||||
|
||||
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- stylesheets list from _config.yml -->
|
||||
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- scripts list from _config.yml -->
|
||||
|
||||
<script src="/js/script.js"></script>
|
||||
|
||||
<script src="/js/tocbot.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="generator" content="Hexo 6.2.0"></head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// this function is used to check current theme before page loaded.
|
||||
(() => {
|
||||
const currentTheme = window.localStorage && window.localStorage.getItem('theme') || '';
|
||||
const isDark = currentTheme === 'dark';
|
||||
const pagebody = document.getElementsByTagName('body')[0]
|
||||
if (isDark) {
|
||||
pagebody.classList.add('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Dark"
|
||||
} else {
|
||||
pagebody.classList.remove('dark-theme');
|
||||
// mobile
|
||||
document.getElementById("mobile-toggle-theme").innerText = "· Light"
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-header header-logo"><a href="/">Hubert's Blog</a></div>
|
||||
<div class="menu navbar-right">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
<input id="switch_default" type="checkbox" class="switch_default">
|
||||
<label for="switch_default" class="toggleBtn"></label>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="navbar-mobile" id="nav-mobile">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<div>
|
||||
<a href="/">Hubert's Blog</a><a id="mobile-toggle-theme">· Light</a>
|
||||
</div>
|
||||
<div class="menu-toggle" onclick="mobileBtn()">☰ 菜单</div>
|
||||
</div>
|
||||
<div class="menu" id="mobile-menu">
|
||||
|
||||
<a class="menu-item" href="/archives">文章</a>
|
||||
|
||||
<a class="menu-item" href="/tag">标签</a>
|
||||
|
||||
<a class="menu-item" href="/about">关于</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<script>
|
||||
var mobileBtn = function f() {
|
||||
var toggleMenu = document.getElementsByClassName("menu-toggle")[0];
|
||||
var mobileMenu = document.getElementById("mobile-menu");
|
||||
if(toggleMenu.classList.contains("active")){
|
||||
toggleMenu.classList.remove("active")
|
||||
mobileMenu.classList.remove("active")
|
||||
}else{
|
||||
toggleMenu.classList.add("active")
|
||||
mobileMenu.classList.add("active")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="post-toc">
|
||||
<div class="tocbot-list">
|
||||
</div>
|
||||
<div class="tocbot-list-menu">
|
||||
<a class="tocbot-toc-expand" onclick="expand_toc()">展开全部</a>
|
||||
<a onclick="go_top()">回到顶端</a>
|
||||
<a onclick="go_bottom()">查看底部</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var tocbot_timer;
|
||||
var DEPTH_MAX = 6; // 为 6 时展开所有
|
||||
var tocbot_default_config = {
|
||||
tocSelector: '.tocbot-list',
|
||||
contentSelector: '.post-content',
|
||||
headingSelector: 'h1, h2, h3',
|
||||
orderedList: false,
|
||||
scrollSmooth: true,
|
||||
onClick: extend_click,
|
||||
};
|
||||
|
||||
function extend_click() {
|
||||
clearTimeout(tocbot_timer);
|
||||
tocbot_timer = setTimeout(function () {
|
||||
tocbot.refresh(obj_merge(tocbot_default_config, { hasInnerContainers: true }));
|
||||
}, 420); // 这个值是由 tocbot 源码里定义的 scrollSmoothDuration 得来的
|
||||
}
|
||||
|
||||
document.ready(function () {
|
||||
tocbot.init(obj_merge(tocbot_default_config, { collapseDepth: 1 }));
|
||||
});
|
||||
|
||||
function expandToc() {
|
||||
var b = document.querySelector('.tocbot-toc-expand');
|
||||
var expanded = b.getAttribute('data-expanded');
|
||||
expanded ? b.removeAttribute('data-expanded') : b.setAttribute('data-expanded', true);
|
||||
tocbot.refresh(obj_merge(tocbot_default_config, { collapseDepth: expanded ? 1 : DEPTH_MAX }));
|
||||
b.innerText = expanded ? 'Expand all' : 'Collapse all';
|
||||
}
|
||||
|
||||
function go_top() {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
function go_bottom() {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
}
|
||||
|
||||
function obj_merge(target, source) {
|
||||
for (var item in source) {
|
||||
if (source.hasOwnProperty(item)) {
|
||||
target[item] = source[item];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<article class="post-wrap">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">欢迎参观</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
|
||||
|
||||
|
||||
<span class="post-time">
|
||||
日期: <a href="#">01 三月, 2022 11:42:55</a>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
<h2 id="你好,欢迎来到我的博客"><a href="#你好,欢迎来到我的博客" class="headerlink" title="你好,欢迎来到我的博客"></a>你好,欢迎来到我的博客</h2><p>这个博客由我创建于2022年01月24日,起初是想跟网络上的大佬一样搭个自己的博客,不过现在搭好了也不知道写些什么。</p>
|
||||
<h2 id="关于我-Hubert-Chen"><a href="#关于我-Hubert-Chen" class="headerlink" title="关于我 (Hubert Chen)"></a>关于我 (Hubert Chen)</h2><h3 id="兴趣爱好"><a href="#兴趣爱好" class="headerlink" title="兴趣爱好"></a>兴趣爱好</h3><p>给手机刷系统,例如 <a target="_blank" rel="noopener" href="https://lineageos.org/">Lineage OS</a> <a target="_blank" rel="noopener" href="https://sailfishos.org/">Sailfish OS</a><br>会些基础的Linux操作<del>,不过十分容易碰见bug</del><br>会画画 (非常非常基础,目前只会描些图)<br>听音乐使用的软件: <a target="_blank" rel="noopener" href="https://spotify.com/">Spotify</a> <a target="_blank" rel="noopener" href="https://music.163.com/">网易云音乐</a> 偶尔会在网易云音乐里上传一些歌词<br>玩游戏会用的软件: <a target="_blank" rel="noopener" href="https://store.steampowered.com/">Steam</a> <a target="_blank" rel="noopener" href="https://www.ubisoft.com/">Ubisoft</a> <a target="_blank" rel="noopener" href="https://www.xbox.com/">Xbox(云游戏)</a><br>活跃的社交平台:<a target="_blank" rel="noopener" href="https://t.me/trle5">Telegram</a> <a target="_blank" rel="noopener" href="https://twitter.com/interstellar750">Twitter</a> <a target="_blank" rel="noopener" href="https://github.com/Interstellar750/">GitHub</a> <a target="_blank" rel="noopener" href="https://matrix.io/#/@trle5:matrix.org">Matrix</a> 国内的QQ微信也在用,但并不太喜欢,而且放出来可能会泄露个人信息,所以就不公开了</p>
|
||||
<h2 id="建站历程:"><a href="#建站历程:" class="headerlink" title="建站历程:"></a>建站历程:</h2><h3 id="2022-x2F-01-x2F-24"><a href="#2022-x2F-01-x2F-24" class="headerlink" title="2022/01/24"></a>2022/01/24</h3><p>初次建立并使用 <a target="_blank" rel="noopener" href="https://github.io/">GitHub Pages</a> 来作为服务器 (其实并不是第一次,前前后后试了好几次,因为碰到了好多bug)</p>
|
||||
<h3 id="2022-x2F-01-x2F-29"><a href="#2022-x2F-01-x2F-29" class="headerlink" title="2022/01/29"></a>2022/01/29</h3><p>在 <a href="freenom.com">Freenom</a> 上申请了12个月的免费域名 trle5.tk ,但由于不会设置DNS解析,依然用着 <a target="_blank" rel="noopener" href="https://github.io/">GitHub Pages</a> 的默认域名</p>
|
||||
<h3 id="2022-x2F-02-x2F-26"><a href="#2022-x2F-02-x2F-26" class="headerlink" title="2022/02/26"></a>2022/02/26</h3><p>由于 x10m2 上的 <a target="_blank" rel="noopener" href="https://sailfishos.org/">Sailfish OS</a> 因为未知问题操作很卡,把 hexo 后端备份出来迁移到了s10e,使用 <a target="_blank" rel="noopener" href="https://play.google.com/store/apps/details?id=com.termux">Termux</a> 来继续运维</p>
|
||||
<h3 id="2022-x2F-02-x2F-27"><a href="#2022-x2F-02-x2F-27" class="headerlink" title="2022/02/27"></a>2022/02/27</h3><p>将域名 DNS 解析托管到 <a href="godaddy.com">GoDaddy</a> ,成功用上了自定义域名</p>
|
||||
<h3 id="2022-x2F-03-x2F-08"><a href="#2022-x2F-03-x2F-08" class="headerlink" title="2022/03/08"></a>2022/03/08</h3><p>在 <a target="_blank" rel="noopener" href="https://reg.ru/">reg.ru</a> 购买了一年的 <a target="_blank" rel="noopener" href="https://trle5.xyz/">trle5.xyz</a> 域名,用于存放文件,本站可能有一些图片文件会储存在里面</p>
|
||||
<h3 id="2022-x2F-03-x2F-14"><a href="#2022-x2F-03-x2F-14" class="headerlink" title="2022/03/14"></a>2022/03/14</h3><p>更换为由 <a href="freenom.com">Freenom</a> 提供的 DNS 解析</p>
|
||||
<h3 id="2022-x2F-03-x2F-15"><a href="#2022-x2F-03-x2F-15" class="headerlink" title="2022/03/15"></a>2022/03/15</h3><p>把 blackbox 的域名从 <a target="_blank" rel="noopener" href="https://trle5.xyz/">trle5.xyz</a> 迁移到 <a target="_blank" rel="noopener" href="https://t5d.trle5.tk/">t5d.trle5.tk</a></p>
|
||||
<h3 id="2022-x2F-05-x2F-07"><a href="#2022-x2F-05-x2F-07" class="headerlink" title="2022/05/07"></a>2022/05/07</h3><p>从默认的 Landscape 主题更换为 <a target="_blank" rel="noopener" href="https://github.com/Siricee">Siricee</a> 制作的 <a target="_blank" rel="noopener" href="https://github.com/Siricee/hexo-theme-Chic">Chic</a> 主题</p>
|
||||
<h3 id="2022-x2F-05-x2F-08"><a href="#2022-x2F-05-x2F-08" class="headerlink" title="2022/05/08"></a>2022/05/08</h3><p>使用 <a target="_blank" rel="noopener" href="https://vercel.com/">Vercel</a> 建立了博客镜像站,使用域名 <a target="_blank" rel="noopener" href="https://trle5.xyz/">trle5.xyz</a> ,DNS 解析由 <a target="_blank" rel="noopener" href="https://cloudflare.com/">Cloudflare</a> 提供</p>
|
||||
<h3 id="2022-x2F-06-x2F-01"><a href="#2022-x2F-06-x2F-01" class="headerlink" title="2022/06/01"></a>2022/06/01</h3><p>重新配置了博客主题,因为 05/15 那天手机数据丢失让博客后端也部分丢失了 (真的丢了好多东西啊😢)</p>
|
||||
<h3 id="2022-x2F-07-x2F-19"><a href="#2022-x2F-07-x2F-19" class="headerlink" title="2022/07/19"></a>2022/07/19</h3><p>重新修正了一篇文章,之前写的文章发现达不到所想的方案所以就暂搁了 <del><strong>懒</strong></del> ,由于之前的丢数据问题,Cloudflare 账号也登不上了,找回有点麻烦</p>
|
||||
<h3 id="2022-x2F-09-x2F-11"><a href="#2022-x2F-09-x2F-11" class="headerlink" title="2022/09/11"></a>2022/09/11</h3><p>给 Cloudflare 客服发邮件,成功拿回了账号的控制权,目前 <a target="_blank" rel="noopener" href="https://trle5.xyz/">trle5.xyz</a> 站点会随时更新,就是代表上面可能会有一些没写完的文章和新东西,文章写完后再推送至 <a href="https://trle5.tk/">trle5.tk</a>,于 6 月 4 日在 <a target="_blank" rel="noopener" href="https://porkbun.com/">Porkbun</a> 白嫖的 <a target="_blank" rel="noopener" href="https://trle5.dev/">trle5.dev</a> 域名还没打算好用来干嘛,两个付费域名以我现在的经济能力压力有点大</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<section class="post-tags">
|
||||
<div>
|
||||
<span>标签:</span>
|
||||
<span class="tag">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:window.history.back();">返回</a>
|
||||
<span>· </span>
|
||||
<a href="/">主页</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="post-nav">
|
||||
|
||||
<a class="prev" rel="prev" href="/2022/03/05/05.%E6%90%AD%E5%BB%BA%E4%B8%80%E4%B8%AA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/">搭建一个自己的博客</a>
|
||||
|
||||
|
||||
<a class="next" rel="next" href="/2022/01/26/03.testagain/">testagain</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer id="footer" class="footer">
|
||||
<div class="copyright">
|
||||
<span>Hubert Chen © 2022 | Powered by <a href="https://hexo.io" target="_blank">Hexo</a> & <a href="https://github.com/Siricee/hexo-theme-Chic" target="_blank">Chic</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,455 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<meta name="author" content="Hubert Chen">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<title>搭建一个自己的博客 | Hubert's Blog</title>
|
||||
|
||||
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- stylesheets list from _config.yml -->
|
||||
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- scripts list from _config.yml -->
|
||||
|
||||
<script src="/js/script.js"></script>
|
||||
|
||||
<script src="/js/tocbot.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="generator" content="Hexo 6.2.0"></head>
|
||||