preface
I wrote a post yesterday at noon to quickly set up a personal blog using VuePress, which extended the message board function, so this is a sequel, below is the flag I posted yesterday
Then we’ll work it out today during our lunch break.
Message board
Add a message board TAB
Added a link configuration item to nav in config.js configuration
{" text ": 'wall'," link ": '/ blogs/views/messageBoard. HTML," icon ":' reco - the suggestion '}Copy the code
Realized effect:
This message board module is added, but there is no corresponding function, so please read on.
Reco topic about message board implementation (you can skip this section or click to see more details)
→ Click to view details ←
The @vuepress-reco/vuepress-plugin-comments plugin is built into the theme. You can choose Valine or Vssue according to your preference.
If you want to default to not loading comments and only display them on certain pages, you can set showComment: false in valineConfig or vssueConfig and isShowComments: true in pages where you want to display comments.
If you do not want to enable comments for only one post, you can set isShowComments: false in front-matter.
- viewsOnly in the use of
Valine
When the display; - becauseviewsThe relevant interface needs to be called when the page is loaded, so all the data of the list page will be loaded together. If the number of articles is large, the loading speed will be affected
1.2.0
Then remove the page views from the list of articles.
For other parameters, see Valine Configuration.
Valine
It can also be found on the Valine website
So we went to leanCloud and created an APP to get an APP ID and an APP Key. Here follow the steps to register and verify the mailbox, and then you can build your own application. You can check your corresponding APPID and Appkey in the Settings.
configuration
Add configuration to config.js on the blog
module.exports = {
theme: 'reco'.themeConfig: {
valineConfig: {
appId: '... '.// your appId
appKey: '... '.// your appKey}}}Copy the code
Configuration effect:
You can find from the above image can leave a message and reply, and more browsing. This completes the blog message board implementation, the code has been updated and uploaded.
Continuing updates…
I don’t know what my ideal blog is but I just want it to get better and better and I want it to be updated in this post. The next step should be to move towards beautifying the blog page, adding some background and action, as in the previous example.
conclusion
Attached is a link to the blog and template preview
- My blog
- Blog Template Preview
And then another cheeky like!
Thumb up! Thumb up! Thumb up!