Skip to content

Commit

Permalink
update eleventy config
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Mineev authored and umputun committed Jan 18, 2022
1 parent 5d1f021 commit aabee83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions site/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ function noteContainer() {
}

function markdownTableWrapper(md) {
md.renderer.rules.table_open = function(tokens, idx, options, _, self) {
return `<div class="overflow-x-auto">` + self.renderToken(tokens, idx, options)
md.renderer.rules.table_open = function (tokens, idx, options, _, self) {
return (
`<div class="overflow-x-auto">` + self.renderToken(tokens, idx, options)
)
}
md.renderer.rules.table_close = function(tokens, idx, options, _, self) {
md.renderer.rules.table_close = function (tokens, idx, options, _, self) {
return self.renderToken(tokens, idx, options) + `</div>`
}
}
Expand Down Expand Up @@ -103,6 +105,7 @@ module.exports = function (eleventyConfig) {
)

return {
markdownTemplateEngine: false,
dir: {
input: 'src',
output: 'build',
Expand Down
3 changes: 1 addition & 2 deletions site/src/data/github.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const fetch = require('node-fetch')

const DEFAULT_DATA = { latestVersion: '' }
let currentData = null

Expand All @@ -8,6 +6,7 @@ module.exports = async function getLatestReleaseVersion() {
return currentData
}
try {
const fetch = await import('node-fetch')
const res = await fetch(
'https://api.github.com/repos/umputun/remark42/releases'
)
Expand Down

0 comments on commit aabee83

Please sign in to comment.