Verified Commit 4c4c7c3e authored by Roberto Bochet's avatar Roberto Bochet
Browse files

Merge branch 'new_site' into develop

parents 2e091650 91e862fb
_site
.sass-cache
.DS_Store
.ruby-version
node_modules
.jekyll-metadata
\ No newline at end of file
/_site
/.sass-cache
/.ruby-version
/.jekyll-metadata
/.jekyll-cache
/.bundle
/vendor
/debug
\ No newline at end of file
image: ruby:2-alpine3.11
stages:
- build
- deploy
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
GIT_SUBMODULE_STRATEGY: recursive
# Build is in `before_script` because it's the same for both deployments
before_script:
- apk add build-base libressl git bash python2
- id
- ls -lah /usr/gem && true
- mkdir -p /usr/gem/cache
- ls -lah /usr/gem && true
- ls -lah /usr/gem/cache
- apk add npm
- npm install
- bundle install
- ./scripts/ci_fix_baseurl.sh
- jekyll build -d public 2>&1 | grep -v 'Using the last argument as keyword parameters is deprecated'
- ./scripts/purgecss.sh public
- ./scripts/minifycssjs.sh public
- ./scripts/add_mailinglist_symlink.sh public
deploy-prod:
stage: deploy
build:
image: jekyll/builder:4.0
stage: build
script:
- apk add rsync openssh
- mkdir -p "$HOME/.ssh"
- echo "$SSH_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
- chmod 700 "$HOME/.ssh/known_hosts"
- chmod 700 "$SSH_DEPLOY_KEY"
- rsync -e "ssh -i $SSH_DEPLOY_KEY" --delete-after -rlptP public/ "$SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:/www.poul.org/"
cache:
key: build-deps
- mkdir public
- chown -R jekyll:jekyll
- jekyll build -d public
artifacts:
paths:
- "node_modules/"
- public
expire_in: 1 day
only:
- master
- develop
- master
pages:
deploy_pages:
stage: deploy
script:
- echo "Already built."
artifacts:
paths:
- public
cache:
key: build-deps
paths:
- "node_modules/"
- public
only:
- develop
deploy_prod:
stage: deploy
image: alpine:3.13
script:
- apk add rsync openssh
- mkdir -p "$HOME/.ssh"
- echo "$SSH_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
- chmod 700 "$HOME/.ssh/known_hosts"
- chmod 700 "$SSH_DEPLOY_KEY"
- rsync -e "ssh -i $SSH_DEPLOY_KEY" --delete-after -rlptP public/ "$SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:/www.poul.org/"
only:
- develop
- master
[submodule "assets/scss/material-kit"]
path = assets/vendor/material-kit
url = https://github.com/creativetimofficial/material-kit.git
[submodule "_data/courses"]
path = _data/courses
url = ../courses-data
[submodule "_posts"]
path = _posts
url = ../posts
---
layout: post
title: Sample post
categories:
- Corsi Linux
- Events
tags:
- Linux
---
Questo è un post d'esempio.
- Elemento
- Di
- Una lista
1. Numerata
2. Se
3. Proprio
4. Vogliamo
## Code
```python
import sys
def hello():
sys.stdout.write("Complicated hello world\n")
if __name__ == "__main__":
hello()
```
## Images
- Upload to `assets/img/post-slug`, i.e. `assets/img/1970-01-01-sample_post`
```
![{% raw %}{{ site.baseurl }}{% link 'assets/img/1970-01-01-sample_post/image.jpg' %}]{% endraw %}
```
## Link to page on this site
```
[label]({% raw %}{{ site.baseurl }}{% link 'path-to-file.md' %}{% endraw %})
```
## Link to post
If the post is under a subdirectory, it needs to be included.
```
[label]({% raw %}{{ site.baseurl }}{% post_url wp-export/2019-03-10-corsi-linux-2019 %}{% endraw %})
```
Result: [label]({{ site.baseurl }}{% post_url wp-export/2019-03-10-corsi-linux-2019 %})
## WordPress Alert Boxes
A number of old WordPress alert boxes have been ported. They have a slightly more complicated syntax.
To put links in them, please use plain HTML (as opposed to Markdown — you can use Jekyll tags).
Note that only the first two have been styled out of laziness. More can be added if needed.
#### Important
{% include alerts/important.html content="Important" %}
```
{% raw %}{% include alerts/important.html content="Important" %}{% endraw %}
```
#### Notice
{% include alerts/notice.html content="Notice" %}
```
{% raw %}{% include alerts/notice.html content="Notice" %}{% endraw %}
```
#### Red
{% include alerts/red.html content="Red" %}
```
{% raw %}{% include alerts/red.html content="Red" %}{% endraw %}
```
#### Warning
{% include alerts/warning.html content="Warning" %}
```
{% raw %}{% include alerts/warning.html content="Warning" %}{% endraw %}
```
......@@ -4,4 +4,3 @@ gem "jekyll"
gem "jekyll-paginate"
gem "support-for"
gem "jekyll-sitemap"
gem 'jekyll-purgecss'
GEM
remote: http://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.4)
em-websocket (0.5.1)
concurrent-ruby (1.1.8)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.10.0)
ffi (1.15.0)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
jekyll (4.2.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-paginate (1.1.0)
jekyll-purgecss (0.2.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.3.1)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.1.2)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.7.3)
rexml (3.2.5)
rouge (3.26.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
support-for (1.0.7)
sass (~> 3.3)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
PLATFORMS
ruby
......@@ -65,9 +73,8 @@ PLATFORMS
DEPENDENCIES
jekyll
jekyll-paginate
jekyll-purgecss
jekyll-sitemap
support-for
BUNDLED WITH
2.0.2
2.2.16
File mode changed from 100755 to 100644
[![pipeline status](https://gitlab.poul.org/sito/poul-jekyll/badges/master/pipeline.svg)](https://gitlab.poul.org/sito/poul-jekyll/commits/master)
Theme based on [Long Haul](https://github.com/brianmaierjr/long-haul)
## Writing new posts
......@@ -85,23 +87,31 @@ These boxes are available:
### Sample post
A sample post is available at `/1970-01-01-sample_post`. View it in the website for a quick demo.
A sample post is available at `/examples/1970-01-01-sample_post`. View it in the website for a quick demo.
## Local preview (i.e. to see posts before commiting)
Please read the notes below first!
You need `docker`:
```bash
docker run --rm --volume="$PWD:/srv/jekyll" -p 4000:4000 -it jekyll/jekyll jekyll serve --incremental
```
You can also run the container with `podman`:
```bash
podman run --rm --volume="$PWD:/srv/jekyll:z" -p 4000:4000 -e JEKYLL_UID=48 -e JEKYLL_GID=48 -it jekyll/jekyll jekyll serve --incremental
```
Site preview will be available at [localhost:4000](http://localhost:4000).
**Note:** the BITS button may not work when running locally.
**Note:** images from old posts will not display as they're not included in the repository.
**Note:** you have to init submodule
**Note:** you have to init submodule (`git submodule update --init`)
## Preview on GitLab Pages
......
title: POuL
description: Politecnico Open unix Labs
title: "POuL"
description: "Politecnico Open unix Labs"
url: https://poul.org
url: "https://poul.org"
baseurl: ""
paginate_path: "events/page/:num/"
permalink: /:year/:month/:title/
paginate_path: "posts/page/:num/"
permalink: "/:year/:month/:title/"
static_url: "https://static.poul.org"
markdown: kramdown
highlighter: rouge
......@@ -18,28 +19,36 @@ navigation:
url: /index.html
- title: About
url: /about
- title: Events
url: /events
- title: Headquarters
url: /hq
- title: Courses
url: /courses
- title: Coding Gym
url: /coding_gym
- title: Contacts
url: /contact
- title: Projects
url: /projects
- title: Posts
url: /posts
exclude:
- Gemfile
- Gemfile.lock
- README.md
- LICENSE
- scripts
- node_modules
- examples
- .sass-cache
- vendor
- .bundle
social:
telegram: poulpolimi
instagram: poul.polimi
facebook: poul.polimi
twitter: poul_polimi
github: Politecnico-Open-unix-Labs
youtube: POuLpolimi
rss: '/feed.xml'
email: https://list.poul.org/postorius/lists/mailinglist.poul.org/
telegram: "poulpolimi"
instagram: "poul.polimi"
facebook: "poul.polimi"
twitter: "poul_polimi"
github: "Politecnico-Open-unix-Labs"
youtube: "POuLpolimi"
rss: "/feed.xml"
email: "https://list.poul.org/postorius/lists/mailinglist.poul.org/"
sass:
sass_dir: assets/_sass
\ No newline at end of file
sass_dir: assets/_sass
style: compressed
\ No newline at end of file
date: 2019-10-29 17:15
room: E/F
coding_gym_url: https://coding-gym.org/events/2019-10-29-it-polimi/
contest_url: https://www.hackerrank.com/coding-gym-polimi1019
registration_url: https://coding-gym-polimi1019.eventbrite.it
\ No newline at end of file
date: 2019-11-25 17:15
room: 5.0.3
coding_gym_url: https://coding-gym.org/events/2019-11-25-it-polimi/
contest_url: https://www.hackerrank.com/coding-gym-polimi1119
registration_url: https://coding-gym-polimi1119.eventbrite.it
\ No newline at end of file
date: 2020-01-24 17:15
room: 3.1.6
coding_gym_url: https://coding-gym.org/events/2020-01-24-it-polimi/
contest_url: https://www.hackerrank.com/coding-gym-polimi0120
registration_url: https://coding-gym-polimi0120.eventbrite.it
\ No newline at end of file
date: 2020-02-26 17:15
room: 5.0.2
coding_gym_url: https://coding-gym.org/events/2020-02-26-it-polimi/
contest_url: https://www.hackerrank.com/coding-gym-polimi0220
registration_url: https://coding-gym-polimi0220.eventbrite.it
\ No newline at end of file
Subproject commit e48fd33d0b808bb0b9414eb6e42a0b6723b534ce
<div class="material-kit hq-status-fab">
<a class="btn btn-round btn-lg btn-gialla loading" href="https://bits.poul.org" title="POuL headquarters status">
<i class="loading-indicator fa fa-sync fa-spin fa-fw"></i>
<div class="ripple-container"></div>
</a>
<div class="hq-status-fab">
<a class="btn bits bits-loading" href="https://bits.poul.org" title="POuL headquarters status"></a>
</div>
{% assign page.has_bits_button = true %}
<div class="band course-edition">
{% if include.past_label %}
{% if include.edition.is_past %}
<h2>Last edition</h2>
{% else %}
<h2>Next edition</h2>
{% endif %}
{% endif %}
<h2 id="{{ edition.begins | date: '%Y-%m' }}">{{ include.edition.name | markdownify }}</h2>
{% if include.edition.description %}
<div class="container text-align-center">
{{ include.edition.description | markdownify }}
</div>
{% endif %}
{% if include.edition.schedule %}
<h3>Schedule</h3>
<div class="schedule">
{% for session in include.edition.schedule %}
<div class="session">
<div class="date">
{% if session.date %}
<div>{{ session.date | date: "%b %d" | upcase }}</div>
<div class="time">{{ session.date | date: "%H:%M" }}</div>
{% endif %}
</div>
<div class="room">
{% if session.room %}
<div class="caption">Room</div>
{% if session.room.url %}
<div><a href="{{ session.room.url }}">{{ session.room.room }}</a></div>
{% else %}
<div>{{ session.room.room }}</div>
{% endif %}
{% endif %}
</div>
<div class="topics">
{% for topic in session.topics %}
<div>{{topic}}</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if include.edition.sponsored %}
<p class="contribute">~ sponsorizzato dal Politecnico di Milano</p>
{% endif %}
</div>
\ No newline at end of file
<ul class="posts noList">
{% for post in paginator.posts %}
<li>
<span class="date">{{ post.date | date: '%B %d, %Y' }}</span>
<h3><a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h3>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.excerpt | strip_html }}{% endif %}</p>
</li>
{% endfor %}
</ul>
<!-- Pagination links -->
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="previous button__outline">Newer Posts</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="next button__outline">Older Posts</a>
{% endif %}
</div>
......@@ -4,7 +4,7 @@
{% for category in events_categories %}
<div class="styled-grid-item">
<div>
<a href="{{ '/topic/' | append: category | append: '/' | prepend: site.baseurl }}">{{ category }}</a>
<a href="{{ '/topic/' | append: category | append: '/' | realtive_url | uri_escape }}">{{ category }}</a>
</div>
</div>
{% endfor %}
......
<div class="footer content bg-darker">
<div class="container">
<p class="copy">&copy; {{ site.time | date: '%Y' }}
<a href="https://www.poul.org">POuL</a>
<a href="https://gitlab.poul.org/sito/poul-jekyll">Source code</a>
<a href="#" id="fix-sotto-storto-link" onclick="fixSottoStortoCit(); return false;">Fix rotation</a>
<a href="{{ site.baseurl }}/privacy/">Privacy</a>
</p>
<div class="footer-links">
<ul class="noList">
{% if site.social.telegram %}
<li><a href="https://telegram.me/{{ site.social.telegram }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-telegram fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.instagram %}
<li><a href="https://www.instagram.com/{{ site.social.instagram }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-instagram fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.facebook %}
<li><a href="https://www.facebook.com/{{ site.social.facebook }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.twitter %}
<li><a href="https://twitter.com/{{ site.social.twitter }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.youtube %}
<li><a href="https://www.youtube.com/user/{{ site.social.youtube }}/videos">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-youtube fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.github %}
<li><a href="https://github.com/{{ site.social.github }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.rss %}
<li><a href="{{ site.social.rss }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-rss fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
{% if site.social.email %}
<li><a href="{{ site.social.email }}">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-envelope fa-stack-1x link-icon"></i>
</span>
</a></li>
{% endif %}
</ul>
</div>
<footer class="bg-black">
<div>
&copy; {{ site.time | date: '%Y' }}
<span><a href="https://www.poul.org">POuL</a></span>
<span><a href="https://gitlab.poul.org/sito/poul-jekyll">Source code</a></span>
<span class="desktop-only"><a href="#" id="fix-sotto-storto-link">Fix rotation</a></span>