Jeffrey Harris

Converting this site from Jekyll to eleventy

The original template of this site was one that came with the script to convert a yaml array of my portfolio projects into a portfolio page. It was probably good back in the days when the template was originally designed, but I don't like it any more, so I'm switching to the eleventy static site generator, and their official starter. Obviously since it's the official starter, this has to look better, right?

Getting a clean working directory

Since I don't really want to lose all the existing git history, I'm starting with a git worktree and an orphan branch.

git worktree add ../11ty.jeffharris.us
cd ../11ty.jeffharris.us
git switch --orphan 11ty

Sweet. Now I copied the base blog files into my directory, added some scripts to my package.json file:

  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "npx @11ty/eleventy",
    "serve": "npx @11ty/eleventy --serve"
  },

And fire up my npm run serve development server, making necessary changes to the _data/metadata.js file and updating my gitlab-ci.yml file. Static content transfers over easily.

Posts transfer over mostly the same, except for post categories. Maybe by the time you see this, it will be all set.

The things that need additional setup, that don't come right out of the box: