Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separation of content from HTML file #8

Open
palmskog opened this issue Aug 31, 2020 · 3 comments
Open

Separation of content from HTML file #8

palmskog opened this issue Aug 31, 2020 · 3 comments
Assignees

Comments

@palmskog
Copy link
Member

palmskog commented Aug 31, 2020

The HTML file (index.html) is currently huge and difficult to edit for would-be contributors. This problem could be addressed by separating the file content from the HTML tags.

For example, the content could use a format such as JSON or YAML (and be akin to an editable database), and some tool or script could generate index.html. One possibility might be to use a mustache template.

One example of how this can be done is Lean's list of undergraduate mathematics: YAML source, generated HTML

@jmadiot
Copy link
Collaborator

jmadiot commented Sep 1, 2020

Note that the content is messier than Lean's list, since there is some formatted html (text with several links per entry), and the statement itself, which may require other escape sequences and addition of some escape sequences when translating to HTML. I'm not sure a JSON or YAML file would be less huge or easier to edit, since there is now one more level of indirection? I initially used a database, and then switched to one html file with much satisfaction.

I'm not against it, I just wanted to mention the complications.

@jmadiot jmadiot self-assigned this Dec 9, 2022
@jmadiot
Copy link
Collaborator

jmadiot commented Dec 9, 2022

f3f9cd1 should solve this issue with a few yaml files, although the main one is still big. I guess removing index.html from the repo would be best since it is generated, but I've kept it as it is more practical for me for now.

@palmskog
Copy link
Member Author

palmskog commented Dec 9, 2022

There's also the possibility of generating index.html (and possibly other files) via GitHub Actions continuous integration and committing it to a specific branch, say gh-pages, for each commit to the master branch. To give an example, we generate JavaScript from Coq/OCaml and deploy it to the gh-pages branch in the Sudoku project (generated file, GitHub Actions configuration).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants