Skip to content

The shortname of Disqus could contain dash character. #1751

@Hsins

Description

@Hsins

As shown in the figure screenshot from Create a New Site Page on the right-hand side.

The unique Disqus URL could be combined of :

  • Lowercase Letters: abcdefghijklmnopqrstuvwxyz
  • Numbers: 0123456789
  • Dash: -

CodiMD handles the Disqus section in the disqus.ejs. But it doesn't work for shortnames containing dash character, and it doesn't handle shortnames with uppercase letters currently.

It would be better to modify it as following code:

- s.src = 'https://<%= disqus.replace(/[^A-Za-z0-9]+/g, '') %>.disqus.com/embed.js';
+ s.src = 'https://<%= disqus.toLowerCase().replace(/[^a-z0-9-]+/g, '') %>.disqus.com/embed.js';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions