Skip to content

Commit 18e368f

Browse files
committed
docs(readme): updates examples to ESM
1 parent 9f8e97c commit 18e368f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This Eleventy plugin provides two [template filters](https://www.11ty.dev/docs/f
99

1010
🌏 This plugin is made primarily to populate `<updated>` fields in an RSS feed. Here is [a blog post on how to use this plugin](https://saneef.com/tutorials/fix-dates-on-eleventy-rss-feeds/) with [`eleventy-plugin-rss`](https://www.11ty.dev/docs/plugins/rss/).
1111

12-
⚠️ Getting Git commit date is a bit slow (\~50ms for each path). So, use it sparingly. It's recommended to call this filter within a production flag.
12+
⚠️ Git commit date is a bit slow. So, it's recommended to call this filter within a production flag.
1313

1414
## Usage
1515

@@ -22,13 +22,13 @@ npm install eleventy-plugin-git-commit-date
2222
### 2. Add to Eleventy config
2323

2424
```js
25-
// .eleventy.js
25+
// eleventy.config.js
2626

27-
const pluginGitCommitDate = require("eleventy-plugin-git-commit-date");
27+
import pluginGitCommitDate from "eleventy-plugin-git-commit-date";
2828

29-
module.exports = function (eleventyConfig) {
29+
export default function (eleventyConfig) {
3030
eleventyConfig.addPlugin(pluginGitCommitDate);
31-
};
31+
}
3232
```
3333

3434
### 3. Use in templates

0 commit comments

Comments
 (0)