Skip to content
Browse files

Restructure site to contain an english-only blog

  • Loading branch information...
Jakob Holderbaum
Jakob Holderbaum committed Nov 28, 2018
1 parent 80a44b2 commit 2a214f677ea07bdfcd04845b074233a156a82e8f
@@ -2,5 +2,6 @@ source ''

gem 'faraday'
gem 'kramdown'
gem 'kramdown-metadata-parsers'
gem 'sinatra'
gem 'sinatra-contrib'
@@ -13,6 +13,8 @@ GEM
i18n (1.1.1)
concurrent-ruby (~> 1.0)
kramdown (1.17.0)
kramdown-metadata-parsers (0.9.0)
kramdown (>= 1.4)
minitest (5.11.3)
multi_json (1.13.1)
multipart-post (2.0.0)
@@ -44,6 +46,7 @@ PLATFORMS

@@ -0,0 +1,5 @@
# Think About! Blog

This is our conference blog where we keep you posted about things..

We would also like to have a better text here..
@@ -5,23 +5,35 @@ class Builder
def initialize(source_dir, target_dir)
@source_dir = source_dir
@target_dir = target_dir
@renderer =

def run
renderer =
languages = %w[en de]

languages.each do |lang|
Dir['pages/**'].each do |page|
file = page.gsub(/\.erb$/, '').gsub(%r{^pages/}, '')
file = '' if file == 'index.html'
result = renderer.render(lang, file)
target_path = File.join(@target_dir, lang, result.filename)
File.write(target_path, result.content)
Dir['pages/*'].each do |page|
next if page
build_page File.join(@target_dir, lang), lang, page

Dir['pages/blog/*'].each do |page|
next if page
build_page @target_dir, 'en', page.gsub(/\.md$/, '.html')

FileUtils.cp_r(File.join(@source_dir, 'assets'), @target_dir)


def build_page(target_dir, lang, page)
file = page.gsub(/\.erb$/, '').gsub(%r{^pages/}, '')
file = '' if file == 'index.html'
result = @renderer.render(lang, file)
target_path = File.join(target_dir, result.filename)
File.write(target_path, result.content)
@@ -11,12 +11,23 @@ def initialize(source_dir = nil)
def render(lang, url)
file = resolve_path(url)
type = resolve_type(file)
if type == 'text/html'
template ='template.html.erb'))
values =, url, file, render_page(lang, url, file))
if type == 'text/html' || type == 'text/markdown'
type = 'text/html'
template =
page = render_page(lang, url, file)
values =, url, file, page.content, page.meta), url, type)
else, url, file), url, type)
page = render_page(lang, url, file), url, type)

def template_for(file)
if file.start_with? 'blog/'

@@ -41,6 +52,7 @@ def file?(path)

def resolve_path(file)
return file if file?(path(file))
return file.gsub(/\.html$/, '.md') if file?(path(file).gsub(/\.html$/, '.md'))
return resolve_path(file + '.erb') if file?(path(file + '.erb'))
return resolve_path(File.join(file, 'index.html')) if dir?(path(file))
raise, "File not found: #{file}")
@@ -54,18 +66,40 @@ def resolve_type(filename)
when '.png'
when '.md'

def render_page(lang, url, file)
result =

if File.extname(file) == '.erb'
template =
values =, url, file)
result.content = template.result(values._context)
elsif File.extname(file) == '.md'
text =
doc =, input: 'MetadataKramdown')
result.content = doc.to_html
result.meta = doc.root.metadata
result.content =


class Renderer
class RenderedPage
attr_accessor :content
attr_writer :meta

def meta
@meta ||= {}
@@ -93,15 +127,19 @@ def filename
class Renderer
class Values
attr_reader :lang, :url, :file
attr_accessor :locals

def initialize(lang, url, file)
@lang = lang
@url = url
@file = file
@locals = {}

def partial(key)"partials/#{key}.html.erb")).result(_context)
def partial(key, locals = {})
copy = dup
copy.locals = locals"partials/#{key}.html.erb")).result(copy._context)

def content(key)
@@ -145,11 +183,18 @@ def _context

class Renderer
class TemplateValues < Values
attr_reader :main
attr_reader :main, :meta

def initialize(lang, url, file, main)
def initialize(lang, url, file, main, meta = {})
super lang, url, file
@main = main
@meta = meta.each_with_object({}) do |(k, v), result|
result[k.to_sym] = v

def is_blog_post?
file.start_with?('blog/') && file.end_with?('md')
@@ -7,6 +7,14 @@ class Server < Sinatra::Application
status 404

get '/:ignore.png' do
status 404

get '/:ignore.svg' do
status 404

get '/assets/*' do
renderer =
file = params[:splat].first
@@ -15,11 +23,24 @@ class Server < Sinatra::Application

get '/:lang/*' do
get '/blog/**' do
renderer =
lang = 'en'
file = 'blog' + params[:splat].join('/')
result = renderer.render(lang, file)
content_type result.type
rescue Renderer::RenderError => e
[e.type, e.text]

get '/:lang/**' do
renderer =
lang = params[:lang]
file = params[:splat].first
file = params[:splat].join('/')
result = renderer.render(lang, file)
content_type result.type
@@ -0,0 +1,132 @@
title: This is a Blog Post
date: 2018-12-02
author: Jakob

All attendees, speakers, sponsors, organizers and volunteers at our conference
are required to agree with the following code of conduct. Our Awareness-Team
will enforce this code throughout the event. We expect cooperation from all
participants to help ensure a safe environment for everybody.

## The Quick Version

Our conference is dedicated to provide a harassment-free conference experience
for everyone, regardless of gender, gender identity and expression, age, sexual
orientation, disability, physical appearance, body size, race, ethnicity,
religion (or lack thereof), or technology choices. We do not tolerate
harassment of conference participants in any form.

Sexual language and imagery is not appropriate for any conference venue,
including talks, workshops, parties, Twitter and other online media. If talks
are related to sexuality exceptions can be made if this is discussed with the
organizers beforehand and is announced in advance. Conference participants
violating these rules may be sanctioned or expelled from the conference without
a refund at the discretion of the conference’s Awareness-Team.

## The Less Quick Version

Harassment includes offensive verbal comments related to gender, gender
identity and expression, age, sexual orientation, disability, physical
appearance, body size, race, ethnicity, religion, technology choices, sexual
images in public spaces, deliberate intimidation, stalking, following,
harassing photography or recording, sustained disruption of talks or other
events, inappropriate physical contact, and unwelcome sexual attention.

Participants asked to stop any harassing behavior are expected to comply immediately.

Sponsors are also subject to this code. In particular,
sponsors should not use sexualised images, activities, or other material. Booth
staff (including volunteers) should not use sexualised
clothing/uniforms/costumes, or otherwise create a sexualised environment.

If a participant engages in harassing behavior, the conference’s Awareness-Team
may take any action they deem appropriate, including warning the offender or
expulsion from the conference with no refund.

If you are being harassed, notice that someone else is being harassed, or have
any other concerns, please contact a member of conference staff or the
conference’s Awareness-team immediately.

The Awareness-team can be visually identified – details will be published here
in advance. We expect participants to follow these rules at the conference
venues and conference-related social events.

Inspired by: [](

# Our Awareness Teams {#awareness}

[Back to top](#backtotop)

To create a pleasant, safe and respectful atmosphere for all participants of
the Think About! conference we have two Awareness-Teams available during the
conference. "Awareness" in this case means the recognition or perception of
verbal, psychological or physical violations of personal boundaries.

The Teams consist of two people of different genders and are experienced in the
care and consultation of people who have experienced boundary-crossing
situations. One team will be moving freely on the location, another one can be
reached at a fixed position which will be communicated in advance. They will
also be available via a phone number which will be published here as well.

One can also contact the Awareness Team through any of the other conference officials (people working at the conference).

The Awareness Team may warn offenders or exclude them from the conference with no refund.

Further details about our Awareness-Structure and our conduct during incidents will be published here in the future.

You can contact us before or after the conference as well.

The organization team may be reached via mail under the following addresses:

[]( ([GPG](/assets/chrissi.asc))
[]( ([GPG](/assets/jakob.asc))
[]( ([GPG](/assets/andreas.asc))

We shall soon be providing a list of external organizations you may also wish to contact.

# Message of Empowerment {#empowerment}

[Back to top](#backtotop)

You don't have to be able to hack NASA in order to be a part of the Think About! conference. As long as you are considerate of others and intend to learn, you have a place here.

You have the right to decide when, where and by
whom you want to be photographed or filmed. We have available colour-coded conference lanyards for anyone who would prefer not to be photographed or filmed.

You have the right to be treated fairly. Nobody has the right to threaten you or scare you. No matter how. Nobody is allowed to blackmail you, treat you
poorly or hurt you. You decide what goes beyond your limits, nobody else.

You have the right to decide how close people can be to you. Nobody is allowed to touch you, massage you, caress you, kiss you without your consent, or push you to do so to someone else.

You have the right to say NO and to resist when someone oversteps your borders, hurts your feelings or those of someone else. You can say NO with facial
expressions, words or body language. Even if you have said YES before.

Adapted from Amyna e.V., Institute for prevention of sexual abuse via
[]( at the 34C3.

# Respecting Data Sovereignty {#privacy}

[Back to top](#backtotop)

To conduct this conference, we have to store a certain amount of data about
attendees, speakers and sponsors. We believe that the personal data of
individuals should be respected as a private good - so our promise to you is
that we will never share your personal data beyond the minimal technical
necessity. That would be:

* Storing it at out ticket provider ([Pretix]( in Germany)
* Giving payment information to the payment provider selected during checkout
\- unless you wire the money via regular bank transaction
* Storing it in our conference management tool Frab (hosted by
[Hetzner]( in Germany)
* Storing it in our newsletter management tool Mailtrain if you subscribed to
our newsletter (hosted by [Hetzner]( in Germany)

We will neither sell your data nor give it away to any third party without your explicit consent, not even sponsors.

# Disclaimer

This document is a work in progress and will be updated from time to time. In
case you want to participate we welcome you to get in touch with us and send us
your feedback or your suggestions.
Oops, something went wrong.

0 comments on commit 2a214f6

Please sign in to comment.
You can’t perform that action at this time.