English
Artalk is a clean self-hosted commenting system that you can easily deploy on your server and integrate into your front-end pages.
Deploy the Artalk comment box on your blog or any other page to add rich social functionality.
npm i -D artalk
Set provider: "Artalk" and pass your server address to the server option:
provider: "Artalk"
server
import { commentPlugin } from '@vuepress/plugin-comment' export default { plugins: [ commentPlugin({ provider: 'Artalk', server: 'https://artalk.example.com', }), ], }
Artalk options are inherited from Artalk Configuration. All serializable options can be set directly in the plugin options.
See the Artalk documentation.
To let Artalk apply the correct theme, pass a boolean to the darkmode prop of <CommentService />, indicating whether dark mode is currently enabled. The plugin forwards it to the Artalk darkMode option.
darkmode
<CommentService />
darkMode
The following options are reserved for the plugin and are automatically inferred from the VuePress context:
string | HTMLElement
The container element, inferred from the VuePress config.
string
The page title, inferred from the VuePress page.
The page key, inferred from the VuePress route.
The site name, inferred from the VuePress site config.
Tips
The two function options imgUploader and avatarURLBuilder can only be set in the client config.
imgUploader
avatarURLBuilder
You can use the defineArtalkConfig function to customize Artalk:
defineArtalkConfig
import { defineArtalkConfig } from '@vuepress/plugin-comment/client' import { defineClientConfig } from 'vuepress/client' defineArtalkConfig({ // Artalk config })
Artalk
Artalk is a clean self-hosted commenting system that you can easily deploy on your server and integrate into your front-end pages.
Deploy the Artalk comment box on your blog or any other page to add rich social functionality.
Usage
Set
provider: "Artalk"and pass your server address to theserveroption:Artalk options are inherited from Artalk Configuration. All serializable options can be set directly in the plugin options.
Deploy Server
See the Artalk documentation.
Dark Mode
To let Artalk apply the correct theme, pass a boolean to the
darkmodeprop of<CommentService />, indicating whether dark mode is currently enabled. The plugin forwards it to the ArtalkdarkModeoption.Options
The following options are reserved for the plugin and are automatically inferred from the VuePress context:
string | HTMLElementThe container element, inferred from the VuePress config.
stringThe page title, inferred from the VuePress page.
stringThe page key, inferred from the VuePress route.
stringThe site name, inferred from the VuePress site config.
Tips
The two function options
imgUploaderandavatarURLBuildercan only be set in the client config.Client Config
You can use the
defineArtalkConfigfunction to customize Artalk: