Waline Documentation
website·Indexed 29 days ago
https://waline.js.org/A simple comment system with backend support, forked from Valine. Waline features a client/server architecture with support for multiple databases including MySQL, PostgreSQL, SQLite, and MongoDB. The documentation covers deployment on platforms like Vercel, Railway, Zeabur, and Baidu Cloud, as well as customization of the @waline/client, plugin systems, and API integration via @waline/api.
What's inside Waline
- Waline is a simple, lightweight comment system with backend support, forked from Valine. It supports full markdown syntax and offers a wide range of deployment and storage options. It is designed to be fast, safe, and free to deploy.
Overview of Waline comment system
Waline is a comment system derived from Valine that includes a built-in backend (effectively 'Valine with a backend'). It is designed to be fast, secure, lightweight, and supports Markdown syntax. It offers a wide variety of deployment and storage combinations.Overview of Waline Comment System
Waline is a simple comment system with backend support, forked from Valine. It is designed to be fast, secure, lightweight, and free to deploy. It provides full support for Markdown syntax and offers a wide variety of deployment and storage options.Understand the difference between Waline and Valine
Waline is a minimalist comment system that includes a built-in backend. It is essentially 'Valine with a backend'. Unlike Valine, which requires a separate cloud engine (like LeanCloud) for administration and notifications, Waline integrates the data storage, server, and client into a single deployment. This means it does not depend on external cloud engine sleep policies for its management features.Retrieve TiDB connection configuration
To obtain the necessary connection details for your TiDB instance:
- Go to the Overview page of your instance.
- Click the Connect button in the upper right corner.
- Set the "Connect with" option to
General. - Use the Reset password option to generate a new password for the database user.
Waline security improvements over Valine
Waline was designed to address several critical security and privacy flaws found in the serverless Valine system:
- XSS Protection: Unlike Valine, which performed frontend filtering before submission, Waline uses a server-side layer and client-side
DOMPurifyto prevent stored XSS. - Privacy Protection: Waline introduces a server layer to filter sensitive information (like user IPs and email addresses), preventing attackers from reading sensitive data directly from the storage service.
- Statistics Integrity: By adding a server layer, Waline isolates modification permissions for read statistics, preventing users from tampering with visit counts via the browser console.
- Enhanced Features: The addition of a backend enables features that were previously impossible in a serverless setup, such as email notifications and spam comment filtering.
- XSS Protection: Unlike Valine, which performed frontend filtering before submission, Waline uses a server-side layer and client-side
Supported clients, servers, and databases for Waline
Waline provides a flexible architecture allowing developers to choose from various clients, server hosting platforms, and database engines.
Supported Clients:
- @waline/client
- MiniValine
- sodesu
Supported Server Platforms:
- Vercel, CloudBase, Railway, Render, Zeabur, Netlify, Alibaba Cloud ComputeNest, Docker, and self-hosting.
Supported Databases:
- MongoDB, MySQL, SQLite, PostgreSQL, TiDB, CloudBase, and GitHub.
Understand the relationship between Waline and Valine
Waline is a version of Valine that includes a built-in backend. While it inherits the style, structure, and internal tools from Valine, the frontend comment list in Waline is rewritten using React.Waline client feature overview
The
@waline/clientlibrary provides several built-in capabilities for interactive blogs:- Rich Formatting: Supports standard Markdown, GFM, HTML tags, and math equations with real-time preview.
- Article Reactions: Allows users to express reactions (like, dislike, etc.) without writing a full comment.
- Image Uploads: Built-in support for image uploads (defaults to base64, but customizable to external hosting).
- Emoji & Search: Includes emoji tabs and a meme/emoji search powered by Giphy.
- Accessibility: Full support for accessibility standards, including keyboard navigation and ARIA labels.
- Styling: Built-in dark mode support and customizable styles via CSS variables.
Retrieve TiDB connection configuration
To obtain the database connection details required for Waline:
- Go to the Overview page of your TiDB instance.
- Click the Connect button in the upper right corner.
- Set the "Connect with" option to
General. - Use the Reset password option to generate a new password for the database user.
Access Waline widgets via the Waline instance
Waline provides a set of built-in widgets that can be accessed and initialized using the syntaxWaline.<widgetName>. Available widgets include the Recent Comment Widget and the Users Rank List/Users Wall Widget.Implement a custom Waline client
Waline uses a classic decoupled Client/Server architecture. Because it provides a comprehensive set of API interfaces, developers can build their own custom client implementations based on the server-side APIs.