See https://amsterdam.github.io/datablog.
Description | Dimensions | Filename |
---|---|---|
Default image in post | 800 × | n.a. |
Wide banner image | 2800 × 595 | {{ post.ref }}-wide.jpg |
Thumbnail for post list | 600 × 336 | {{ post.ref }}-thumbnail.jpg |
Open Graph image | 1200 × 630 | {{ post.ref }}-open-graph.jpg |
The data blog is made using Jekyll, a static site generator written in Ruby. To install Jekyll, you can follow the Jekyll Quickstart
To run, test and author this blog locally, first clone the source code from GitHub:
git clone https://github.com/Amsterdam/datablog.git
Then, run Jekyll:
cd datablog
bundle exec jekyll serve --baseurl "" --livereload --incremental
The blog should now be available on http://localhost:4000/.
Jekyll supports working with post drafts, you can put them in the _drafts
directory. For more information about posts and drafts, see Jekyll's documentation.
Adding a new posts:
- First, make sure your name is added to the authors file:
_data/authors.yml
; - Then, create a new Markdown file in
_drafts
; - Start typing! You can use the HTML components from the
_includes
directory to easily add, for example, images, figures and iframes. See the existing posts for examples.
Start Jekyll with the --drafts
option to include the drafts:
bundle exec jekyll serve --baseurl "" --livereload --incremental --drafts
By default, images are loaded from https://amsterdam.github.io/data-blog-assets/ (see _config.yml
).
If you want to add and test images and other assets more easily while writing new posts, it is easier to host these assets locally:
- First, clone the assets repository:
git clone https://amsterdam.github.io/data-blog-assets.git
; - Start a web server in this directory (http-server, for example);
- Create a development configuration file
_config.dev.yml
and specify your local assets server:
baseurl:
assets: http://data-blog-assets.test
production: false
Start Jekyll and use the --config
option to include the development configuration file as well as the default one:
bundle exec jekyll serve -P $PORT --baseurl "" --config "_config.yml,_config.dev.yml" --livereload --livereload_port 52287 --incremental --drafts
You can use Hotel to configure local .localhost
or .test
domains for easy testing of local web servers!
- https://patternlab-amsterdam.infoprojects.nl/
- https://www.amsterdam.nl/stijlweb/ruimtelijke-middelen/wagenpark/
- https://dokuwiki.datapunt.amsterdam.nl/doku.php?id=start:datapunt:huisstijl
Based on https://www.sylvaindurand.org/making-jekyll-multilingual/.
- Improve footer links
- Add contact form
- Include modified Tachyons
- Test Open Graph tags
- Improve
fonts.scss
- Improve code syntax highlighting
- Responsive images
- Lightbox for images
- Scripts to generate different image sizes (or use our IIIF server?)
- Anchor links for headings
- Button to copy code examples to clipboard
- Button to open data in geojson.io
%include
for Leaflet maps