Background: I'm having to build a bunch of similar pages*, 50 or more. They share a lot of design and content so I will be encapsulating/reusing as much of the styling and content as possible. Still, each page has unique elements and may have arbitrary design elements, so the pages can't just be manufactured programatically from a database or resource file.
What might help: Because there are so many pages to keep track of I would like to edit them in a big table rather than in a long scrolling text file or in separate files. That would make it easy to compare and contrast the code for each page. The table would look something like this:
| Group | Page name | Description | Formatting | Header | Body | Footer |
|-------|-----------|-------------|------------|--------|------|--------|
| 1 | Page1 |text |code |code | code | code |
| 1 | Page2 |text |code |code | code | code |
| 2 | Page3 |text |code |code | code | code |
The first three fields in this example are for my own use or maybe would go into the pages as metadata, while the remaining fields show where the 'real' code would go.
Questions:
Am I on the right track with the idea of editing the page code in tabular form? Are there established better ways to set up a whole group of similar pages together?
If tabular editing does make sense, what tool should I use?
Tools I've considered:
Text/code editors: Ok, no surprise, but I haven't found any code editors that let you display and edit a file as rows and columns defined by, maybe, special tags. Does anything like that exist?
Spreadsheets and structured databases: great for basic rows and columns, but terrible for text editing, and display of multiline rows is lousy.
A specialized "structured text" database: Maybe one exists, but my searches came up empty. Most 'text databases' are for unstructured/freeform text.
"Table editors": wrong idea, correct? They're for generating code for table structures that you then display on pages, or use in database forms or reports.
Word processors. For now I'm going with a table in Microsoft Word, treating the HTML as ordinary text. With the page width set to Word's max (22") and the font really small, there's plenty of room for the columns I need. I lose all the help a code editor provides and that's a big loss, but at least I can see what I'm doing. Word has a keyboard command that lets you move one or more rows as a block up and down in a table, so that helps for comparing pages. But another major downside is that I will still have to export the table to a CSV using a Word VBA 'macro,' then write a little script to loop through the CSV to create the actual pages. I haven't coded those conversion routines yet, so if you have any alternatives to suggest, please do.
*The 'pages' for this project are actually Anki card types.