diff --git a/web/counter.ejs b/web/counter.ejs
new file mode 100644
index 00000000..106332c5
--- /dev/null
+++ b/web/counter.ejs
@@ -0,0 +1,56 @@
+
+
+
+
+
+ remark42 counter
+
+
+
+
+
+
+ First counter with url from data-attribute:
+
+ (note)
+
+
+
+ Second counter with url from global remark config:
+
+ (note)
+
+
+
+ If it can't get url from data-attribute or remark config, it will try to use window.location.href for it.
+
+
+
+
+
+
+
diff --git a/web/webpack.config.js b/web/webpack.config.js
index 33bcf282..277d2fe9 100644
--- a/web/webpack.config.js
+++ b/web/webpack.config.js
@@ -40,6 +40,7 @@ module.exports = {
entry: {
remark: './app/remark',
embed: './app/embed',
+ counter: './app/counter',
},
output: {
path: publicFolder,
@@ -98,7 +99,17 @@ module.exports = {
new Define({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
}),
- new Html({ template: path.resolve(__dirname, 'index.ejs'), inject: false }), // TODO: we should add it only on demo serv
+ // TODO: we should add it only on demo serv
+ new Html({
+ template: path.resolve(__dirname, 'index.ejs'),
+ inject: false,
+ }),
+ // TODO: we should add it only on demo serv
+ new Html({
+ template: path.resolve(__dirname, 'counter.ejs'),
+ filename: 'counter.html',
+ inject: false,
+ }),
...(env === 'production' ? [] : [new Html({
template: path.resolve(__dirname, 'dev.ejs'),
filename: 'dev.html',