README.md 1.77 KB
Newer Older
Ferdinand Majerech's avatar
Ferdinand Majerech committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
============
v01d.sk site
============

Static site generated using [Pelican](http://getpelican.com).

Pelican uses [ReStructuredText](http://docutils.sourceforge.net/docs/user/rst/quickref.html) -
a more powerful markdown-like format used mostly by Python projects.

-----------------------------------------
Installing dependencies to build the site
-----------------------------------------

* Install Python 2.x (Debian: `sudo apt install python`)
* Install `pip` (Debian: `sudo apt install python-pip`)
* `pip install pelican`


-------------------------------------
Building the site locally for testing
-------------------------------------

23
* Generate calendar: `./kalendar.py`
Ferdinand Majerech's avatar
Ferdinand Majerech committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
* Generate the site: `pelican -s pelicanconf.py --relative-urls`


------------------
Writing a new post
------------------

* `cd content/posts`
* copy an existing post
* change `date`, `slug`, heading and content

-------------------------------
Adding an event to the calendar
-------------------------------

39
* Add a line in this format to 'events.csv':
Ferdinand Majerech's avatar
Ferdinand Majerech committed
40

41 42 43 44
  Test, 2017-04-27 18:00, "Test event, stuff will happen"

  May need to add some code to e.g.  modify a meetup event (these are
  generated in kalendar.py). Pull requests welcome.
Ferdinand Majerech's avatar
Ferdinand Majerech committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62


-------------------
Directory structure
-------------------

* `content/posts`: Blog posts
* `content/pages`: Site pages (with buttons in nav bar)
* `pelicanconf.py`: Site configuration
* `publishconf.py`: Site configuration changes used for publishing the final
   site but not for local testing
* `.gitlab-ci.yml`: Instructions for publishing the site on gitlab pages
* `kalendar.py`: Script used to generate the calendar page.
   Edit to add events, run periodically from cron.
* `nice-blog`: Site theme
* `nice-blog/static/css`: edit CSS here
* `nice-blog/templates`: edit HTML here