-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
171 lines (133 loc) · 4.79 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
/**
* yml-export
*
* @package export-yaml-markdown
* @author zlun
* @version 0.1
* @link http://zlun.yijile.com
*/
?>
<!DOCTYPE html>
<html lang="zh-cn">
<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">
<title><?php $this->archiveTitle(array(
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ' - '); ?><?php $this->options->title(); ?></title>
<?php $this->header('generator=&template=&pingback=&xmlrpc=&wlw=&atom=&rss1=&rss2='); ?>
</head>
<body>
<script src="http://www.w3school.com.cn/jquery/jquery.js"></script>
<h2>文章列表</h2>
<p>全选复制,新建txt,粘贴内容并保存为`filelist.txt`</p>
<p>使用命令下载所有内容:`wget -i filelist.txt`</p>
<p>建议先手动将永久链接中文章后缀改为`.md`,这样下载后直接可以用</p>
<textarea name="editor_post">
<?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=999999999')->to($archives);
$year=0; $mon=0; $i=0; $j=0;
$output = '';
while($archives->next()):
$year_tmp = date('Y',$archives->created);
$mon_tmp = date('m',$archives->created);
$y=$year; $m=$mon;
if ($mon != $mon_tmp && $mon > 0) $output .= '';
if ($year != $year_tmp && $year > 0) $output .= '';
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= ''; //输出年份
}
if ($mon != $mon_tmp) {
$mon = $mon_tmp;
$output .= ''; //输出月份
}
$output .= ''.$archives->permalink .'<br />'; //输出文章日期和标题
endwhile;
$output .= '';
echo $output;
?>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<?php $pages->permalink(); ?>
<br />
<?php endwhile; ?>
</textarea>
<h2>分类列表</h2>
<p>替换_config.yml中内容</p>
<P>使用多分类的文章请手动删除一个分类,不然hexo系统会自动识别成二级子分类</P>
<p>
数据验证
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while ($category->next()): ?>
<a href="<?php $category->permalink(); ?>" title="<?php $category->name(); ?>" class="db fl t2s<?php if ($this->is('post')): ?><?php if ($this->category == $category->slug): ?> on<?php endif; ?><?php else: ?><?php if ($this->is('category', $category->slug)): ?> on<?php endif; ?><?php endif; ?>"><?php $category->name(); ?></a>
<?php endwhile; ?>
</p>
<textarea name="editor_cat3">
category_map:
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while ($category->next()): ?>
<?php $category->name(); ?>: “<?php $category->slug(); ?>”
<?php endwhile; ?>
</textarea>
<h2>页面</h2>
<p>替换_config.yml中内容</p>
<p>
数据验证(名称及内置链接,cid)
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<li class="fl"><a href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>" target="_blank" class="<?php if($this->is('page', $pages->slug)): ?>on<?php endif; ?>"><?php $pages->title(); ?></a><span style="margin-left: 1em; color: green; font-size: 8px;"><?php $pages->cid(); ?></span>
<?php endwhile; ?>
</p>
<textarea name="editor_cat3">
menu:
Home: /
Archives: /archives
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<?php $pages->title(); ?>: /<?php $pages->slug(); ?>
<?php endwhile; ?>
</textarea>
<h2>标签列表</h2>
<p>替换_config.yml中内容</p>
<textarea name="editor_tag3">
tag_map:
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0&limit=999999999')->to($tags); ?><?php if($tags->have()): ?>
<?php while ($tags->next()): ?>
<?php $tags->name(); ?>: “<?php $tags->slug(); ?>”
<?php endwhile; ?>
<?php else: ?><?php _e('# 没有任何标签'); ?><?php endif; ?>
</textarea>
<h2>友情链接</h2>
<p>手动格式化</p>
<textarea name="editor_links">
<?php Links_Plugin::output(); ?>
</textarea>
<h2>url验证</h2>
<p>替换_config.yml中的固定链接优化</p>
<p name="editor_url">
post:
cat:
tag:
</p>
<script src="https://cdn.ckeditor.com/4.13.0/standard/ckeditor.js"></script>
<script>
CKEDITOR.replace( 'editor_post' );
CKEDITOR.replace( 'editor_cat' );
CKEDITOR.replace( 'editor_tag' );
</script>
<style>
textarea[name|=editor_cat3],
textarea[name|=editor_tag3],
textarea[name|=editor_links],
textarea[name|=editor_3]
{
width: 600px; height: 200px;
}
</style>
</body>
</html>