disqus

Several disqus-threads on one page

做~自己de王妃 提交于 2019-11-27 00:43:10
问题 we have a website where we have list a lot of events, and would like to add discussions to each of the events. So we wanted to use disqus, and checked it out. Turns out they use global variables to configure the instance. like; var disqus_shortname = ''; var disqus_identifier = ''; var disqus_url = ''; This poses a problem for us, when we don't want to use the same identifier, but rather a unique one per disqus instance. tried putting each instantiation + configuration in iframes, but that

Redirect all trailing slashes globally in express

余生长醉 提交于 2019-11-26 10:32:56
问题 I am using Node.js and Express and I have the following routing : app.get(\'/\', function(req,res){ locals.date = new Date().toLocaleDateString(); res.render(\'home.ejs\', locals); }); function lessonsRouter (req, res, next) { var lesson = req.params.lesson; res.render(\'lessons/\' + lesson + \'.ejs\', locals_lessons); } app.get(\'/lessons/:lesson*\', lessonsRouter); function viewsRouter (req, res, next) { var controllerName = req.params.controllerName; res.render(controllerName + \'.ejs\',