From 56122d691a3dcf2b3a1a3874c91d611dd4c9c770 Mon Sep 17 00:00:00 2001 From: Pieter De Praetere Date: Mon, 11 Jan 2021 21:42:47 +0100 Subject: [PATCH] Added README --- README.md | 106 +++++++++++++++++++++ content/themes/operating-systems/_index.md | 6 ++ scripts/fetch_stands_code.py | 55 ----------- scripts/playbook/fetch_stand_code.yml | 16 ++++ 4 files changed, 128 insertions(+), 55 deletions(-) create mode 100644 README.md create mode 100644 content/themes/operating-systems/_index.md delete mode 100644 scripts/fetch_stands_code.py create mode 100644 scripts/playbook/fetch_stand_code.yml diff --git a/README.md b/README.md new file mode 100644 index 0000000..2fd001b --- /dev/null +++ b/README.md @@ -0,0 +1,106 @@ +Welcome to FOSDEM 2021. This year, we have an experimental digital-only setup for reasons I think you all know. + +## General structure + +The stands.fosdem.org exhibition website is a static website generated with [Hugo](https://gohugo.io/). There is a general part, +created by FOSDEM, containing an overview of each stand, a thematic ordering and some general information, and a stand-specific part. + +We create the general part and will seed the stand-specific part with what you provided during your submission in the _\_index.md_. You can +update the contents of the file, but please make sure you do not remove any of the variables in the _[front matter](https://gohugo.io/content-management/front-matter/)_, otherwise the generator +will crash. + +We've asked for two repositories from you, one with the content (Hugo content files) and one with static files. These repositories do not have +to contain anything else but .md (or .html) files and images respectively. The stand pages will keep the theme we created. + +However, if you wish to provide an added experience, you can link to other pages on your own website. We ask however that you (a) keep the stand +information on stands.fosdem.org, that (b) you make sure that visitors know they are not longer on the FOSDEM website and (c) they can easily go back to stands.fosdem.org (e.g. to look at other stands). + +The structure in your directories is flat (no hierarchy in sub folders). If you wish to create additional hierarchical subfolders, please contact us +and we will set it up. + +We automatically generate a link to your video repository and the chatroom. + +Your stand will live under _stands.fosdem.org/stands/_. + +## Directory structure + +We will clone the repositories you provided in two locations (corresponding to the path _stands/_). + + * `content/stands/` - location of the content files ([Hugo documentation](https://gohugo.io/content-management/organization/)). + * `static/stands/` - location of any static files (images, logo's, etc.). + +## Important files + +### _index.md + + * `content/stands//_index.md` - generated by our custom highly advanced (;-)) script based on what you provided in your submission. + +The contents of the _\_index.md_ file can be changed as you wish, but please make sure you do not remove any of the variables (changing the content +is fine) of the _front matter_, otherwise the generator will not work. Please do not change the theme or the layout. + +#### Front matter + +``` +--- +title: _Project_ +themes: + - _Theme (please do not change from the one already in the repository)_ +website: _Your website_ +logo: stands/_Project_/_Logo filename_ +description: | + _Short description of your project (5 lines)_ + +showcase: | + _Showcase: explain why people should come to your stand. You can use HTML (p, ul, etc.)_ + +new_this_year: | + _What has happened in 2020 to your project? You can use HTML (p, ul, etc.)_ + +layout: stand +--- +``` + +### Any other files + +All other files can by any content Hugo accepts (HTML, MD). + + +## Technical details + +Whatever you put as content of any file (or the contents of _\_index.md_) will appear in the resulting HTML page as follows. +``` + + +[FOSDEM Head] + + +[FOSDEM Header] +
+
+
+ +
+
+
+
+ [Your content] +
+
+
+[FOSDEM Footer] + + +``` + +We use Bootstrap (4.5) for styling, so you can as well. jQuery is included (for Bootstrap), so you can use it. + +Please not that you cannot load any assets (images, css or js) from any other domain than stands.fosdem.org. + +## Feedback +We realise this is certainly not the best possible option, but while we are fairly confident we can organise a physical edition, +going virtual is new for us as well. If you have any ideas for improvements, feedback or anything else, please contact us +at _stands\_at\_fosdem\_dot\_org_. Or open a pull request ;-) diff --git a/content/themes/operating-systems/_index.md b/content/themes/operating-systems/_index.md new file mode 100644 index 0000000..37ae108 --- /dev/null +++ b/content/themes/operating-systems/_index.md @@ -0,0 +1,6 @@ +--- +title: Operating Systems +description: | + None +logo: img/lib/material-icons/operating-systems.svg +--- diff --git a/scripts/fetch_stands_code.py b/scripts/fetch_stands_code.py deleted file mode 100644 index 553b710..0000000 --- a/scripts/fetch_stands_code.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 -import requests -from os import mkdir -from os.path import exists, isfile, isdir - - -def fetch(): - result = requests.get('http://localhost:8000/submission/api/accepted') - result.raise_for_status() - return result.json() - - -def create_skeleton(stand_o): - path = '../content/stands/{0}'.format(stand_o['submission']['project']['name'].lower()) - static_path = '../static/stands/{0}'.format(stand_o['submission']['project']['name'].lower()) - if exists('{0}/.git'.format(path)): - # Pull - cmd = 'git pull origin master' - else: - # Clone - cmd = 'git clone {0}'.format(stand_o['submission']['digital_edition']['stand_website_code']) - if exists('{0}/.git'.format(static_path)): - # Pull - static_cmd = 'git pull origin master' - else: - # Clone - static_cmd = 'git clone {0}'.format(stand_o['submission']['digital_edition']['stand_website_static']) - - -def main(): - print('Fetching list of accepted stands ... ', end=None) - try: - accepted_stands = fetch() - except Exception as e: - print('[FAILED]') - print('\t\t {0}'.format(e)) - return(10) - else: - print('[OK]') - for stand in accepted_stands: - print('Pulling code for {0} ... '.format(stand['submission']['project']['name']), end=None) - try: - create_skeleton(stand) - except Exception as e: - print('[FAILED]') - print('\t\t {0}'.format(e)) - else: - print('[OK]') - return 0 - - - -if __name__ == '__main__': - exit(main()) - diff --git a/scripts/playbook/fetch_stand_code.yml b/scripts/playbook/fetch_stand_code.yml new file mode 100644 index 0000000..960df48 --- /dev/null +++ b/scripts/playbook/fetch_stand_code.yml @@ -0,0 +1,16 @@ +--- +hosts: localhost +tasks: + - name: Fetch list of accepted stands + uri: + url: https://stands.fosdem.org/submission/api/accepted/ + return_content: yes + register: accepted_stands + - name: Create stands content directories + file: + path: "/var/opt/app/fosdem_stands/html/content/stands/{{item['submission']['project']['name']}}" + state: directory + with_items: "{{accepted_stands.json}}" + - name: Download content files + git: + \ No newline at end of file -- 2.30.2