Skip to content

Commit

Permalink
Full ESM seems to work only in 11ty v3, which is still alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
paazmaya committed May 9, 2024
1 parent d550c15 commit 4b05d6e
Show file tree
Hide file tree
Showing 4 changed files with 1,147 additions and 1,258 deletions.
4 changes: 2 additions & 2 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* License: Attribution-ShareAlike 4.0 Unported
* http://creativecommons.org/licenses/by-sa/4.0/
*/
import facebook from './lib/facebook-meta';
import flickrImageList from './lib/flickr-image-list';
import facebook from './lib/facebook-meta.js';
import flickrImageList from './lib/flickr-image-list.js';

/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
export default function(eleventyConfig) {
Expand Down
2 changes: 2 additions & 0 deletions lib/flickr-image-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
import fs from 'node:fs';
import path from 'node:path';
import url from 'node:url';

// If any of the files in 'content/*/*.md' has changed, update the whole cache.
const FLICKR_MATCHER = /(https:\/\/.+\.static\.?flickr\.com\S+\.jpg)/gu;
Expand Down Expand Up @@ -56,6 +57,7 @@ export const findImages = function findImages(dirpath) {
* @returns {Array.<string>} List of images
*/
export default function flickrImageList() {

Check warning on line 59 in lib/flickr-image-list.js

View workflow job for this annotation

GitHub Actions / build

Function 'flickrImageList' has too many lines (23). Maximum allowed is 22
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));

// Loop all Markdown files under content/*/
const dir = path.join(__dirname, '../content/');
Expand Down
Loading

0 comments on commit 4b05d6e

Please sign in to comment.