Skip to content

Commit

Permalink
📝 Docs: chang shortcode cardlink to shortcode link
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Jan 14, 2022
1 parent f1d15b5 commit ba6f399
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 27 deletions.
2 changes: 1 addition & 1 deletion content/about/index.md
Expand Up @@ -38,7 +38,7 @@ comment: false
用我所学,学我所用。不盲目堆疊技術棧,保持謙遜,保持探索欲,砥礪前行。

## Recent activity
{{< cardlink href="https://github.com/users/Lruihao/projects/1" content="@Lruihao's Recent activity" >}}
{{< link href="https://github.com/users/Lruihao/projects/1" content="@Lruihao's Recent activity" card=true >}}

- [ ] 臨帖 《心經 - 赵孟頫》
- [ ] 臨帖 《真草千字文》
Expand Down
2 changes: 1 addition & 1 deletion content/posts/bill-note/index.md
Expand Up @@ -38,7 +38,7 @@ OK,一個簡單的初中方程式已經到位了,下一步,思考一下,
主要就是存取數據這點,沒有服務器,數據庫怎麼實現?
valine 可以實現無後端,那我是不是也可以,leancloud 文檔走一波,然後“數據表”設計一下,其實是 leancloud-storage Object ,於是有了以下東西,源碼放在 Github

{{< cardlink href="http://github.com/Lruihao/bill-note" content="bill-note" >}}
{{< link href="http://github.com/Lruihao/bill-note" content="bill-note" card=true >}}

## 數據設計
去 leancloud 创建一个应用,再新增一个 Bill Class, 补充一下字段:
Expand Down
2 changes: 0 additions & 2 deletions content/posts/fas-app.md
Expand Up @@ -5,8 +5,6 @@ tags: ["lua","fusion"]
categories: ["others"]
---

{{< cardlink href="https://ziyuan.lruihao.cn/app/bczc_2.6.2.apk" content="博客 app 下载" >}}

### 介绍
使用 fusion app 对网页进行的封装。
功能:
Expand Down
2 changes: 1 addition & 1 deletion content/posts/hexo-theme-next/index.md
Expand Up @@ -53,7 +53,7 @@ git clone https://github.com/Lruihao/hexo-theme-next themes/next
```
theme: next
```
{{< cardlink href="http://github.com/Lruihao/hexo-theme-next/releases/tag/v6.9.1" content="lib 下载" >}}
{{< link href="http://github.com/Lruihao/hexo-theme-next/releases/tag/v6.9.1" content="lib 下载" card=true >}}

![lib 资源](images/lib.png)

Expand Down
42 changes: 28 additions & 14 deletions content/posts/hexo-to-hugo.md
Expand Up @@ -46,12 +46,15 @@ hugo new path/fileName
```
### 添加主题
添加主题的方式选用 Git 子模组的形式,为了日后快速升级,避免在使用 hexo 中因大量魔改 next 主题而导致难以升级的困扰。
精挑细选最终选择了 [LoveIt](https://github.com/dillonzq/LoveIt)
精挑细选最终选择了 ~~[LoveIt](https://github.com/dillonzq/LoveIt)~~ => [FixIt](https://github.com/Lruihao/FixIt)
```bash
git init
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
git submodule add https://github.com/Lruihao/FixIt.git themes/FixIt
```
`config.toml` 添加 ~~theme = "LoveIt"~~
```
theme = "FixIt"
```
`config.toml` 添加 `theme = "LoveIt"`

### 在本地启动网站
使用以下命令启动网站:
Expand All @@ -66,17 +69,14 @@ hugo serve --disableFastRender
hugo --minify
```

## Hugo&LoveIt 使用
## 写作指北
- [LoveIt 主题文档 - 基本概念](https://hugoloveit.com/zh-cn/theme-documentation-basics)

写作指南

- [LoveIt 主题文档 - 内容](https://hugoloveit.com/zh-cn/theme-documentation-content/)
- [LoveIt 主题文档 - 内置 Shortcodes](https://hugoloveit.com/zh-cn/theme-documentation-built-in-shortcodes/)
- [LoveIt 主题文档 - 扩展 Shortcodes](https://hugoloveit.com/zh-cn/theme-documentation-extended-shortcodes/)

## Todo list
{{< cardlink href="https://github.com/Lruihao/hugo-blog" content="hugo-blog" >}}
{{< link href="https://github.com/Lruihao/hugo-blog" content="本站源码备份" card=true >}}

> 原来 hexo 做了大量的美化和扩展功能,迁移到 hugo 想尽可能多的保留。取之精华,去其糟粕。
Expand Down Expand Up @@ -119,13 +119,27 @@ hugo --minify
- [x] 更换 gravatar 头像 [#4](https://github.com/Lruihao/hugo-blog/issues/4)
- [x] 博客在线编辑器研究 github1s 等 [#5](https://github.com/Lruihao/hugo-blog/issues/5)

### Theme LoveIt
> hugo LoveIt 主题整体优化,~~必要时建 PR 或 issue 到 LoveIt 仓库~~ (LoveIt 已停更一年多)
> 先把自己发现和 LoveIt 原 repo 的 issue 尽可能的修复,修改的原则是:**不改动原项目代码**
> 唯一途径就是在站点相同的目录用**新增**的方式替代**修改、删除**操作。
> ~~之后再等等看作者是否还会更新,如已做大量的更改,再做考虑整合为一个新的主题。~~ FixIt fork from LoveIt
---
<a id="seo-ref"></a>`[baidu_urls.txt]:`[↩︎](#seo)

*生成百度链接集合小技巧,关掉归档分页,在归档页面控制台执行以下代码即可获得所有文章链接*
```javascript
let urls = []
for(let a of document.querySelectorAll('.archive-item a')){
urls.push(a.href)
}
console.log(urls.join('\n'))
```
---

### Theme FixIt
> ~~hugo LoveIt 主题整体优化,必要时建 PR 或 issue 到 LoveIt 仓库~~ (LoveIt 已停更一年多)
> ~~先把自己发现和 LoveIt 原 repo 的 issue 尽可能的修复,修改的原则是:**不改动原项目代码**~~
> ~~唯一途径就是在站点相同的目录用**新增**的方式替代**修改、删除**操作。~~
> ~~之后再等等看作者是否还会更新,如已做大量的更改,再做考虑整合为一个新的主题。~~
> 为了更好的完善博客功能以及修复 BUG 已创建新的主题 FixIt (fork from LoveIt)
{{< cardlink href="https://github.com/Lruihao/FixIt" content="FixIt" >}}
{{< link href="https://github.com/Lruihao/FixIt" content="Hugo theme FixIt" card=true >}}

进度更新至 [#8](https://github.com/Lruihao/hugo-blog/issues/8)

Expand Down
7 changes: 6 additions & 1 deletion content/posts/hugo-cardlink.md
Expand Up @@ -8,7 +8,7 @@ categories:
- hugo
---

{{< cardlink href="https://github.com/Lruihao/hugo-blog/commit/089c303693e806bff855ecf3fee110baa62b870b" content="知乎卡片式链接 Git 記錄" >}}
{{< link href="https://github.com/Lruihao/hugo-blog/FixIt" content="卡片式链接已整合到 FixIt 主题" card=true >}}

{{< admonition quote "回顧" >}}
之前在使用 hexo 的時候也有用到,[模仿知乎卡片式链接](/posts/linkcard/)
Expand All @@ -30,4 +30,9 @@ categories:
使用參數同 [LoveIt 擴展 Shortcodes - Link](https://hugoloveit.com/zh-cn/theme-documentation-extended-shortcodes/#2-link)
```markdown
{{</* cardlink href="https://github.com/Lruihao/hugo-blog/commit/089c303693e806bff855ecf3fee110baa62b870b" content="知乎卡片式链接 Git 記錄" */>}}
```
> :bulb: 注:FixIt {{< version 0.2.12 changed >}} 已合併 cardlink shortcode 到 link shortcode,只需添加 card=true
```
{{</* link href="https://github.com/Lruihao/hugo-blog/FixIt" content="卡片式链接已整合到 FixIt 主题" card=true */>}}
```
4 changes: 3 additions & 1 deletion content/posts/hugo-friends.md
Expand Up @@ -11,9 +11,11 @@ categories:
以前的 hexo 博客是自己寫的友鏈模板,換到 hugo 後想著在網上隨便找一個範本用著就好,然而並沒有自己想要的 layout, 幾乎都是使用 shortcodes 的,代碼風格有點問題且 shortcodes 作為友鏈添加的方式是真的麻煩。就只好自己寫羅。
{{< /admonition >}}

{{< link href="https://github.com/Lruihao/hugo-blog/FixIt" content="友情鏈接模板已整合到 FixIt 主題" card=true >}}

<!--more-->

{{< cardlink href="https://lruihao.cn/friends/" content="友情鏈接範本" >}}
{{< link href="https://lruihao.cn/friends/" content="友情鏈接範本" card=true >}}

## 創建模板
開始之前去看了 hugo 的官網,再看了一下 go 模板的語法。
Expand Down
6 changes: 3 additions & 3 deletions content/posts/linkcard.md
Expand Up @@ -34,12 +34,12 @@ window.onload = () =>{
```
## 使用
```html 知乎卡片链接
<!--知乎卡片链接-->
<script type="text/javascript" src="/js/src/card-link.js"></script>
<!--知乎卡片链接-->
<script type="text/javascript" src="/js/src/card-link.js"></script>
```
html 链接写法,a 标签加上`class="card-link"`
```
<a href="https://github.com/Lruihao/lruihao.github.io" target="_blank" class="card-link">Lruihao 博客</a>
```

{{< cardlink href="https://github.com/Lruihao/lruihao.github.io" content="Lruihao 博客" >}}
{{< link href="https://github.com/Lruihao/lruihao.github.io" content="Lruihao 博客" card=true >}}
2 changes: 1 addition & 1 deletion content/posts/subl_imgpaste2.md
Expand Up @@ -10,7 +10,7 @@ categories:
- others
---

{{< cardlink href="https://github.com/robinchenyu/imagepaste" content="插件地址" title="插件地址" >}}
{{< link href="https://github.com/robinchenyu/imagepaste" content="插件地址" title="插件地址" card=true >}}

<!--more-->

Expand Down
2 changes: 1 addition & 1 deletion content/projects/cos-album/index.md
Expand Up @@ -31,7 +31,7 @@ cos 桶相册,终于!!终于来了!!,idea 来自 [兰州小红鸡 -
- **PicGo** 图床上传工具 【第三方、推荐】

# 食用方式
{{< cardlink href="http://github.com/Lruihao/cos-album" content="下载地址,别忘点赞哈" >}}
{{< link href="http://github.com/Lruihao/cos-album" content="cos album 相册源码下载地址,别忘点赞哈" card=true >}}
1. 首先,下载源码,引入 `cos-album.css``cos-album.js`
2. 然后,在你的 js 中 new 一个 Cosalbum 对象 ( xmlLink 后不需要添加`/`)

Expand Down
2 changes: 1 addition & 1 deletion themes/FixIt
Submodule FixIt updated from 1d4e43 to a5962c

0 comments on commit ba6f399

Please sign in to comment.