GithubHelp home page GithubHelp logo

docsify-waline's Introduction

docsify-waline

A Docsify comment plugin for docsify that supports pageview statistics.

Pageview statistics rely on docsify-count.

English | 简体中文

Begin

Import Waline v2

<script src="https://unpkg.com/@waline/client@v2/dist/waline.js"></script>
<link
  rel="stylesheet"
  href="https://unpkg.com/@waline/client@v2/dist/waline.css"
/>

Enter waline official website
Configure 'database' and 'server' according to the documentation

Usage

<script>
  window.$docsify = {
    count: {
      language: "", // default:english|chinese
    },
    waline: {
      // Required example:https://your-domain.vercel.app
      serverURL: "https://your-domain.vercel.app",
      // enable pageview count
      pageview: true,
      // ...
      // don't support custom `el` and `path`
    },
  };
</script>

<!--Import me-->
<script src="https://unpkg.com/docsify-waline@2/docsify-waline.min.js"></script>

docsify-waline's People

Contributors

nopdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xueelf

docsify-waline's Issues

waline notification view page doesn't work for docsify

waline notification view page doesn't work for docsify

Steps to reproduce
install latest docsify and integrated with commenting system waline
create a comment for a specific docsify page
the waline admin would receive the notification mail regarding to the new comment
click the view page in the mail to open the specific page(the url contains the anchor for the comment)
What is current behaviour
click the view page would open below url would see 404 error, nothing would show in the browser.
https://docs.xxx.com/#/%232

since %23 is the URL encoded representation of #
manually try again with url https://docs.xxx.com/#/#2 in the browser
it would show the specific page, but it didn't anchor to the comment with id=2

What is the expected behaviour
click the view page and show the page and anchor to the specific comment

maybe need think about rewrite of %23
let waline div anchor works.
Other relevant information
Bug does still occur when all/other plugins are disabled?

Your OS: MAC OS 13.3.1 (22E261)

Node.js version: FROM node:lts-alpine3.17

npm/yarn version:

Browser version: Chrome is up to date Version 112.0.5615.49 (Official Build) (arm64)

Docsify version: RUN npm install -g docsify-cli@latest

Docsify plugins: waline, https://github.com/nopdan/docsify-waline

docsify-waline.min.js:formatted:30 Uncaught ReferenceError: Waline is not defined

按照README操作下来,有如下异常,且评论框出不来

异常信息:

docsify-waline.min.js:formatted:30 Uncaught ReferenceError: Waline is not defined
    at docsify-waline.min.js:formatted:30:13
    at o (docsify@4:1:107814)
    at o (docsify@4:1:107836)
    at o (docsify@4:1:107836)
    at o (docsify@4:1:107836)
    at t.callHook (docsify@4:1:107852)
    at r (docsify@4:1:98083)
    at docsify@4:1:98158
    at docsify@4:1:96912
    at XMLHttpRequest.<anonymous> (docsify@4:1:25277)

关于 visitor 的一些问题

在官网中 公告 有写到,visitor 已更名为 pageview
而且在开启 coverpage 的情况下,进入页面会因获取不到 visitor 节点而导致 js 报错

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.