From aabee8312dd97b2878ca414fe446fecbc93dd8b4 Mon Sep 17 00:00:00 2001 From: Paul Mineev Date: Tue, 18 Jan 2022 11:07:14 -0800 Subject: [PATCH] update eleventy config --- site/.eleventy.js | 9 ++++++--- site/src/data/github.js | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/site/.eleventy.js b/site/.eleventy.js index 6381a4ff13..6040074652 100644 --- a/site/.eleventy.js +++ b/site/.eleventy.js @@ -27,10 +27,12 @@ function noteContainer() { } function markdownTableWrapper(md) { - md.renderer.rules.table_open = function(tokens, idx, options, _, self) { - return `
` + self.renderToken(tokens, idx, options) + md.renderer.rules.table_open = function (tokens, idx, options, _, self) { + return ( + `
` + 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) + `
` } } @@ -103,6 +105,7 @@ module.exports = function (eleventyConfig) { ) return { + markdownTemplateEngine: false, dir: { input: 'src', output: 'build', diff --git a/site/src/data/github.js b/site/src/data/github.js index e0496c40c8..e1d37012b0 100644 --- a/site/src/data/github.js +++ b/site/src/data/github.js @@ -1,5 +1,3 @@ -const fetch = require('node-fetch') - const DEFAULT_DATA = { latestVersion: '' } let currentData = null @@ -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' )