Skip to content

Commit a65a9b3

Browse files
committed
发布1.1.0
1 parent 5e776a7 commit a65a9b3

File tree

10 files changed

+79
-109
lines changed

10 files changed

+79
-109
lines changed

CHANGELOG.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
# 更新日志
22

3-
## 1.0.7(2023-04-12)
3+
## 1.1.0(2023-04-15)
4+
1. 增加网站的[favicon](https://favicon.io/favicon-generator/)
5+
2. 集成[docsify-contributors](https://www.npmjs.com/package/docsify-contributors)插件,显示仓库共享者。
6+
3. 集成[docsify-pdf-embed-plugin](https://www.npmjs.com/package/docsify-pdf-embed-plugin)插件,显示内嵌pdf。
7+
4. 发布`1.1.0`版本。
8+
9+
## 2023-04-12
410
1. index.html更新docsify版本到4.13.0。
511

6-
## 1.0.6(2023-04-05)
12+
## 2023-04-05
713
1. 处理cdn被墙超时的问题,修改为gcore。
814

9-
## 1.0.5(2023-04-02)
15+
## 2023-04-02
1016
1. 更换评论为`docsify-mango-valine`,支持匿名评论。
1117

1218

13-
## 1.0.4(2023-03-31)
19+
## 2023-03-31
1420
1. 修复小屏时,目录图标点击不方便的问题。
1521

1622

17-
## 1.0.3(2023-02-25)
23+
## 2023-02-25
1824
1. 增加七牛云的推广广告,并维护首页。
1925

20-
## 1.0.2(2023-02-22)
26+
## 2023-02-22
2127
1.`index.html`页内的自定义样式抽出到`ext.css`并引入。
2228
2. 支持`mg-badge`徽章样式,使用在`title`里显示文档最新版本。
2329

24-
## 1.0.1(2023-02-22)
30+
## 2023-02-22
2531
1. 搜索配置修复,修改为`search:'auto'`,细节配置请查询[官方文档](https://docsify.js.org/#/zh-cn/plugins?id=%e5%85%a8%e6%96%87%e6%90%9c%e7%b4%a2-search)
2632

2733
## 1.0.0(2023-02-10)

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,7 @@ git clone https://github.com/mg0324/docsify-template.git
4343
25. 使用推荐的cdn jsdelivr - 保证国内外稳定快速访问
4444
26. 自定义标题后显示最新文档版本号 - 以`badge`样式实现
4545
27. 自定义广告推荐 - [docsify-ads](https://www.npmjs.com/package/docsify-ads)
46-
28. 支持匿名评论 - [docsify-mango-valine](https://www.npmjs.com/package/docsify-mango-valine)
46+
28. 支持匿名评论 - [docsify-mango-valine](https://www.npmjs.com/package/docsify-mango-valine)
47+
29. 增加网站的[favicon](https://favicon.io/favicon-generator/)
48+
30. 内嵌PDF预览 - [docsify-pdf-embed-plugin](https://www.npmjs.com/package/docsify-pdf-embed-plugin)
49+
31. 显示仓库共享者 - [docsify-contributors](https://www.npmjs.com/package/docsify-contributors)

index.html

Lines changed: 61 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
<script src="https://gcore.staticfile.org/html5shiv/r29/html5.min.js"></script>
1515
<script src="https://gcore.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
1616
<![endif]-->
17+
<link rel="apple-touch-icon" sizes="180x180" href="static/icon/apple-touch-icon.png">
18+
<link rel="icon" type="image/png" sizes="32x32" href="static/icon/favicon-32x32.png">
19+
<link rel="icon" type="image/png" sizes="16x16" href="static/icon/favicon-16x16.png">
20+
<link rel="manifest" href="static/icon/site.webmanifest">
1721
</head>
1822
<body>
1923
<div id="app"></div>
2024
<script>
2125
window.$docsify = {
22-
name: 'docsify-template<span class="mg-badge">1.0.7</span>',
26+
name: 'docsify-template<span class="mg-badge">1.1.0</span>',
2327
repo: 'https://github.com/mg0324/docsify-template.git',
2428
coverpage: false,
2529
loadNavbar: true,
@@ -43,110 +47,13 @@
4347
successText: '复制成功'
4448
},
4549
footer: {
46-
copy: '<span>mango mei &copy; 2022</span>',
50+
copy: '<span>mango mei &copy; 2023</span>',
4751
auth: '粤ICP备17082965号',
4852
pre: '',
4953
style: 'text-align: center;',
5054
class: 'className'
5155
},
52-
vueComponents: {
53-
'card-link': {
54-
template: `
55-
<a :href="href" target="_blank">
56-
{{title}}
57-
</a>
58-
`,
59-
props:["id","title"],
60-
computed: {
61-
href(){
62-
return "https://mg.meiflower.top/cardview/index.html?id="+this.id;
63-
}
64-
},
65-
data() {
66-
return {
67-
68-
}
69-
}
70-
},
71-
'card-area': {
72-
template: `
73-
<div>
74-
<iframe :src="href" :style="{width:cardWidth,height:cardHeight}"></iframe>
75-
</div>
76-
`,
77-
props:["id","height","width"],
78-
computed: {
79-
theId(){
80-
return "card_" + this.id;
81-
},
82-
href(){
83-
return "https://mg.meiflower.top/cardview/index.html?id="+this.id;
84-
},
85-
cardHeight(){
86-
var result = "400px";
87-
if(this.height){
88-
result = this.height;
89-
}
90-
return result;
91-
},
92-
cardWidth(){
93-
var result = "100%";
94-
if(this.width){
95-
result = this.width;
96-
}
97-
return result;
98-
}
99-
},
100-
created() {
101-
102-
},
103-
data() {
104-
return {
105-
106-
}
107-
}
108-
},
109-
'card-area-list': {
110-
template: `
111-
<div>
112-
<iframe v-for="href in hrefs" :src="href" :style="{width:cardWidth,height:cardHeight,float:'left',marginRight:'5px'}"></iframe>
113-
</div>
114-
`,
115-
props:["ids","height","width"],
116-
computed: {
117-
hrefs(){
118-
var list = [];
119-
var arr = this.ids.split(",");
120-
for(var index in arr){
121-
list.push("http://mg.meiflower.top/cardview/index.html?id="+arr[index]);
122-
}
123-
return list;
124-
},
125-
cardHeight(){
126-
var result = "400px";
127-
if(this.height){
128-
result = this.height;
129-
}
130-
return result;
131-
},
132-
cardWidth(){
133-
var result = "100%";
134-
if(this.width){
135-
result = this.width;
136-
}
137-
return result;
138-
}
139-
},
140-
created() {
141-
142-
},
143-
data() {
144-
return {
145-
146-
}
147-
}
148-
}
149-
},
56+
vueComponents: {},// 可自定义
15057
timeUpdater: {
15158
text: "<div align='right' width='100%' style='color:gray;font-size:16px;margin-top:10px;'>最后更新时间: {docsify-updated}</div>",
15259
formatUpdated: "{YYYY}-{MM}-{DD} {HH}:{mm}",
@@ -273,12 +180,60 @@
273180
} else {
274181
return `<div class='drawio-code'>${code}</div>`
275182
}
276-
} else {
183+
} else if(lang === 'pdf'){
184+
var pdf_renderer = function(code, lang, verify) {
185+
function unique_id_generator(){
186+
function rand_gen(){
187+
return Math.floor((Math.random()+1) * 65536).toString(16).substring(1);
188+
}
189+
return rand_gen() + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + rand_gen() + rand_gen();
190+
}
191+
if(lang && !lang.localeCompare('pdf', 'en', {sensitivity: 'base'})){
192+
if(verify){
193+
return true;
194+
}else{
195+
var divId = "markdown_code_pdf_container_" + unique_id_generator().toString();
196+
var container_list = new Array();
197+
if(localStorage.getItem('pdf_container_list')){
198+
container_list = JSON.parse(localStorage.getItem('pdf_container_list'));
199+
}
200+
container_list.push({"pdf_location": code, "div_id": divId});
201+
localStorage.setItem('pdf_container_list', JSON.stringify(container_list));
202+
return (
203+
'<div style="margin-top:'+ PDF_MARGIN_TOP +'; margin-bottom:'+ PDF_MARGIN_BOTTOM +';" id="'+ divId +'">'
204+
+ '<a href="'+ code + '"> Link </a> to ' + code +
205+
'</div>'
206+
);
207+
}
208+
}
209+
return false;
210+
}
211+
if(pdf_renderer(code, lang, true)){
212+
return pdf_renderer(code, lang, false);
213+
}
214+
}else {
277215
return this.origin.code.apply(this, arguments);
278216
}
279217
}
280218
}
281219
},
220+
contributors: {
221+
repo: 'mg0324/docsify-template',
222+
ignores: [],
223+
style: {
224+
color: '#ffffff',
225+
bgColor: '#404040'
226+
},
227+
image: {
228+
size: 30,
229+
isRound: true,
230+
margin: '0.5em'
231+
},
232+
load: {
233+
isOpen: true,
234+
color: "#009999"
235+
}
236+
}
282237
//gitalk评论
283238
// gitalk: {
284239
// clientID: 'a80e57a9ad7a92dd2c8d',
@@ -399,5 +354,10 @@
399354
<script src="//gcore.jsdelivr.net/npm/docsify-kroki"></script>
400355
<!-- docsify ads -->
401356
<script src="//gcore.jsdelivr.net/npm/[email protected]/dist/docsify-ads.min.js"></script>
357+
<!-- docsify-contributors -->
358+
<script src="//gcore.jsdelivr.net/npm/docsify-contributors@latest/dist/index.min.js"></script>
359+
<!-- docsify pdf embed -->
360+
<script src="//gcore.jsdelivr.net/npm/[email protected]/pdfobject.min.js"></script>
361+
<script src="//gcore.jsdelivr.net/npm/docsify-pdf-embed-plugin/src/docsify-pdf-embed.js"></script>
402362
</body>
403363
</html>
8.26 KB
Loading
23.1 KB
Loading

static/icon/apple-touch-icon.png

7.6 KB
Loading

static/icon/favicon-16x16.png

516 Bytes
Loading

static/icon/favicon-32x32.png

1.01 KB
Loading

static/icon/favicon.ico

15 KB
Binary file not shown.

static/icon/site.webmanifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"","short_name":"","icons":[{"src":"static/icon/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"static/icon/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

0 commit comments

Comments
 (0)