Display the readme on the repo's start page

Tue Mar 11 2025

tucker.mcknight@gmail.com


    

c560460fc2d9fd480795d2e74b43417904e5be75

darcs pull https://repos.tuckerm.us/repos/eleventy-darcs/branches/main -h c560460fc2d9fd480795d2e74b43417904e5be75
README.md:3
Before
It has some text in it
After
It has some text in it. If your repo contains a markdown file called README.md, it will be shown here.

## TODOs

- [x] Display the readme on the repo home page
- [ ] Syntax highlighting (highlight.js?)
eleventy.config.js:21
Before
After
  eleventyConfig.addAsyncFilter("getReadMe", async (repoName) => {
    const res = await exec(`(cd ${darcsConfig.repos[repoName].location}; darcs show contents README.md)`)
    return res.stdout
  })
repo.njk:13
Before
After

{{ repo | getReadMe | renderContent("md") | safe }}