Create your own custom Static Site Generator (like Jekyll or Hugo) by cloning and fulfilling the requirements in this repo!
š makesite
āāā README.md
āāā first-post.txt
āāā latest-post.txt
āāā makesite.go
āāā template.tmpl
makesite
.$ git clone [email protected]:Make-School-Labs/makesite.git
$ cd makesite
$ git remote rm origin
$ git remote add origin [email protected]:YOUR_GITHUB_USERNAME/makesite.git
For each task:
Complete the MVP as If you finish early, move on to the stretch challenges.
If you get stuck on any step, be sure to print the output to stdout
!
4
of README.md
. Change this line to the following, replacing YOUR_USERNAME
and YOUR_REPONAME
with your GitHub username and repository name respectively.first-post.txt
file.template.tmpl
) to display the contents of first-post.txt
.first-post.txt
using Go Templates and print it to stdout.first-post.html
../makesite
. Double-click the first-post.html
file that appears in your directory after running the command to open the generated page in your browser.file
. This flag represents the name of any .txt
file in the same directory as your program. Run ./makesite --file=latest-post.txt
to test.save
function to use the input filename to generate a new HTML file. For example, if the input file is named latest-post.txt
, the generated HTML file should be named latest-post.html
..txt
files for testing in the same directory as your project.makesite
command named dir
..txt
files in the given directory. Print them to stdout
..txt
files you found, generate an HTML page for each../makesite --dir=.
to test in your local directory..txt
files in the given directory, as well as it's subdirectories. Print them to stdout
to make sure. Generate an HTML page for each.Success! Generated 5 pages.
The Success!
substring must be bold green, and the count (5
) must be bold.Success! Generated 5 pages (18.2kB total).
Calculate the total by summing the size of each HTML file, then converting the total to kilobytes. Always return one significant digit after the decimal point.Success! Generated 5 pages (18.2kB total) in 3.25 seconds.
Always return two significant digits after the decimal point..txt
files. Are there any ways to make your code faster?.md
) files and transform them into HTML. #
through ######
should translate to <h1>
through <h6>
elements.I will use the __________________________________ library. The documentation is located at __________________________________. My goal is to use it to __________________________________.