Commit 82fee9a5 authored by Lorenzo's avatar Lorenzo

added category and projects as example

parent 75307319
......@@ -128,3 +128,4 @@ defaults:
type: "posts"
values:
lang: "en"
category: articles
{% assign category = include.category %}
{% assign lang = include.lang %}
{% assign posts_lang = site.categories[category] | where:"lang", lang %}
{% assign max_posts = include.max | posts_lang.size %}
<ul class="post-list">
{% for post in posts_lang limit:max_posts %}
<li>
{% if site.show_post_image_posts_list %}
<div style="height:100px;width=100%;margin-bottom:13px;background:url('{{post.header.image | prepend: site.baseurl }}') center center repeat;">
</div>
{% endif %}
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title }}">{{ post.title | escape }}</a>
</h2>
<div class="post-meta-list">
{% include post-meta-info.html post_date=post.date post_url=post.url post_lang=post.lang %}
</div>
<span>{{ post.excerpt | default: post.tagline | markdownify | truncatewords: 140 }}</span>
{%if post.tags.size > 0 %}
<div class="post-meta-list post-tag-list">
{% for tag in post.tags %}
<code>{{ tag | escape }}</code>&nbsp;
{% endfor %}
</div>
{%endif %}
<div class="post-meta-list"><a href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title }}">{{ site.t[lang].read-more }}...</a></div>
</li>
{% endfor %}
</ul>
\ No newline at end of file
---
layout: default
---
<div>
{{ content }}
{% include list-category-posts.html lang=page.lang category=page.category %}
</div>
......@@ -99,7 +99,7 @@
{% assign header-padding-bottom = "20px" %}
{% endif %}
{% if page.layout == 'page' %}
{% if page.layout == 'page' or page.layout == 'category' %}
{% assign page-tagline = page.tagline | escape %}
{% endif %}
......
......@@ -6,40 +6,4 @@ layout: default
{{ content }}
<div>&nbsp;</div>
<h2>{{ site.t[page.lang].latest-posts }}</h2>
<div>&nbsp;</div>
{% assign posts_lang = site.posts | where:"lang", page.lang %}
<ul class="post-list">
{% for post in posts_lang %}
<li>
{% if site.show_post_image_posts_list %}
<div style="height:100px;width=100%;margin-bottom:13px;background:url('{{post.header.image | prepend: site.baseurl }}') center center repeat;">
</div>
{% endif %}
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title }}">{{ post.title | escape }}</a>
</h2>
<div class="post-meta-list">
{% include post-meta-info.html post_date=post.date post_url=post.url post_lang=post.lang %}
</div>
<span>{{ post.excerpt | default: post.tagline | markdownify | truncatewords: 140 }}</span>
{%if post.tags.size > 0 %}
<div class="post-meta-list post-tag-list">
{% for tag in post.tags %}
<code>{{ tag | escape }}</code>&nbsp;
{% endfor %}
</div>
{%endif %}
<div class="post-meta-list"><a href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title }}">{{ site.t[page.lang].read-more }}...</a></div>
</li>
{% endfor %}
</ul>
</div>
---
layout: post
title: "Project page: SEO for Jekyll"
tagline: "An example of a project page within the blog"
title: "Repository page: SEO for Jekyll"
tagline: "An example of a repository page within the blog"
image: /assets/patterns/paisley.png
header:
image: /assets/patterns/asanoha-400px.png
......@@ -11,10 +11,10 @@ repository:
repository_url: https://github.com/lorepirri/jekyll-social-metatags
zip_url: https://github.com/lorepirri/jekyll-social-metatags/archive/master.zip
tar_url: https://github.com/lorepirri/jekyll-social-metatags/tarball/master
tags: ["example", "project", "jekyll theme", "simple blog theme"]
keywords: example, project, theme, simple-blog, jekyll
tags: ["example", "repository", "jekyll seo", "seo"]
keywords: example, repository, seo, jekyll seo, jekyll
ref: example-project-page
lang: en
---
This is an example of a project page. As you can see there are buttons in the header to go to the repository, or directly download the source code.
\ No newline at end of file
This is an example of a repository page. Sometimes you write an article which refers to a repository. As you can see there are buttons in the header to go to the repository, or directly download the source code.
\ No newline at end of file
---
layout: post
title: "Pagina progetto: SEO per Jekyll"
tagline: "Un esempio di pagina progetto all'interno del blog"
title: "Pagina repository: SEO per Jekyll"
tagline: "Un esempio di pagina repository all'interno del blog"
image: /assets/patterns/paisley.png
header:
image: /assets/patterns/asanoha-400px.png
......@@ -11,10 +11,10 @@ repository:
repository_url: https://github.com/lorepirri/jekyll-social-metatags
zip_url: https://github.com/lorepirri/jekyll-social-metatags/archive/master.zip
tar_url: https://github.com/lorepirri/jekyll-social-metatags/tarball/master
tags: ["esempio", "progetto", "tema jekyll", "simple blog theme"]
keywords: esempio, progetto, tema, simple-blog, jekyll
tags: ["esempio", "repository", "jekyll seo", "seo"]
keywords: esempio, repository, seo, jekyll seo, jekyll
ref: example-project-page
lang: it
---
Questa e' un esempio di pagina progetto. Come potete vedere ci sono pulsanti per andare al repository del progetto, o per scaricare direttamente il codice sorgente.
\ No newline at end of file
Questa e' un esempio di pagina progetto. A volte si scrive un articolo con riferimento ad un repository. Come potete vedere ci sono pulsanti per andare al repository del progetto, o per scaricare direttamente il codice sorgente.
\ No newline at end of file
---
layout: post
title: "Cayman Blog Theme"
tagline: "An example of a project within the blog"
image: /assets/patterns/paisley.png
header:
image: /assets/patterns/asanoha-400px.png
repository:
is_project_page: true
show_downloads: true
repository_url: https://github.com/lorepirri/cayman-blog
zip_url: https://github.com/lorepirri/cayman-blog/archive/master.zip
tar_url: https://github.com/lorepirri/cayman-blog/tarball/master
tags: ["example", "project", "jekyll theme", "cayman blog theme"]
keywords: example, project, theme, cayman-blog, jekyll, cayman
ref: cayman-blog-project
lang: en
category: projects
---
This is an example of a project page. As you can see there are buttons in the header to go to the repository, or directly download the source code.
\ No newline at end of file
---
layout: post
title: "Tema Cayman Blog"
tagline: "Un esempio di progetto all'interno del blog"
image: /assets/patterns/paisley.png
header:
image: /assets/patterns/asanoha-400px.png
repository:
is_project_page: true
show_downloads: true
repository_url: https://github.com/lorepirri/cayman-blog
zip_url: https://github.com/lorepirri/cayman-blog/archive/master.zip
tar_url: https://github.com/lorepirri/cayman-blog/tarball/master
tags: ["example", "project", "jekyll theme", "cayman blog theme"]
keywords: example, project, theme, cayman-blog, jekyll, cayman
ref: cayman-blog-project
lang: it
category: projects
---
Questa e' un esempio di pagina progetto. Come potete vedere ci sono pulsanti per andare al repository del progetto, o per scaricare direttamente il codice sorgente.
\ No newline at end of file
......@@ -38,3 +38,13 @@ It has already a Facebook Page associated with it, which gathers all the interac
Have a look at the Github page for more information.
You find this descriptive text in the `index.md` file, so you can change it, or remove it completely, according to your needs.
<h2>Latest Articles</h2>
<div>&nbsp;</div>
{% include list-category-posts.html lang=page.lang category="articles" %}
---
<h2>Latest 3 Projects</h2>
<div>&nbsp;</div>
{% include list-category-posts.html lang=page.lang category="projects" max=3 %}
......@@ -38,3 +38,13 @@ Si puo' specificare una pagina Facebook associata al sito web, con funzionalita'
Dai un'occhiata alla pagina Gitlab per maggiori informazioni.
Trovi questo testo nel file `indice.md`, puoi modificarlo, o rimuoverlo completamente, a seconda delle tue necessitá.
<h2>Articoli Recenti</h2>
<div>&nbsp;</div>
{% include list-category-posts.html lang=page.lang category="articles" %}
---
<h2>Ultimi 3 Progetti</h2>
<div>&nbsp;</div>
{% include list-category-posts.html lang=page.lang category="projects" max=3 %}
---
layout: category
title: Projects
tagline: These are your projects
excerpt: >
These are your projects, listed chronologically. If you are not interested in showing off your projects, delete this page.
permalink: /projects.html
header:
image: /assets/patterns/new_year_background.png
ref: projects
lang: en
order: 1
category: projects
---
These are your projects, listed chronologically. If you are not interested in showing off your projects, delete this page.
<h2>Recent Projects</h2>
<div>&nbsp;</div>
---
layout: category
title: Progetti
tagline: Questi sono i tuoi progetti
excerpt: >
Questi sono i tuoi progetti, in ordine cronologico. Se non sei interessato a mostrare i tuoi progetti, elimina questa pagina.
permalink: /progetti.html
header:
image: /assets/patterns/new_year_background.png
ref: projects
lang: it
order: 1
category: projects
---
Questi sono i tuoi progetti, in ordine cronologico. Se non sei interessato a mostrare i tuoi progetti, elimina questa pagina.
<h2>Progetti Recenti</h2>
<div>&nbsp;</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment