Skip to content

Commit

Permalink
“updates”
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia404404 committed Nov 15, 2024
1 parent 5271eff commit bd84066
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 29 deletions.
6 changes: 3 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baseURL = "https://springcecilia.blog"
baseURL = "https://springcecilia.icu"
languageCode = 'zh-cn'
title = 'Ceciliaの 小站'
title = '同人备用粮仓'
theme = "hugo-theme-stack"
summaryLength = 20
paginate = 10
Expand Down Expand Up @@ -127,7 +127,7 @@ url = "https://peing.net/zh-CN/91e8000a0af399"
[[menu.social]]
identifier = "rss"
name = "rss订阅"
url = "https://springcecilia.blog/index.xml"
url = "https://springcecilia.icu/index.xml"

[menu.social.params]
icon = "rss"
Expand Down
Binary file removed content/categories/BDS杂烩/53.jpeg
Binary file not shown.
10 changes: 0 additions & 10 deletions content/categories/BDS杂烩/_index.md

This file was deleted.

Binary file added content/categories/文豪野犬/53.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions content/categories/文豪野犬/_index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "BDS杂烩"
title: "文豪野犬"
description:
slug: "BDS"
image: "53.jpeg"
slug: "文豪野犬"
image: "53.jpg"
style:
background: "#2a9d8f"
color: "#fff"
---
e
161 changes: 160 additions & 1 deletion content/post/建站/【建站6】装修博客.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,171 @@ There is no possibility that any perceptible change will happen within our own l

参考:

[Waline官方文档](https://waline.js.org/guide/get-started/)
先参考[Waline官方文档](https://waline.js.org/guide/get-started/)把LeanCloud 设置好。

[天堂错误文件-Loading hugo 装修日志 02](https://naturaleki.one/post/loadinghugo%E8%A3%85%E4%BF%AE%E6%97%A5%E5%BF%9702/)

[waline无法登录(vercel.app被污染)](https://8bytes.top/2022/12/12/walineErr/)

在themes\hugo-theme-stack\config.yaml里修改代码:

```jsx

comments:
enabled: true
provider: waline

disqusjs:
shortname:
apiUrl:
apiKey:
admin:
adminLabel:

utterances:
repo:
issueTerm: pathname
label:

remark42:
host:
site:
locale:

vssue:
platform:
owner:
repo:
clientId:
clientSecret:
autoCreateIssue: false

# Waline client configuration see: https://waline.js.org/en/reference/client.html
waline:
serverURL: 你的comment域名
lang:
visitor:
avatar: monsterid
requiredMeta: ['mail']
el: '#waline'
reaction: false
emoji:
- https://cdn.jsdelivr.net/gh/norevi/[email protected]/blobs
- https://cdn.jsdelivr.net/gh/Saidosi/[email protected]/azukisan/
reaction:
- https://cdn.jsdelivr.net/gh/Saidosi/[email protected]/azukisan/017.png
- https://cdn.jsdelivr.net/gh/Saidosi/[email protected]/azukisan/029.png
- https://cdn.jsdelivr.net/gh/Saidosi/[email protected]/azukisan/026.png
- https://cdn.jsdelivr.net/gh/Saidosi/[email protected]/azukisan/008.png
- https://cdn.jsdelivr.net/gh/Saidosi/[email protected]/azukisan/035.png

locale:
admin: 博主
placeholder: |
欢迎评论~
开魔法可食用小豆泥和blobcat表情包
左下第五个放大镜按键为评论预览功能(可显示表情最终效果)
填写邮箱可收到博主的回复通知~您的邮箱信息不会被公开。

```

在layouts\partials\comments\provider里建立waline.html,添加代码:


```jsx
<script src='//unpkg.com/@waline/client@v2/dist/waline.js'></script>
<link href='//unpkg.com/@waline/client@v2/dist/waline.css' rel='stylesheet'/>
<div id="waline" class="waline-container"></div>

<style>

:root {
--waline-theme-color: #7f6c46; /*修改主题色,提交按钮*/
--waline-active-color: #f7b99a; /*修改鼠标移到提交按钮上的颜色*/
--waline-badge-color: #7f6c46; /*修改博主徽章色*/
--waline-reaction-color: #7f6c46;
--waline-dark-grey: #020826; /*修改ID颜色*/
--waline-bgcolor: #ffffff;
--waline-bgcolor-light: #ffffff;
--waline-border-color: #7f6c46;
--waline-text-color: #020826; /* 修改亮色模式下文字颜色 */
}

/*夜间模式*/
:root[data-scheme="dark"] {
--waline-theme-color: #fafaf8;
--waline-white: #020826; /*修改按键字体颜色*/
--waline-active-color: #e6e5ab;
--waline-light-grey: #ffffff;
--waline-dark-grey: #ffffff; /*修改ID颜色*/
--waline-badge-color: #ffffff!important;
--waline-text-color: #ffffff!important; /* 修改暗色模式下文字颜色 */

/* 布局颜色 */
--waline-text-color: #ffffff;
--waline-bgcolor: #4A475C;
--waline-bgcolor-light: #4A475C; /*修改选中文本颜色*/
--waline-border-color: #ffffff!important;
--waline-disable-bgcolor: #fdfdfd!important;
--waline-disable-color: #020826;

/* 特殊颜色 */
--waline-bq-color: #e4e4e4; /*修改quote颜色*/

/* 其他颜色 */
--waline-info-bgcolor: #ffffff;
--waline-info-color: #ffffff;
}


.waline-container {
background-color: var(--card-background);
border-radius: var(--card-border-radius);
box-shadow: var(--shadow-l1);
padding: var(--card-padding);
--waline-font-size: var(--article-font-size);
}
.waline-container .wl-count {
color: var(--card-text-color-main);
}

</style>

{{- with .Site.Params.comments.waline -}}
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}

{{- range $key, $val := . -}}
{{- if ne $val nil -}}
{{- $replaceKey := index $replaceKeys $key -}}
{{- $k := default $key $replaceKey -}}

{{- $config = merge $config (dict $k $val) -}}
{{- end -}}
{{- end -}}

<script>
/// Waline client configuration see: https://waline.js.org/en/reference/client.html
Waline.init({{ $config | jsonify | safeJS }});
</script>
{{- end -}}

```

在assets\scss\custom.scss里添加代码:

```jsx
//WALINE
body {
.wl-content .vemoji, .wl-content .wl-emoji {
display: inline-block;
vertical-align: baseline;
height: 2.35em; //调整表情包大小
margin: -0.125em 0.25em;
}
}
```

结果:因vercel被墙需要额外解析dns,不魔法好像加载不出来,算了就这样吧。

<br>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion themes/hugo-theme-stack/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ params:

# Waline client configuration see: https://waline.js.org/en/reference/client.html
waline:
serverURL: https://comment.springcecilia.blog/
serverURL: https://comment.springcecilia.icu/
lang:
visitor:
avatar: monsterid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@
Waline.init({{ $config | jsonify | safeJS }});
</script>
{{- end -}}



Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,3 @@
{{- $customScript := . | js.Build $opts -}}
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
{{- end -}}

<script>
(function(){var w=window;if(w.ChannelIO){return w.console.error("ChannelIO script included twice.");}var ch=function(){ch.c(arguments);};ch.q=[];ch.c=function(args){ch.q.push(args);};w.ChannelIO=ch;function l(){if(w.ChannelIOInitialized){return;}w.ChannelIOInitialized=true;var s=document.createElement("script");s.type="text/javascript";s.async=true;s.src="https://cdn.channel.io/plugin/ch-plugin-web.js";var x=document.getElementsByTagName("script")[0];if(x.parentNode){x.parentNode.insertBefore(s,x);}}if(document.readyState==="complete"){l();}else{w.addEventListener("DOMContentLoaded",l);w.addEventListener("load",l);}})();

ChannelIO('boot', {
"pluginKey": "1f6a9957-560f-42a2-aaf5-ffe3e9d046b8"

});

</script>

0 comments on commit bd84066

Please sign in to comment.