Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

dev-toc.js 348 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
  1. const { liquid } = require('../lib/render-content')
  2. const layouts = require('../lib/layouts')
  3. module.exports = async function devToc (req, res, next) {
  4. if (process.env.NODE_ENV !== 'development') return next()
  5. if (!req.path.endsWith('/dev-toc')) return next()
  6. return res.send(await liquid.parseAndRender(layouts['dev-toc'], req.context))
  7. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...