alphagov / google-docs-to-11ty

Convert a docs export to an 11ty website
0 stars 0 forks source link

Tidy up import steps #1

Closed romaricpascal closed 7 months ago

romaricpascal commented 8 months ago

The import does 4 things:

  1. transform the HTML into markdown (makes it easier to find sections)
  2. splits the markdown into individual files based on the h1 in the document
  3. move the images closer to the file embedding them
  4. create data file for each image based on their alt text

Step 2,3 and 4 are combined in a single script, which has grown a little complex and would be better each in their own script, or at least separate JavaScript modules (to avoid re-parsing markdown files).

Potentially, step 1 could be broken down into individual remark/rehype modules as well (for testability).

domoscargin commented 7 months ago

Step 3 has been moved out into a process-images script.

domoscargin commented 7 months ago

Step 4 has been wiped I think? Since it was closely tied to the nav site.

So I think this is pretty much done for now.