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

whats-new-changelog.js 622 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
  1. const { getRssFeed, getChangelogItems } = require('../../lib/changelog')
  2. module.exports = async function whatsNewChangelog (req, res, next) {
  3. if (!req.context.page) return next()
  4. if (!req.context.page.changelog) return next()
  5. req.context.changelogUrl = req.context.page.changelog.label === 'education'
  6. ? 'https://github.blog/category/community/education'
  7. : `https://github.blog/changelog/label/${req.context.page.changelog.label}`
  8. const feed = await getRssFeed(req.context.changelogUrl)
  9. req.context.whatsNewChangelog = await getChangelogItems(req.context.page.changelog.prefix, feed)
  10. return next()
  11. }
Tip!

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

Comments

Loading...