Skip to content

Commit

Permalink
feat(iconAssets): switch from iconfont to fontawesome
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbenben committed Apr 4, 2024
1 parent 3946fc8 commit 02996ee
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
30 changes: 19 additions & 11 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@ import sidebar from "./sidebar";
export default hopeTheme({
// 主题选项:https://theme-hope.vuejs.press/zh/config/theme/layout.html
hostname: "https://newzone.top",

iconAssets: "iconfont",

iconAssets: ["fontawesome", "fontawesome-with-brands"],
author: {
name: "LearnData",
url: "https://newzone.top",
},

favicon: "/favicon.ico",
logo: "/logo.svg",

// 网站文章的版权声明
license: "CC BY-NC-ND 4.0",

// copyright 默认为 Copyright © <作者>
copyright: `
版权声明:自由转载 - 非商用 - 非衍生 - 保持署名<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/deed.zh-hans" target="_blank" rel="noopener noreferrer">(创意共享 4.0 许可证)</a>|
Copyright © 2023-present LearnData</a>
`,
displayFooter: true,
// 页脚,支持使用 HTMLString 以显示备案信息等
// footer: `CC BY-NC-ND 4.0 Licensed`,

// 是否全局启用路径导航
breadcrumb: false,

Expand Down Expand Up @@ -53,12 +64,6 @@ export default hopeTheme({
// 侧边栏排序规则
// sidebarSorter: ['readme', 'order', 'title'],

// copyright 默认为 Copyright © <作者>
copyright: `Copyright © 2023-present <a href="https://newzone.top/" target="_blank" rel="noopener noreferrer">LearnData 开源笔记</a>`,
displayFooter: true,
// 页脚,支持使用 HTMLString 以显示备案信息等
// footer: `MIT Licensed`,

// 页面布局 Frontmatter 配置:https://theme-hope.vuejs.press/zh/config/frontmatter/layout.html#pageinfo
pageInfo: ["Category", "Tag", "Word", "ReadingTime", "PageView"],

Expand Down Expand Up @@ -160,11 +165,14 @@ export default hopeTheme({
},

// Algolia 全文搜索:需要自己设置爬虫并生成下方配置,如不会自己设置,启用下方本地搜索
/* docsearch: {
/*
docsearch: {
indexName: "newzone",
appId: "M4EXXEZIEG",
apiKey: "fd8891a9c4cc21e0ef4f11bf44f7a11e",
}, */
},
*/

// 本地搜索,和上方二选一
searchPro: {
// 索引全部内容
Expand Down
6 changes: 3 additions & 3 deletions samplepage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
# 文章标题
title: 页面配置样例
# 页面图标,默认为 [iconfont 精选图标](https://theme-hope.vuejs.press/zh/guide/interface/icon.html)
# 假设希望设定图标为 icon-tab,则是 icon: tab
icon: page
# 页面图标,默认为 [Fontawesome 图标](https://fontawesome.com/search?m=free&o=r)
# 假设希望设定图标为 <i class="fa-solid fa-hashtag"></i>,则是 icon: fa-solid fa-hashtag
icon: fa-solid fa-hashtag
# 侧边栏的顺序
# 数字越小越靠前,支持非整数和负数,比如 -10 < -9.5 < 3.2, order 为 -10 的文章会最靠上。
# 个人偏好将非干货或随想短文的 order 设置在 -0.01 到 -0.99,将干货类长文的 order 设置在 -1 到负无穷。每次新增文章都会在上一篇的基础上递减 order 值。
Expand Down

0 comments on commit 02996ee

Please sign in to comment.