Merge pull request #402 from johnpuddephatt/master
Allow ID of container node to optionally be provided in comments widget config
This commit is contained in:
@@ -15,6 +15,7 @@ export interface CommentsConfig {
|
||||
max_shown_comments?: number;
|
||||
theme?: Theme;
|
||||
page_title?: string;
|
||||
node?: string;
|
||||
}
|
||||
|
||||
export interface LastCommentsConfig {
|
||||
|
||||
@@ -19,7 +19,7 @@ async function init(): Promise<void> {
|
||||
__webpack_public_path__ = HOST + '/web/';
|
||||
await loadPolyfills();
|
||||
|
||||
const node = document.getElementById(NODE_ID);
|
||||
const node = document.getElementById(remark_config.node || NODE_ID);
|
||||
|
||||
if (!node) {
|
||||
console.error("Remark42: Can't find root node.");
|
||||
|
||||
Reference in New Issue
Block a user