Skip to content

minefreak19/html-linker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML Linker

It's essentially the concept of a linker for object files into one static self-contained executable, but for HTML.

It goes through an HTML source file, looks for <script> and <link rel="stylesheet"> tags, and, when it finds one with a src or href attribute as a file, it nabs that file's contents and inlines the script/stylesheet in the HTML document. Test case in ./test/.

Quick Start

$ make all
$ ./bin/htmll ./test/src/index.html -o ./test/out/out.html

Constraints

  • Ending link tags are not supported. This should be easy enough to add in the future, but for now, link tags must end with />.
  • It does not understand URLs in script tags (or link tags, but it ignores those). All paths must be explicitly relative.
    • In the future, this may go grab contents from those URLs

Notes

This project uses my fork of tsoding's String_View library.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published