From c3f8712140b84542eeec79b5a039bfdc3c327e68 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 16 May 2023 11:24:36 -0400 Subject: feat: add demo page for github pages --- client.html | 2 -- config.js | 12 +++++++++++- index.html | 9 +++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 index.html diff --git a/client.html b/client.html index 68c6c90..328a38b 100644 --- a/client.html +++ b/client.html @@ -1,8 +1,6 @@ - - diff --git a/config.js b/config.js index 28e29eb..2290a3a 100644 --- a/config.js +++ b/config.js @@ -1,4 +1,14 @@ -const config = { +// Default config +var config = { "base_url": "http://localhost:7060/comments", "page_id": "add-page-id-here" } + + +// github pages config +if (window.location.href === 'https://danielrholland.github.io/simple-comments-widget/client.html'){ + config = { + base_url : 'https://comments.dotemgo.com/comments', + page_id : 'https://danielrholland.github.io/simple-comments-widget/client.html' + }; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..6fad70f --- /dev/null +++ b/index.html @@ -0,0 +1,9 @@ + + + + + + +

Comments Demo Page

+ + -- cgit v1.2.3