diff --git a/_includes/tome-cover b/_includes/tome-cover
new file mode 100644
index 0000000..b64d804
--- /dev/null
+++ b/_includes/tome-cover
@@ -0,0 +1,9 @@
+{%- capture prefix -%}{{ site.extra.store }}/tomes/{%- endcapture -%}
+{%- if include.tome -%}
+{%- assign tome = include.tome -%}
+{%- capture id %}{%- include tome-id tome=tome -%}{%- endcapture -%}
+{%- capture folder %}{%- include tome-field tome=tome field='folder' -%}{%- endcapture -%}
+{{ site.extra.store }}/tomes/{% if folder != '' %}{{ id | split: '/' | first }}{% else %}{{ id }}{% endif %}/{{ tome.cover }}
+{%- else -%}
+{{ prefix }}
+{%- endif -%}
\ No newline at end of file
diff --git a/_includes/tome-field b/_includes/tome-field
new file mode 100644
index 0000000..7d91d01
--- /dev/null
+++ b/_includes/tome-field
@@ -0,0 +1,20 @@
+{%- assign key = include.field -%}
+{%- assign tome = include.tome -%}
+
+{%- assign this-field = tome[key] | strip -%}
+
+{%- capture parent-field -%}
+ {%- include tome-parent tome=tome key=key -%}
+{%- endcapture -%}
+
+{%- if parent-field == '' -%}
+ {{- this-field -}}
+{%- elsif key == 'title' -%}
+ {{- parent-field }} — {{ this-field -}}
+{%- else -%}
+ {%- if this-field != '' -%}
+ {{- this-field -}}
+ {%- else -%}
+ {{- parent-field -}}
+ {%- endif -%}
+{%- endif -%}
\ No newline at end of file
diff --git a/_includes/tome-id b/_includes/tome-id
index 67a1db7..fc646d2 100644
--- a/_includes/tome-id
+++ b/_includes/tome-id
@@ -1 +1 @@
-{{ include.tome.id | split: '/' | slice: 2,3 | join: '/' }}
\ No newline at end of file
+{{- include.tome.path | split: '.' | slice: -2 | join: '.' | split: '/' | slice: 2,3 | join: '/' -}}
\ No newline at end of file
diff --git a/_includes/tome-info.html b/_includes/tome-info.html
new file mode 100644
index 0000000..ba918fa
--- /dev/null
+++ b/_includes/tome-info.html
@@ -0,0 +1,22 @@
+{% capture authors %}{% include tome-field tome=page field='authors' %}{% endcapture %}
+{% if authors != '' %}
+Authors
+
{{ authors }}
+{% endif %}
+
+{% capture publisher %}{% include tome-field tome=page field='publisher' %}{% endcapture %}
+{% if publisher != '' %}
+{% capture publisher_query %}inpublisher:"{{ publisher }}"{% endcapture %}
+Publisher
+{{ publisher }}
+{% endif %}
+
+{% if page.year or page.date %}
+Date
+{{ page.year }} / {{ page.date | split: ' ' | first }}
+{% endif %}
+
+{% if page.webpage %}
+Webpage
+{{ page.webpage }}
+{% endif %}
\ No newline at end of file
diff --git a/_includes/tome-lang b/_includes/tome-lang
new file mode 100644
index 0000000..3c6cfec
--- /dev/null
+++ b/_includes/tome-lang
@@ -0,0 +1 @@
+{{ include.tome.id | split: '/' | slice: 1 }}
\ No newline at end of file
diff --git a/_includes/tome-parent b/_includes/tome-parent
new file mode 100644
index 0000000..da61035
--- /dev/null
+++ b/_includes/tome-parent
@@ -0,0 +1,20 @@
+{%- capture tome-id -%}
+ {%- include tome-id tome=include.tome -%}
+{%- endcapture -%}
+{%- assign id-parts = tome-id | split: '/' -%}
+{%- assign key = include.key | strip -%}
+{%- if id-parts.size == 2 and id-parts[1] != 'index' -%}
+ {%- if key != '' -%}
+ {%- for tome in site.tomes -%}
+ {%- capture parent-id -%}
+ {%- include tome-id tome=tome -%}
+ {%- endcapture -%}
+ {%- assign parents-parts = parent-id | strip | tome-id | split: '/' -%}
+ {%- if parents-parts[1] == 'index' and parents-parts[0] == id-parts[0] -%}
+ {{- tome[include.key] -}}
+ {%- endif -%}
+ {%- endfor -%}
+ {%- else -%}
+ {{- id-parts[0] -}}
+ {%- endif -%}
+{%- endif -%}
\ No newline at end of file
diff --git a/_includes/tome.json b/_includes/tome.json
index 2363b12..4f047a4 100644
--- a/_includes/tome.json
+++ b/_includes/tome.json
@@ -1,8 +1,15 @@
-{% assign tome = include.tome %}
-{% capture tome-id %}{% include tome-id tome=tome %}{% endcapture %}
+{%- assign tome = include.tome -%}
+{%- capture tome-id %}{% include tome-id tome=tome %}{% endcapture -%}
+{%- capture tome-lang %}{% include tome-lang tome=tome %}{% endcapture -%}
+{%- capture tome-title %}{% include tome-field tome=tome field='title' %}{% endcapture -%}
+{%- capture tome-folder %}{% include tome-field tome=tome field='folder' %}{% endcapture -%}
{
- "slug": {{ tome-id | jsonify }},
- "folder": {{ tome.folder | jsonify }},
+ {%- if include.full == true %}
+ "title": {{ tome-title | jsonify }},
+ "folder": {{ tome-folder | jsonify }},
"file": {{ tome.file | jsonify }},
- "chapters": {{ tome.chapters | jsonify }}
-}
+ "chapters": {{ tome.chapters | jsonify }},
+ {%- endif %}
+ "locale": {{ tome-lang | jsonify }},
+ "slug": {{ tome-id | jsonify }}
+}
\ No newline at end of file
diff --git a/_layouts/index.html b/_layouts/index.html
index 493154f..b68c276 100644
--- a/_layouts/index.html
+++ b/_layouts/index.html
@@ -9,27 +9,61 @@
{% include head.html %}
+ {%- capture this-id -%}
+ {%- include tome-id tome=page -%}
+ {%- endcapture -%}
+ {%- assign this-id = this-id | split: '/' | first | strip -%}
{% include header.html %}
+ {% if this-id == '' %}
About site
-
{{ site.description }}
+
{{ site.description }}
+ {% endif %}
+
+ {% assign content = page.content | strip %}
+ {% if this-id != '' %}
+
Collection
+
{{ page.title }}
+
{{ page.subtitle }}
+
+ {% if content != '' %}
+
About collection
+
{{ page.content }}
+ {% endif %}
+
+ {% include tome-info.html %}
+ {% endif %}