The website is built using pandoc and python. We are also using a templating system (probably not necessary) called Jinja. Finally, we are using Bootstrap to produce a nice HTML5 navigation bar across the top of the page.
build.py
builds the website and dumps the html files into the folderhtml
deploy.py
performs the process of copying the website togh-pages
branch of the git repo and publishes the updated website.
You will probably have to create a gh-pages
branch in your repo. Then double
check in the setting for the repo, that source for the webpage is the
gh-pages
branch.
First you need to install:
- gitbash
- python 3
- pandoc
- basictex (if we have latex equations or you are building pdfs)
- Right now the only pdf I create is the syllabus
- Open a terminal window and navigate to the repo
- [Only do once] You need to install some python libraries:
pip3 install -U jinja2
- run:
./build.py
- Look in the
html
folder and the website should be there. - Once you are happy with everything, then
publish.py
During the build process, you should see something like this:
kevin@Dalek ece382 $ ./build.py
Cleaning out old html ------------------
>> Made Syllabus
==[labs ] ===============================
>> Made index.html
==[lab1 ] ===============================
>> Made index.html
==[lab2 ] ===============================
>> Made index.html
==[lab3 ] ===============================
>> Copying file arrayScreenShot.gif
>> Made index.html
>> Copying file ir_sensor.jpg
>> Copying file irWave.gif
>> Copying file lab-setup.png
>> Copying file Lab5_test.xlsx
>> Copying file launchpadSetup.jpg
>> Copying file schematic.jpg
>> Copying file start3.c
>> Copying file start3.h
>> Copying file test3.c
==[lab4 ] ===============================
>> Made index.html
>> Copying file lab-setup.png
>> Copying file servo.jpg
>> Copying file servos.png
==[lessons ] ===============================
==[lsn1 ] ===============================
>> Made index.html
>> Copying file Lsn1.pptx
==[lsn13 ] ===============================
>> Made index.html
>> Copying file Lsn13.pptx
==[lsn14-15 ] ===============================
>> Made index.html
>> Made logic_analyzer.html
>> Copying file logic_analyzer_1.jpg
>> Copying file logic_analyzer_2.jpg
>> Copying file logic_analyzer_3.jpg
>> Copying file logic_analyzer_4.jpg
>> Copying file logic_analyzer_5.jpg
>> Copying file logic_analyzer_6.jpg
>> Copying file logic_analyzer_7.jpg
>> Copying file Lsn14-15.pptx
...