这是indexloc提供的服务,不要输入任何密码
Skip to content

Giscus data-mapping property bug #437

@karanpratapsingh

Description

@karanpratapsingh

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

Try changing the giscus properties for mapping, it's still using the pathname

-      mapping: 'pathname', // supported options: pathname, url, title
+      mapping: 'title', // supported options: pathname, url, title

Expected behavior

Looks like we don't need to compute title/href in switch in Comments component located at components/comments and pass it as text. This is becuase giscus.js picks it automatically. Seems like it's an enum not a string property.

-    script.setAttribute('data-mapping', mapping);
+    script.setAttribute('data-mapping', siteMetadata.comment.giscusConfig.mapping);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions