mirror of
https://github.com/StarGazer114/stargazer114.github.io.git
synced 2025-01-07 05:48:17 +08:00
310 lines
35 KiB
HTML
310 lines
35 KiB
HTML
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>使用docsify+GitHubPages搭建静态文档站 | 拾光小阁</title><meta name="author" content="br"><meta name="copyright" content="br"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="安装docsify ,安装成功了,可以看到对应目录下出现了这些文件,现在就可以编辑`README.md`来修改主页内容了">
|
||
<meta property="og:type" content="article">
|
||
<meta property="og:title" content="使用docsify+GitHubPages搭建静态文档站">
|
||
<meta property="og:url" content="https://bear556.top/c309a01be576/index.html">
|
||
<meta property="og:site_name" content="拾光小阁">
|
||
<meta property="og:description" content="安装docsify ,安装成功了,可以看到对应目录下出现了这些文件,现在就可以编辑`README.md`来修改主页内容了">
|
||
<meta property="og:locale" content="zh_CN">
|
||
<meta property="og:image" content="https://t.mwm.moe/fj">
|
||
<meta property="article:published_time" content="2024-08-25T01:57:05.000Z">
|
||
<meta property="article:modified_time" content="2024-12-16T07:06:17.024Z">
|
||
<meta property="article:author" content="br">
|
||
<meta property="article:tag" content="服务器">
|
||
<meta property="article:tag" content="docsify">
|
||
<meta property="article:tag" content="Github">
|
||
<meta name="twitter:card" content="summary">
|
||
<meta name="twitter:image" content="https://t.mwm.moe/fj"><link rel="shortcut icon" href="/img/favicon.ico"><link rel="canonical" href="https://bear556.top/c309a01be576/index.html"><link rel="preconnect"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="/pluginsSrc/@fortawesome/fontawesome-free/css/all.min.css"><script>
|
||
(() => {
|
||
|
||
const saveToLocal = {
|
||
set: (key, value, ttl) => {
|
||
if (!ttl) return
|
||
const expiry = Date.now() + ttl * 86400000
|
||
localStorage.setItem(key, JSON.stringify({ value, expiry }))
|
||
},
|
||
get: key => {
|
||
const itemStr = localStorage.getItem(key)
|
||
if (!itemStr) return undefined
|
||
const { value, expiry } = JSON.parse(itemStr)
|
||
if (Date.now() > expiry) {
|
||
localStorage.removeItem(key)
|
||
return undefined
|
||
}
|
||
return value
|
||
}
|
||
}
|
||
|
||
window.btf = {
|
||
saveToLocal,
|
||
getScript: (url, attr = {}) => new Promise((resolve, reject) => {
|
||
const script = document.createElement('script')
|
||
script.src = url
|
||
script.async = true
|
||
Object.entries(attr).forEach(([key, val]) => script.setAttribute(key, val))
|
||
script.onload = script.onreadystatechange = () => {
|
||
if (!script.readyState || /loaded|complete/.test(script.readyState)) resolve()
|
||
}
|
||
script.onerror = reject
|
||
document.head.appendChild(script)
|
||
}),
|
||
getCSS: (url, id) => new Promise((resolve, reject) => {
|
||
const link = document.createElement('link')
|
||
link.rel = 'stylesheet'
|
||
link.href = url
|
||
if (id) link.id = id
|
||
link.onload = link.onreadystatechange = () => {
|
||
if (!link.readyState || /loaded|complete/.test(link.readyState)) resolve()
|
||
}
|
||
link.onerror = reject
|
||
document.head.appendChild(link)
|
||
}),
|
||
addGlobalFn: (key, fn, name = false, parent = window) => {
|
||
if (!true && key.startsWith('pjax')) return
|
||
const globalFn = parent.globalFn || {}
|
||
globalFn[key] = globalFn[key] || {}
|
||
globalFn[key][name || Object.keys(globalFn[key]).length] = fn
|
||
parent.globalFn = globalFn
|
||
}
|
||
}
|
||
|
||
|
||
const activateDarkMode = () => {
|
||
document.documentElement.setAttribute('data-theme', 'dark')
|
||
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
||
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
|
||
}
|
||
}
|
||
const activateLightMode = () => {
|
||
document.documentElement.setAttribute('data-theme', 'light')
|
||
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
||
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
|
||
}
|
||
}
|
||
|
||
btf.activateDarkMode = activateDarkMode
|
||
btf.activateLightMode = activateLightMode
|
||
|
||
const theme = saveToLocal.get('theme')
|
||
|
||
theme === 'dark' ? activateDarkMode() : theme === 'light' ? activateLightMode() : null
|
||
|
||
|
||
const asideStatus = saveToLocal.get('aside-status')
|
||
if (asideStatus !== undefined) {
|
||
document.documentElement.classList.toggle('hide-aside', asideStatus === 'hide')
|
||
}
|
||
|
||
|
||
const detectApple = () => {
|
||
if (/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)) {
|
||
document.documentElement.classList.add('apple')
|
||
}
|
||
}
|
||
detectApple()
|
||
|
||
})()
|
||
</script><script>const GLOBAL_CONFIG = {
|
||
root: '/',
|
||
algolia: undefined,
|
||
localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":true,"languages":{"hits_empty":"未找到符合您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
|
||
translate: undefined,
|
||
highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false,"highlightFullpage":false,"highlightMacStyle":false},
|
||
copy: {
|
||
success: '复制成功',
|
||
error: '复制失败',
|
||
noSupport: '浏览器不支持'
|
||
},
|
||
relativeDate: {
|
||
homepage: false,
|
||
post: false
|
||
},
|
||
runtime: '',
|
||
dateSuffix: {
|
||
just: '刚刚',
|
||
min: '分钟前',
|
||
hour: '小时前',
|
||
day: '天前',
|
||
month: '个月前'
|
||
},
|
||
copyright: undefined,
|
||
lightbox: 'null',
|
||
Snackbar: undefined,
|
||
infinitegrid: {
|
||
js: '/pluginsSrc/@egjs/infinitegrid/dist/infinitegrid.min.js',
|
||
buttonText: '加载更多'
|
||
},
|
||
isPhotoFigcaption: false,
|
||
islazyload: false,
|
||
isAnchor: false,
|
||
percent: {
|
||
toc: true,
|
||
rightside: false,
|
||
},
|
||
autoDarkmode: false
|
||
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
|
||
title: '使用docsify+GitHubPages搭建静态文档站',
|
||
isPost: true,
|
||
isHome: false,
|
||
isHighlightShrink: false,
|
||
isToc: true,
|
||
isShuoshuo: false
|
||
}</script><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=LXGW+WenKai+TC:wght@700&display=swap" rel="stylesheet"><meta name="generator" content="Hexo 7.3.0"><link rel="alternate" href="/rss.xml" title="拾光小阁" type="application/rss+xml">
|
||
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
|
||
const $loadingBox = document.getElementById('loading-box')
|
||
const $body = document.body
|
||
const preloader = {
|
||
endLoading: () => {
|
||
$body.style.overflow = ''
|
||
$loadingBox.classList.add('loaded')
|
||
},
|
||
initLoading: () => {
|
||
$body.style.overflow = 'hidden'
|
||
$loadingBox.classList.remove('loaded')
|
||
}
|
||
}
|
||
|
||
preloader.initLoading()
|
||
window.addEventListener('load', preloader.endLoading)
|
||
|
||
if (true) {
|
||
btf.addGlobalFn('pjaxSend', preloader.initLoading, 'preloader_init')
|
||
btf.addGlobalFn('pjaxComplete', preloader.endLoading, 'preloader_end')
|
||
}
|
||
})()</script><div id="web_bg" style="background-image: url(https://cn-sy1.rains3.com/static-1/img/DFeeiOJQRFYUUFbBQM.webp);"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img text-center"><img src="/img/avatar.webp" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data text-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-user"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/talks/"><i class="fa-fw fas fa-comment"></i><span> 叨叨</span></a></div><div class="menus_item"><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></div><div class="menus_item"><span class="site-page group"><i class="fa-fw fas fa-list"></i><span> 镜像</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="https://bear556.top"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://gh.bear556.top"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.bear556.top"><span> Netlify</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://vc.bear556.top"><span> Vercel</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://www.travellings.cn/go.html"><i class="fa-fw fas fa-subway"></i><span> 开往</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url(https://t.mwm.moe/fj);"><nav id="nav"><span id="blog-info"><a class="nav-site-title" href="/"><span class="site-name">拾光小阁</span></a><a class="nav-page-title" href="/"><span class="site-name">使用docsify+GitHubPages搭建静态文档站</span></a></span><div id="menus"><div id="search-button"><span class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></span></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-user"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/talks/"><i class="fa-fw fas fa-comment"></i><span> 叨叨</span></a></div><div class="menus_item"><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></div><div class="menus_item"><span class="site-page group"><i class="fa-fw fas fa-list"></i><span> 镜像</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="https://bear556.top"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://gh.bear556.top"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.bear556.top"><span> Netlify</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://vc.bear556.top"><span> Vercel</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://www.travellings.cn/go.html"><i class="fa-fw fas fa-subway"></i><span> 开往</span></a></div></div><div id="toggle-menu"><span class="site-page"><i class="fas fa-bars fa-fw"></i></span></div></div></nav><div id="post-info"><h1 class="post-title">使用docsify+GitHubPages搭建静态文档站</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2024-08-25T01:57:05.000Z" title="发表于 2024-08-25 09:57:05">2024-08-25</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-12-16T07:06:17.024Z" title="更新于 2024-12-16 15:06:17">2024-12-16</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E6%8A%80%E6%9C%AF/">技术</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span id="" data-flag-title=""><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">浏览量:</span><span class="waline-pageview-count" data-path="/c309a01be576/"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="container post-content" id="article-container"><p>我建的站:<a target="_blank" rel="noopener" href="https://pcbook.top/">赛博扫盲手册</a></p>
|
||
<h2 id="安装docsify"><a href="#安装docsify" class="headerlink" title="安装docsify"></a>安装docsify</h2><figure class="highlight avrasm"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">npm i docsify-<span class="keyword">cli</span> -g</span><br><span class="line"> <span class="meta"># 安装docsify</span></span><br><span class="line">docsify init ./docs</span><br><span class="line"> <span class="meta"># 初始化并创建./docs文件夹</span></span><br></pre></td></tr></table></figure>
|
||
|
||
<p>安装成功了,可以看到对应目录下出现了这些文件:</p>
|
||
<ul>
|
||
<li><code>index.html</code> 入口文件</li>
|
||
<li><code>README.md</code> 会做为主页内容渲染</li>
|
||
<li><code>.nojekyll</code> 用于阻止 GitHub Pages 忽略掉下划线开头的文件</li>
|
||
</ul>
|
||
<p>现在就可以编辑<code>README.md</code>来修改主页内容了,你也可以使用<code>docsify serve ./docs</code>来在本机3000端口上启动一个实时更新的开发服务器来查看你的更改。</p>
|
||
<h2 id="多页文档"><a href="#多页文档" class="headerlink" title="多页文档"></a>多页文档</h2><p>直接在docs目录下新建md文件,通过<code>域名/文件名</code>进行访问。</p>
|
||
<h3 id="定制侧边栏"><a href="#定制侧边栏" class="headerlink" title="定制侧边栏"></a>定制侧边栏</h3><p>在创建多页文档之后你会发现,只能手动输入地址去访问对应的文档,这时候就需要通过编辑侧边栏来实现,在<code>index.html</code>里找到<code>window.$docsify = {</code>在下面添加<code>loadSidebar: true</code></p>
|
||
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"><!-- index.html --></span></span><br><span class="line"></span><br><span class="line"> <span class="tag"><<span class="name">script</span>></span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">window</span>.<span class="property">$docsify</span> = { </span></span><br><span class="line"><span class="language-javascript"> <span class="attr">loadSidebar</span>: <span class="literal">true</span> </span></span><br><span class="line"><span class="language-javascript"> } </span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag"></<span class="name">script</span>></span></span><br></pre></td></tr></table></figure>
|
||
|
||
<p>然后创建<code>sidebar.md</code>文件,在里面用markdown链接格式填入你的页面的地址。。</p>
|
||
<figure class="highlight scss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">* 基础篇</span><br><span class="line">* <span class="selector-attr">[前言]</span>(/)</span><br><span class="line">* <span class="selector-attr">[硬件]</span>(<span class="number">1</span>)</span><br><span class="line">* <span class="selector-attr">[操作系统]</span>(<span class="number">2</span>)</span><br><span class="line">* <span class="selector-attr">[浏览器]</span>(<span class="number">3</span>)</span><br><span class="line"></span><br></pre></td></tr></table></figure>
|
||
|
||
<p>你问为什么我后面填的是123?因为我的文件名就是1.md,2.md,3.md。。。。</p>
|
||
<h2 id="更多配置修改"><a href="#更多配置修改" class="headerlink" title="更多配置修改"></a>更多配置修改</h2><p><a target="_blank" rel="noopener" href="https://docsify.js.org/#/zh-cn/configuration">官方文档</a><br>都是在<code>index.html</code>里的<code>window.$docsify = {</code>添加的,插件也是</p>
|
||
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://bear556.top">br</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://bear556.top/c309a01be576/">https://bear556.top/c309a01be576/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来源 <a href="https://bear556.top" target="_blank">拾光小阁</a>!</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E6%9C%8D%E5%8A%A1%E5%99%A8/">服务器</a><a class="post-meta__tags" href="/tags/docsify/">docsify</a><a class="post-meta__tags" href="/tags/Github/">Github</a></div><div class="post-share"><div class="social-share" data-image="https://t.mwm.moe/fj" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="/pluginsSrc/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="/pluginsSrc/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><a class="pagination-related" href="/bc617de41f72/" title="周末快乐~"><img class="cover" src="https://cn-sy1.rains3.com/img-bed/2024/12/22/676785e2e32ad.gif" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="info"><div class="info-1"><div class="info-item-1">上一篇</div><div class="info-item-2">周末快乐~</div></div><div class="info-2"><div class="info-item-1"> </div></div></div></a><a class="pagination-related" href="/a86a5bbad1ff/" title="Hello World"><img class="cover" src="https://www.dmoe.cc/random.php" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="info text-right"><div class="info-1"><div class="info-item-1">下一篇</div><div class="info-item-2">Hello World</div></div><div class="info-2"><div class="info-item-1">Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any probems when using Hexo you can find the answer in troubleshooting or you can ask me on GitHub. Quick StrtCreate a new pst1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment </div></div></div></a></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><a class="pagination-related" href="/3b5544763853/" title="自建kms服务器激活Windows和office"><img class="cover" src="https://t.mwm.moe/fj" alt="cover"><div class="info text-center"><div class="info-1"><div class="info-item-1"><i class="far fa-calendar-alt fa-fw"></i> 2024-10-01</div><div class="info-item-2">自建kms服务器激活Windows和office</div></div><div class="info-2"><div class="info-item-1">项目地址:https://github.com/dylanbai8/kmspro需要开放1688端口。激活方式:powershell输入slmgr /skms <kms服务器地址> && slmgr /ato你也可以使用我搭建的kms服务器slmgr /skms kms.bear556.top && slmgr /ato 1234567891011121314151617181920212223242526# 一键安装KMS服务 (Debian/Ubuntu/Mint 等)$ wget -N --no-check-certificate git.io/k.sh && chmod +x k.sh && bash k.sh debian# 一键安装KMS服务 (CentOS/Redhat/Fedora 等)(如果系统开启了防火墙 须自行开放 1688 端口)$ wget -N --no-check-certificate git.io/k.sh && chmod +x k.sh...</div></div></div></a><a class="pagination-related" href="/58256fdefc6c/" title="使用ssh连接git服务"><img class="cover" src="https://t.mwm.moe/fj" alt="cover"><div class="info text-center"><div class="info-1"><div class="info-item-1"><i class="far fa-calendar-alt fa-fw"></i> 2024-09-15</div><div class="info-item-2">使用ssh连接git服务</div></div><div class="info-2"><div class="info-item-1">生成密钥ssh-keygen -t rsa -C "你的邮箱",然后一路回车,前往~/.ssh目录下查看密钥打开id_rsa.pub文件,复制下来,前往[https://github.com/settings/keys]点击New ssh key,填写你刚刚复制的公钥内容,完成 测试连接ssh进行测试 1ssh git@github.com 返回结果 123PTY allocation request failed on channel 0Hi lijiashuai111! You've successfully authenticated, but GitHub does not provide shell access.Connection to github.com closed. 完成,你现在可以使用ssh来进行克隆,拉取等操作了 </div></div></div></a><a class="pagination-related" href="/0bb772f89466/" title="部署hexo博客"><img class="cover" src="https://cn-sy1.rains3.com/img-bed/2024/12/22/67678485ddfc5.jpeg" alt="cover"><div class="info text-center"><div class="info-1"><div class="info-item-1"><i class="far fa-calendar-alt fa-fw"></i> 2024-09-11</div><div class="info-item-2">部署hexo博客</div></div><div class="info-2"><div class="info-item-1">Hexo 是一个快速、简洁且高效的博客框架。 Hexo 使用 Markdown(或其他标记语言)解析文章,在几秒内,即可利用靓丽的主题生成静态网页。 安装hexo可以参照官方文档安装. 一键部署脚本如果你实在看不懂安装文档,我这里写了一个一键安装脚本,用于安装npm和hexo(适用于Ubuntu系统),使用前请确保你的电脑上没有安装nodejs,使用node -v和npm -v来查看,如果提示bash: npm: command not found,即可使用这个脚本,成功运行后可以直接到~/blog目录下查看 1curl -O https://raw.githubusercontent.com/lijiashuai111/hexo-auto-install/main/hexo-auto-install.sh && sh hexo-auto-install.sh 配置文件Hexo的配置文件 _config.yml 包含了多个关键配置项,每个都具有特定的功能: title: 设置博客的标题。 subtitle: 设置博客的副标题。 description:...</div></div></div></a></div></div><hr class="custom-hr"/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="waline-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info text-center"><div class="avatar-img"><img src="/img/avatar.webp" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info-name">br</div><div class="author-info-description">万钟则不辨礼仪而受之,万种于我美滋滋</div><div class="site-data"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/StarGazer114"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons"><a class="social-icon" href="https://github.com/StarGazer114" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:ljsh666@outlook.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a><a class="social-icon" href="https://x.com/bear36609893920" target="_blank" title="Twitter"><i class="fab fa-twitter" style="color: #1da1f2;"></i></a><a class="social-icon" href="/rss.xml" target="_blank" title="RSS"><i class="fas fa-rss" style="color: #f26522;"></i></a><a class="social-icon" href="https://git.bear556.top/br/stargazer114.github.io" target="_blank" title="网站代码"><i class="far fa-file-code" style="color: #3AC402;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">随机更新,时常失踪</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85docsify"><span class="toc-number">1.</span> <span class="toc-text">安装docsify</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%A4%9A%E9%A1%B5%E6%96%87%E6%A1%A3"><span class="toc-number">2.</span> <span class="toc-text">多页文档</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%9A%E5%88%B6%E4%BE%A7%E8%BE%B9%E6%A0%8F"><span class="toc-number">2.1.</span> <span class="toc-text">定制侧边栏</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9B%B4%E5%A4%9A%E9%85%8D%E7%BD%AE%E4%BF%AE%E6%94%B9"><span class="toc-number">3.</span> <span class="toc-text">更多配置修改</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/6f831c5bafc6/" title="新年">新年</a><time datetime="2024-12-31T09:53:39.683Z" title="发表于 2024-12-31 17:53:39">2024-12-31</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/fab3e3ad8b47/" title="重构计划">重构计划</a><time datetime="2024-12-21T06:04:14.218Z" title="发表于 2024-12-21 14:04:14">2024-12-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/58dc525d892f/" title="原神圣经"><img src="https://cn-sy1.rains3.com/img-bed/2024/12/22/6767835f07582.jpeg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="原神圣经"/></a><div class="content"><a class="title" href="/58dc525d892f/" title="原神圣经">原神圣经</a><time datetime="2024-11-18T06:36:50.000Z" title="发表于 2024-11-18 14:36:50">2024-11-18</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/1bab28b2bfe2/" title="ASF挂卡食用教程"><img src="https://cn-sy1.rains3.com/img-bed/2024/12/22/676783ac5efe3.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="ASF挂卡食用教程"/></a><div class="content"><a class="title" href="/1bab28b2bfe2/" title="ASF挂卡食用教程">ASF挂卡食用教程</a><time datetime="2024-10-26T22:04:12.000Z" title="发表于 2024-10-27 06:04:12">2024-10-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/88e16ba1a3a2/" title="数据备份“321”原则"><img src="https://t.mwm.moe/fj" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="数据备份“321”原则"/></a><div class="content"><a class="title" href="/88e16ba1a3a2/" title="数据备份“321”原则">数据备份“321”原则</a><time datetime="2024-10-03T18:11:00.000Z" title="发表于 2024-10-04 02:11:00">2024-10-04</time></div></div></div></div></div></div></main><footer id="footer" style="background: transparent;"><div id="footer-wrap"><div class="copyright">©2023 - 2025 By br</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a rel="nofollow" target="_blank" href="https://icp.gov.moe/?keyword=20240229">萌ICP备20240229号</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="日间和夜间模式切换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="前往评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/pluginsSrc/instant.page/instantpage.js" type="module"></script><div class="js-pjax"><script>(() => {
|
||
let initFn = window.walineFn || null
|
||
const isShuoshuo = GLOBAL_CONFIG_SITE.isShuoshuo
|
||
const option = null
|
||
|
||
const destroyWaline = ele => ele.destroy()
|
||
|
||
const initWaline = (Fn, el = document, path = window.location.pathname) => {
|
||
const waline = Fn({
|
||
el: el.querySelector('#waline-wrap'),
|
||
serverURL: 'https://waline.bear556.top',
|
||
pageview: true,
|
||
dark: 'html[data-theme="dark"]',
|
||
comment: false,
|
||
...option,
|
||
path: isShuoshuo ? path : (option && option.path) || path
|
||
})
|
||
|
||
if (isShuoshuo) {
|
||
window.shuoshuoComment.destroyWaline = () => {
|
||
destroyWaline(waline)
|
||
if (el.children.length) {
|
||
el.innerHTML = ''
|
||
el.classList.add('no-comment')
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
const loadWaline = (el, path) => {
|
||
if (initFn) initWaline(initFn, el, path)
|
||
else {
|
||
btf.getCSS('/pluginsSrc/@waline/client/dist/waline.css')
|
||
.then(() => import('/pluginsSrc/@waline/client/dist/waline.js'))
|
||
.then(({ init }) => {
|
||
initFn = init || Waline.init
|
||
initWaline(initFn, el, path)
|
||
window.walineFn = initFn
|
||
})
|
||
}
|
||
}
|
||
|
||
if (isShuoshuo) {
|
||
'Waline' === 'Waline'
|
||
? window.shuoshuoComment = { loadComment: loadWaline }
|
||
: window.loadOtherComment = loadWaline
|
||
return
|
||
}
|
||
|
||
if ('Waline' === 'Waline' || !false) {
|
||
if (false) btf.loadComment(document.getElementById('waline-wrap'),loadWaline)
|
||
else setTimeout(loadWaline, 0)
|
||
} else {
|
||
window.loadOtherComment = loadWaline
|
||
}
|
||
})()</script></div><div class="aplayer no-destroy" data-id="9401784769" data-server="tencent" data-type="playlist" data-fixed="true" data-autoplay="true"> </div><script defer="defer" id="fluttering_ribbon" mobile="false" src="/pluginsSrc/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><link rel="stylesheet" href="/pluginsSrc/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="/pluginsSrc/aplayer/dist/APlayer.min.js"></script><script src="/pluginsSrc/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script>(() => {
|
||
const destroyAplayer = () => {
|
||
if (window.aplayers) {
|
||
for (let i = 0; i < window.aplayers.length; i++) {
|
||
if (!window.aplayers[i].options.fixed) {
|
||
window.aplayers[i].destroy()
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
const runMetingJS = () => {
|
||
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
|
||
}
|
||
|
||
btf.addGlobalFn('pjaxSend', destroyAplayer, 'destroyAplayer')
|
||
btf.addGlobalFn('pjaxComplete', loadMeting, 'runMetingJS')
|
||
})()</script><script src="/pluginsSrc/pjax/pjax.min.js"></script><script>(() => {
|
||
const pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]
|
||
|
||
window.pjax = new Pjax({
|
||
elements: 'a:not([target="_blank"])',
|
||
selectors: pjaxSelectors,
|
||
cacheBust: false,
|
||
analytics: false,
|
||
scrollRestoration: false
|
||
})
|
||
|
||
const triggerPjaxFn = (val) => {
|
||
if (!val) return
|
||
Object.values(val).forEach(fn => fn())
|
||
}
|
||
|
||
document.addEventListener('pjax:send', () => {
|
||
// removeEventListener
|
||
btf.removeGlobalFnEvent('pjaxSendOnce')
|
||
btf.removeGlobalFnEvent('themeChange')
|
||
|
||
// reset readmode
|
||
const $bodyClassList = document.body.classList
|
||
if ($bodyClassList.contains('read-mode')) $bodyClassList.remove('read-mode')
|
||
|
||
triggerPjaxFn(window.globalFn.pjaxSend)
|
||
})
|
||
|
||
document.addEventListener('pjax:complete', () => {
|
||
btf.removeGlobalFnEvent('pjaxCompleteOnce')
|
||
document.querySelectorAll('script[data-pjax]').forEach(item => {
|
||
const newScript = document.createElement('script')
|
||
const content = item.text || item.textContent || item.innerHTML || ""
|
||
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
|
||
newScript.appendChild(document.createTextNode(content))
|
||
item.parentNode.replaceChild(newScript, item)
|
||
})
|
||
|
||
triggerPjaxFn(window.globalFn.pjaxComplete)
|
||
})
|
||
|
||
document.addEventListener('pjax:error', e => {
|
||
if (e.request.status === 404) {
|
||
pjax.loadUrl('/404.html')
|
||
}
|
||
})
|
||
})()</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="text-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span> 数据加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜搜搜~" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div></body></html> |