Skip to content

Commit ea75fbb

Browse files
author
AntHubTC
committed
张一鸣的231条blog
1 parent 55fb133 commit ea75fbb

File tree

8 files changed

+1701
-4
lines changed

8 files changed

+1701
-4
lines changed

231Blog/README.md

Lines changed: 1456 additions & 0 deletions
Large diffs are not rendered by default.

231Blog/_sidebar.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* [张一鸣的231条微博](README)
2+

231Blog/img/doc-logo.svg

Lines changed: 30 additions & 0 deletions
Loading

231Blog/index.html

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Document</title>
7+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
8+
<meta name="description" content="Description">
9+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
10+
<!-- 不同风格样式 -->
11+
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
12+
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css"> -->
13+
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css"> -->
14+
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/pure.css"> -->
15+
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dolphin.css"> -->
16+
</head>
17+
18+
<body>
19+
<div id="app"></div>
20+
<script>
21+
// 使用文档 https://docsify.js.org
22+
window.$docsify = {
23+
// 文档标题,会显示在侧边栏顶部。
24+
name: 'docsify',
25+
// 点击文档标题后跳转的链接地址。
26+
nameLink: '/',
27+
// 在侧边栏中出现的网站图标,你可以使用CSS来更改大小
28+
logo: '/img/doc-logo.svg',
29+
// 配置仓库地址或者 username/repo 的字符串,会在页面右上角渲染一个 GitHub Corner 挂件。
30+
repo: 'https://github.com/FallenGodCoder/FallenGodCoder.github.io',
31+
// 自定义侧边栏
32+
loadSidebar: true,
33+
// 自定义侧边栏同时也可以开启目录功能
34+
subMaxLevel: 4,
35+
// 自定义导航栏
36+
loadNavbar: false,
37+
// 自定义封面
38+
coverpage: false,
39+
// 用于配置多个封面
40+
// ,coverpage: ['/', '/zh-cn/']
41+
// 切换页面后是否自动跳转到页面顶部
42+
auto2top: true,
43+
// 全文搜素配置
44+
search: {
45+
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
46+
paths: 'auto', // or []
47+
placeholder: 'Type to search',
48+
// 支持本地化
49+
// placeholder: {
50+
// '/zh-cn/': '搜索',
51+
// '/': 'Type to search'
52+
// },
53+
noData: 'No Result!',
54+
// 支持本地化
55+
// noData: {
56+
// '/zh-cn/': '找不到结果',
57+
// '/': 'No Results'
58+
// },
59+
// 搜索标题的最大程级, 1 - 6
60+
depth: 4
61+
}
62+
}
63+
</script>
64+
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
65+
<!-- =====================插件====================== -->
66+
<!-- 全文搜素Search -->
67+
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
68+
<!-- emoji插件 -->
69+
<script src="//unpkg.com/docsify/lib/plugins/emoji.js"></script>
70+
<!-- 外链脚本 - External Script -->
71+
<!-- <script src="//unpkg.com/docsify/lib/plugins/external-script.js"></script> -->
72+
<!-- 图片缩放 - Zoom image -->
73+
<!-- 复制到剪贴板 在所有的代码块上添加一个简单的Click to copy按钮来允许用户从你的文档中轻易地复制代码。 -->
74+
<script src="//unpkg.com/docsify-copy-code"></script>
75+
<!-- Disqus评论系统支持。 -->
76+
<!-- <script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script> -->
77+
<!-- Gitalk Gitalk,一个现代化的,基于Preact和Github Issue的评论系统 使用详情参考文档-->
78+
<!-- docsify的分页导航插件 -->
79+
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
80+
81+
<!-- 代码高亮 -->
82+
<!--
83+
其它代码高亮插件参考:
84+
https://github.com/PrismJS/prism/tree/gh-pages/components
85+
https://unpkg.com/browse/prismjs/components/
86+
-->
87+
<script src="//unpkg.com/prismjs/components/prism-java.js"></script>
88+
<script src="//unpkg.com/prismjs/components/prism-bash.js"></script>
89+
<script src="//unpkg.com/prismjs/components/prism-sql.js"></script>
90+
<!-- <script src="//unpkg.com/prismjs/components/prism-css.min.js"></script> -->
91+
<!-- <script src="//unpkg.com/prismjs/components/prism-docker.min.js"></script> -->
92+
<!-- <script src="//unpkg.com/prismjs/components/prism-git.min.js"></script> -->
93+
<!-- <script src="//unpkg.com/prismjs/components/prism-go.min.js"></script> -->
94+
<!-- <script src="//unpkg.com/prismjs/components/prism-groovy.min.js"></script> -->
95+
<!-- <script src="//unpkg.com/prismjs/components/prism-haml.min.js"></script> -->
96+
<!-- <script src="//unpkg.com/prismjs/components/prism-http.min.js"></script> -->
97+
<!-- <script src="//unpkg.com/prismjs/components/prism-ini.min.js"></script> -->
98+
<!-- <script src="//unpkg.com/prismjs/components/prism-json.min.js"></script> -->
99+
<!-- <script src="//unpkg.com/prismjs/components/prism-javascript.min.js"></script> -->
100+
<!-- <script src="//unpkg.com/prismjs/components/prism-json.min.js"></script> -->
101+
<!-- <script src="//unpkg.com/prismjs/components/prism-kotlin.min.js"></script> -->
102+
<!-- <script src="//unpkg.com/prismjs/components/prism-less.min.js"></script> -->
103+
<!-- <script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script> -->
104+
<!-- <script src="//unpkg.com/prismjs/components/prism-python.min.js"></script> -->
105+
<!-- <script src="//unpkg.com/prismjs/components/prism-sass.min.js"></script> -->
106+
<!-- <script src="//unpkg.com/prismjs/componentsprism-stylus.min.js/"></script> -->
107+
<!-- <script src="//unpkg.com/prismjs/components/prism-yaml.min.js"></script> -->
108+
<!-- <script src="//unpkg.com/prismjs/components/prism-scala.min.js"></script> -->
109+
110+
<script>
111+
// 离线模式
112+
if (typeof navigator.serviceWorker !== 'undefined') {
113+
navigator.serviceWorker.register('sw.js')
114+
}
115+
</script>
116+
</body>
117+
118+
</html>

231Blog/sw.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/* ===========================================================
2+
* docsify sw.js
3+
* ===========================================================
4+
* 离线模式引入这个文件
5+
*
6+
* Copyright 2016 @huxpro
7+
* Licensed under Apache 2.0
8+
* Register service worker.
9+
* ========================================================== */
10+
11+
const RUNTIME = 'docsify'
12+
const HOSTNAME_WHITELIST = [
13+
self.location.hostname,
14+
'fonts.gstatic.com',
15+
'fonts.googleapis.com',
16+
'unpkg.com'
17+
]
18+
19+
// The Util Function to hack URLs of intercepted requests
20+
const getFixedUrl = (req) => {
21+
var now = Date.now()
22+
var url = new URL(req.url)
23+
24+
// 1. fixed http URL
25+
// Just keep syncing with location.protocol
26+
// fetch(httpURL) belongs to active mixed content.
27+
// And fetch(httpRequest) is not supported yet.
28+
url.protocol = self.location.protocol
29+
30+
// 2. add query for caching-busting.
31+
// Github Pages served with Cache-Control: max-age=600
32+
// max-age on mutable content is error-prone, with SW life of bugs can even extend.
33+
// Until cache mode of Fetch API landed, we have to workaround cache-busting with query string.
34+
// Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190
35+
if (url.hostname === self.location.hostname) {
36+
url.search += (url.search ? '&' : '?') + 'cache-bust=' + now
37+
}
38+
return url.href
39+
}
40+
41+
/**
42+
* @Lifecycle Activate
43+
* New one activated when old isnt being used.
44+
*
45+
* waitUntil(): activating ====> activated
46+
*/
47+
self.addEventListener('activate', event => {
48+
event.waitUntil(self.clients.claim())
49+
})
50+
51+
/**
52+
* @Functional Fetch
53+
* All network requests are being intercepted here.
54+
*
55+
* void respondWith(Promise<Response> r)
56+
*/
57+
self.addEventListener('fetch', event => {
58+
// Skip some of cross-origin requests, like those for Google Analytics.
59+
if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) {
60+
// Stale-while-revalidate
61+
// similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale
62+
// Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1
63+
const cached = caches.match(event.request)
64+
const fixedUrl = getFixedUrl(event.request)
65+
const fetched = fetch(fixedUrl, { cache: 'no-store' })
66+
const fetchedCopy = fetched.then(resp => resp.clone())
67+
68+
// Call respondWith() with whatever we get first.
69+
// If the fetch fails (e.g disconnected), wait for the cache.
70+
// If there’s nothing in cache, wait for the fetch.
71+
// If neither yields a response, return offline pages.
72+
event.respondWith(
73+
Promise.race([fetched.catch(_ => cached), cached])
74+
.then(resp => resp || fetched)
75+
.catch(_ => { /* eat any errors */ })
76+
)
77+
78+
// Update the cache with the version we fetched (only for ok status)
79+
event.waitUntil(
80+
Promise.all([fetchedCopy, caches.open(RUNTIME)])
81+
.then(([response, cache]) => response.ok && cache.put(event.request, response))
82+
.catch(_ => { /* eat any errors */ })
83+
)
84+
}
85+
})

IndexBlog/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,10 @@ let docs = [
531531
"category": ["读书"]
532532
},{
533533
"id": 93,
534-
"title": "coze扣子",
535-
"href": "../coze",
534+
"title": "张一鸣的231条微博",
535+
"href": "../231Blog",
536536
"is_private": false,
537-
"category": ["AI"]
537+
"category": ["创业"]
538538
}
539539
];
540540
// 所有文档分类
@@ -749,7 +749,7 @@ let docCategory = [
749749

750750
// 特殊定位符,前面是数据,后面是代码,python按最新数据重新拼接
751751
// >>>>>>>>>!@#$%^&*!<<<<<<<<<
752-
752+
753753

754754
// 防止抖动函数
755755
function debounce(func, delay) {

docBuildMethod/helpUtil/doc.db

0 Bytes
Binary file not shown.

docBuildMethod/helpUtil/doc_json_data.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,5 +527,11 @@
527527
"href": "../TruthOfWealthBook",
528528
"is_private": false,
529529
"category": ["读书"]
530+
},{
531+
"id": 93,
532+
"title": "张一鸣的231条微博",
533+
"href": "../231Blog",
534+
"is_private": false,
535+
"category": ["创业"]
530536
}
531537
]

0 commit comments

Comments
 (0)