Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added gh-pages Formatter (alshedivat#2649)
# Added prettier-hmtl.yml ## GitHub Workflow ## Purpose The GitHub Workflow formats the html files on gh-pages. The html files generated are always on a single line. This makes scaling programs a lot more difficult. By formatting the HTML files, al-folio can now be used to generate code which can then be modified to allow for using back-end. ## Errors found I want to let you know that when I was using prettier for this, it kept crashing and after some debugging I found out that al-folio was generating an invalid tag ```</source>```. ```<source>``` is a self-closing tag and doesn't have a separate closing tag. Error: ```<source src="URL" type="type"></source>``` Correct: ```<source src="URL" type="type">``` ## Workflow Description 1. The workflow starts by checking out the gh-pages branch. 2. Then it finds all ```</source>``` tags in all html files and deletes them. 3. It Installs NodeJS and then Prettier. To make sure the code was executed properly, the workflow checks if prettier is present. 4. Then the workflow runs prettier on all html files present in gh-pages 5. It ends by committing the changes and pushing them to the gh-pages directory # Example: > Before >  > After > 