-
Notifications
You must be signed in to change notification settings - Fork 4
Build: Linux
If you want to be able to build and deploy the site yourself look here, otherwise ignore.
First make sure you have python 3. Python 2 will not work, it doesn't do unicode easily so I can't be bothered with it.
Ensure you have virtualenv installed (via pip or apt-get). Navigate to the repo and run the install script
./install
This will create a virtual env folder .env in the root of the repo (it won't be tracked). All of the required python packages will be installed here. Then to build the site (and incorporate any changes) you can run the build script:
./build
Or to test it locally (and have all the links work)
./testbuild
To push the site to the union server (and therefore make it live) you will need at least sftp access (can be requested via a sysadmin form). If you have ssh access then you can run the deploy script:
./deploy {your ic username}
If you only have sftp access then copying the files over in some sftp client will probably work. Maybe ask before doing this though.
Thats it!
Pelican is a python based static site generator. Install it:
pip install pelican
Note that python -m pip install pelican
might be necessary depending on your PATH
.
Install the Markdown package as that is what the trip reports should be written in:
pip install Markdown
Install BeautifulSoup:
pip install beautifulsoup4
Then to build the site run:
pelican content -s publishconf.py
This will build the site and output it to the output folder. To push the site to the union server (and therefore make it live) you will need at least sftp access (can be requested via a sysadmin form). You need to get the contents of the output folder into the /home/www/htdocs/rcc/caving/ folder. If you have ssh access (requested by emailing the sysadmin) then you can run:
rsync -avz -e "ssh -p 10022" --chmod=ug+rwx,o-wx,o+r output/ [email protected]:/home/www/htdocs/rcc/caving
The 'avz' are archive (push the files with all their attributes), verbose (tell us what's going on), and compress (make it smaller for transfer) respectively. The "ssh -p 10022" is an alternative port that gets round the IC vpn. If you have access to the vpn then you can log into that and omit that bit of the command. --chmod.... sets the permissons correctly.