🇨🇦
hexo-theme-redefine
BlogGithub
English
English
  • Project Description
  • Get Started
    • Installation
    • Update
    • Usage
  • Configuration
    • Create a theme config file
    • base_info
    • style
      • primary_color
      • avatar
      • favicon
      • article_img_align
      • left_side_width
      • content_max_width
      • nav_color
      • hover
      • first_screen
      • scroll
    • social_contact
    • menu
    • home_article
    • post
      • word_count
      • author_label
    • toc
    • copyright_info
    • website_count
    • local_search
    • comment
      • use
      • Waline
      • Gitalk
      • Twikoo
    • rss
    • lazyload
    • cdn
    • pjax
    • footer
  • Advanced
    • Create a page
    • Note modules
    • Article top
    • Mathematical formula
    • Friendship style
    • file comparison
    • Resource compression
Powered by GitBook
On this page
  1. Configuration
  2. comment

Twikoo

PreviousGitalkNextrss

Last updated 2 years ago

Twikoo, a concise, safe, and free static website commenting system developed based on Tencent Cloud.

View details:

  • https://github.com/imaegoo/twikoo

  • https://twikoo.js.org/

Ex. Tencent Cloud CloudBase usage tutorial, please check Twikoo documentation for other methods

If you plan to deploy to an existing cloud development environment, start directly with step 3.

  1. Go to the event page, scroll to the "New User Exclusive" section, select a suitable package (usually a 0 yuan package), and click "Immediately". Buy", and follow the prompts to create a good environment. ::: tip

  • It is recommended to create a Shanghai environment. If you choose Guangzhou environment, you need to configure region: ap-guangzhou

  • Environment name is free to fill in

  • It is recommended to choose the billing method yearly and monthly, the package version basic class 1, no charge will be charged if the free quota is exceeded

  • If prompted to choose "Apply Template", choose "Empty Template" :::

  1. Enter

  2. Go to , enable "Anonymous Login"

  3. Go to , and add the website domain name to "WEB security domain name"

  4. Go to , click "Create Cloud Function"

  5. Please fill in the function name: twikoo, the creation method please select: blank function, the operating environment please select: Nodejs 10.15, the function memory please select: 128MB, click "Next"

  6. Clear the sample code in the input box, copy the following code, paste it into the "Function Code" input box, and click "OK"

exports.main = require('twikoo-func').main
  1. After the creation is complete, click "twikoo" to enter the cloud function details page, enter the "Function Code" tab, click "File - New File", enter package.json, and press Enter

  2. Copy the following code, paste it into the code box, and click "Save and Install Dependencies"

{ "dependencies": { "twikoo-func": "1.2.0" } }
  1. Fill in the environment ID env_id in the Redefine theme configuration file

    twikoo:
      env_id: xxxx-xxxx..........
      region:

    If the Guangzhou environment is selected, the value of region needs to be filled in as ap-guangzhou. If Vercel is used, region can be left empty.

    twikoo:
      region: ap-guangzhou
  2. Twikoo comments plugin renderings.

Screen Shot 2022-10-22 at 11.54.39 AM
CloudBase
Cloud Development Console
Environment - Login Authorization
Environment-Security Configuration
Environment - Cloud Function