-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Astrian/v1.0
新的「文章标签」分类页
- Loading branch information
Showing
9 changed files
with
221 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"isCreateCategoriesPages": true, | ||
"isCreateTagsPages": true, | ||
"isCreateTreeVars": false, | ||
"isCreateArchivesVarsToIndex": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,44 @@ | ||
[ | ||
{ | ||
"title": "你的笔名", | ||
"variableName": "username", | ||
"inputFieldHeight": 22, | ||
"exampleText": "John Appleseed" | ||
}, | ||
{ | ||
"title": "脚注信息", | ||
"variableName": "footer", | ||
"inputFieldHeight": 66, | ||
"exampleText": "使用 <br> 来进行换行..." | ||
}, | ||
{ | ||
"title": "Favicon 图标", | ||
"variableName": "favicon", | ||
"inputFieldHeight": 22, | ||
"exampleText": "可留空,浏览器会使用默认标志替代它" | ||
}, | ||
{ | ||
"title": "你的 Like.co 用户名", | ||
"variableName": "likecoinusername", | ||
"inputFieldHeight": 22, | ||
"exampleText": "如无可不填写" | ||
}, | ||
{ | ||
"title": "自定义样式", | ||
"variableName": "customstyle", | ||
"inputFieldHeight": 110, | ||
"exampleText": "不推荐自行修改,如有需要,请在模板开发者的指导下修改该自定义样式。" | ||
} | ||
] | ||
{ | ||
"title": "你的笔名", | ||
"variableName": "username", | ||
"inputFieldHeight": 22, | ||
"exampleText": "John Appleseed" | ||
}, | ||
{ | ||
"title": "Twitter 用户名", | ||
"variableName": "twitter", | ||
"inputFieldHeight": 22, | ||
"exampleText": "网站文章分享至 Twitter 时,将会附带该用户名。" | ||
}, | ||
{ | ||
"title": "脚注信息", | ||
"variableName": "footer", | ||
"inputFieldHeight": 66, | ||
"exampleText": "使用 <br> 来进行换行..." | ||
}, | ||
{ | ||
"title": "Favicon 图标", | ||
"variableName": "favicon", | ||
"inputFieldHeight": 22, | ||
"exampleText": "可留空,浏览器会使用默认标志替代它" | ||
}, | ||
{ | ||
"title": "你的 Like.co 用户名", | ||
"variableName": "likecoinusername", | ||
"inputFieldHeight": 22, | ||
"exampleText": "如无可不填写" | ||
}, | ||
{ | ||
"title": "标签简短介绍", | ||
"variableName": "tagsdescription", | ||
"inputFieldHeight": 110, | ||
"exampleText": "需要使用特定的 JSON 格式。有关该功能详情,请访问 https://dwz.cn/X5CCdpvF。" | ||
}, | ||
{ | ||
"title": "自定义样式", | ||
"variableName": "customstyle", | ||
"inputFieldHeight": 110, | ||
"exampleText": "不推荐自行修改,如有需要,请在模板开发者的指导下修改该自定义样式。" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 标签简短介绍功能说明 | ||
Reflect White 主题支持 MWeb 3.3.1 及之后的版本中,新增的按文章标签分类文章的功能。在此基础之上,Reflect White 主题进一步支持对特定话题的标签添加简短介绍功能。 | ||
|
||
生效后,该简短介绍将会在对应的标签页面下显示。 | ||
|
||
![标签简短介绍生效后的页面展示](https://i.imgur.com/C4QeKkT.png) | ||
|
||
如果你需要为不同的文章话题标签撰写简短介绍,你需要在 MWeb 的对应静态网站中,写入特定的 JSON 对象。具体方法如下: | ||
|
||
- 从 MWeb 主界面的最左侧文章分类视图中,找到你的网站,右键点击选择「编辑」,再从弹出框中选择「高级设置」。 | ||
- 在「网站扩展设置」中,找到「标签简短介绍」一项,填入特定格式的 JSON。 | ||
|
||
JSON 格式如下: | ||
|
||
```json | ||
{ | ||
"标签名称": "标签说明", | ||
"标签名称": "标签说明" | ||
} | ||
``` | ||
|
||
![标签简短介绍设置页面](https://i.imgur.com/TPm05SR.png) | ||
|
||
需要注意的是,标签名称必须与文章所添加的标签 *完全一致*,才能被正确读取与显示。例如,「IFS RSVP Bot」与「IFSRSVPBot」和「IFS-RSVP-Bot」是完全不一样的标签。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="container" id="tags"> | ||
<div class="row"> | ||
<div class="col-md-4 tagmeta"> | ||
<div class="tagpagetitle">文章标签</div> | ||
<div class="tagname">#{{currentTag.name}}</div> | ||
<div class="tagdescription" v-if="descriptions['{{currentTag.name}}']">${descriptions['{{currentTag.name}}']}</div> | ||
</div> | ||
<div class="col-md-8 posts"> | ||
{% for p in posts %} | ||
<a href="{{p.url}}"><div class="post"> | ||
<div class="featimg" style="background-image: url('{% if p.ext_featureimg.length %}{{p.ext_featureimg}}{% else %}asset/defaultfeaimg.jpg{% /if %}')"></div> | ||
<div class="postcontent"> | ||
<div class="title">{{p.title}}</div> | ||
<div class="subtitle">{{p.ext_subtitle}}</div> | ||
</div> | ||
</div></a> | ||
{% /for %} | ||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
let tags = new Vue({ | ||
el: '#tags', | ||
data: { | ||
descriptions: JSON.parse('{{ ext_tagsdescription }}') | ||
}, | ||
delimiters: ['${', '}'] | ||
}) | ||
</script> |