Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add waline comment system #62

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const {
<!doctype html>
<html lang="en" data-theme="lofi">
<head>
<link
rel="stylesheet"
href="https://unpkg.com/@waline/client@v3/dist/waline.css"/>
<BaseHead title={title} description={description} image={image} , ogType={ogType} />
{TRANSITION_API && <ViewTransitions />}
</head>
Expand Down
20 changes: 20 additions & 0 deletions src/layouts/PostLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,24 @@ import { Image } from "astro:assets";
<slot />
</article>
</main>
<div id="waline"></div>
<script type="module">
import { init } from "https://unpkg.com/@waline/client@v3/dist/waline.js";

init({
el: "#waline",
lang: 'en', // The language of the comment system
serverURL: "https://waline.saroprock.com", // This is my own serverURL, please remind the user to change it
dark: false, // Night and day modes, please adapt to them yourself
reaction: [ // This is my own expression, please remind the user to change it. If you want to use the default expression, please enter "true"
"https://saroprock.s3.bitiful.net/good.png",
"https://saroprock.s3.bitiful.net/bad.png",
"https://saroprock.s3.bitiful.net/happy.png",
"https://saroprock.s3.bitiful.net/color.png",
"https://saroprock.s3.bitiful.net/confuse.png",
"https://saroprock.s3.bitiful.net/heart.png",
"https://saroprock.s3.bitiful.net/rocket.png",
"https://saroprock.s3.bitiful.net/eyes.png",],
});
</script>
</BaseLayout>