Here are the essential parts of this project's file structure. The first,
dceu2019/
contains a Django project and hugo_site/
contains the
Hugo project for static site generation (the main
site):
. βββ dceu2019 # <= Django project βΒ Β βββ db.sqlite3 # <= NOT in repo βΒ Β βββ __init__.py βΒ Β βββ manage.py βΒ Β βββ MANIFEST.in βΒ Β βββ media βΒ Β βββ README.md βΒ Β βββ setup.cfg βΒ Β βββ setup.py βΒ Β βββ src βΒ Β βΒ Β βββ dceu2019 βΒ Β βΒ Β βΒ Β βββ apps βΒ Β βΒ Β βΒ Β βΒ Β βββ __init__.py βΒ Β βΒ Β βΒ Β βββ __init__.py βΒ Β βΒ Β βΒ Β βββ locale βΒ Β βΒ Β βΒ Β βββ settings βΒ Β βΒ Β βΒ Β βΒ Β βββ base.py βΒ Β βΒ Β βΒ Β βΒ Β βββ dev.py βΒ Β βΒ Β βΒ Β βΒ Β βββ __init__.py βΒ Β βΒ Β βΒ Β βΒ Β βββ local.py # <= NOT in repo βΒ Β βΒ Β βΒ Β βΒ Β βββ pretalx.py βΒ Β βΒ Β βΒ Β βΒ Β βββ production.py βΒ Β βΒ Β βΒ Β βββ static βΒ Β βΒ Β βΒ Β βββ templates βΒ Β βΒ Β βΒ Β βββ urls.py βΒ Β βΒ Β βΒ Β βββ wsgi.py βΒ Β βΒ Β βββ __init__.py βΒ Β βββ staticfiles βΒ Β βββ ... βββ hugo_site # <= Hugo project Β Β βββ content # <= This is where all the content lives! Β Β βΒ Β βββ ... Β Β βββ themes Β Β βββ dceu2019 # <= The theme Β Β βββ layouts # <= HTML templates Β Β βββ static # <= CSS etc Β Β βββ ...
We use a static main site because we want to archive the main conference website as easily as possible. We are using the latest Hugo from the Debian repositories, but the version from Ubuntu 18.04 is too old.
See below method to directly fetch 2 .deb files from a Debian mirror and install them.
# Install Hugo
$ wget https://mirror.csclub.uwaterloo.ca/debian/pool/main/libs/libsass/libsass1_3.5.5-4_amd64.deb -O /tmp/libsass1.deb
$ wget https://mirror.csclub.uwaterloo.ca/debian/pool/main/h/hugo/hugo_0.55.6+really0.54.0-1_amd64.deb -O /tmp/hugo.deb
$ sudo dpkg -i /tmp/hugo.deb /tmp/libsass1.deb
# Go to project directory
$ cd hugo_site
# Run dev server
$ hugo server
The Django project will be used before and during the conference for planning purposes: Talk submissions, scheduling, and ticket holder services such as ride sharing and accommodation sharing.
You can install and work on a development version following these steps:
# Create a Python 3.6+ virtualenv (virtualenvwrapper)
$ mkvirtualenv -p python3
# Install project & dependencies in "editable" mode (-e), with the [dev]
# dependency subset.
# You should repeat this command when you pull in new changes which can
# contain new requirements or version upgrades
$ pip install -e "dceu2019[dev]"
# Install our code-quality pre-commit hooks (a.k.a. linting)
$ pre-commit install
# Try invoking the Django main management script
$ python dceu2019/manage.py
# ...you will be told that it has created a local.py file. You might want to
# edit this now or later depending on your needs.
# When ready, run migrations.
$ python dceu2019/manage.py migrate
# Initialize PreTalx: Creates a superuser etc.
$ python dceu2019/manage.py init
# Now you can run the development server
$ python dceu2019/manage.py runserver
# Point your browser to localhost:8000/ and you'll see an empty schedule
Add an item to the array in this file: hugo_site/data/sponsors.json
, and logo image here: hugo_site/static/static/sponsors/
{
"name": "Company Name",
"logo": "logo.png",
"website": "#"
}