diff --git a/_includes/header.html b/_includes/header.html index 03063e4..56f2bd2 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,10 @@

- {{ site.name }} + {{ site.name }}

+
+ Info +
\ No newline at end of file diff --git a/_includes/tome.json b/_includes/tome.json index 4f047a4..8b1ef8a 100644 --- a/_includes/tome.json +++ b/_includes/tome.json @@ -9,7 +9,10 @@ "folder": {{ tome-folder | jsonify }}, "file": {{ tome.file | jsonify }}, "chapters": {{ tome.chapters | jsonify }}, + "config": {{ site.extra | jsonify }}, {%- endif %} "locale": {{ tome-lang | jsonify }}, - "slug": {{ tome-id | jsonify }} + "slug": {{ tome-id | jsonify }}, + "isbn": {{ tome.isbn | jsonify }}, + "gbooks": {{ tome.gbooks | jsonify }} } \ No newline at end of file diff --git a/_layouts/index.html b/_layouts/index.html index 5516562..ca8b832 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -7,6 +7,10 @@ {%- include tome-id tome=page -%} {%- endcapture -%} {%- assign this-id = this-id | split: '/' | first | strip -%} + {%- capture is-page -%} + {%- assign tokens = page.path | split: '/' -%} + {%- if tokens.size == 1 and page.path != 'index.html' -%}true{%- else -%}false{%- endif -%} + {%- endcapture -%} {% if this-id == '' %} {{ site.name }} | {{ site.tagline }} @@ -24,6 +28,7 @@
+ {%- if is-page == 'false' -%} {% if this-id == '' %}

About site

{{ site.description }}

@@ -42,8 +47,14 @@ {% include tome-info.html %} {% endif %} + {% else %} +

{{ page.title }}

+
+ {{ page.content | markdownify }} + {% endif %}
+ {%- if is-page == 'false' -%}

Available tomes

@@ -81,6 +92,7 @@
+ {% endif %}
{% include footer.html %} diff --git a/_layouts/tome.html b/_layouts/tome.html index cfb99fa..6e68f73 100644 --- a/_layouts/tome.html +++ b/_layouts/tome.html @@ -1,9 +1,9 @@ - {%- capture id %}{% include tome-id tome=page %}{%- endcapture -%} + {%- capture this-id %}{% include tome-id tome=page %}{%- endcapture -%} + {%- capture parent -%}{%- include tome-parent tome=page key='title' -%}{%- endcapture -%} {%- capture title %}{% include tome-field tome=page field='title' %}{%- endcapture -%} - {%- capture folder %}{% include tome-field tome=page field='folder' %}{%- endcapture -%} {%- capture cover %}{% include tome-cover tome=page %}{%- endcapture -%} {{ title }} | {{ site.name }} @@ -11,12 +11,7 @@ {% include head.html %} - {% capture tome_json %}{% include tome.json tome=page full=true %}{% endcapture %} - {% capture embed %}{ - "page": {{ tome_json }}, - "extra": {{ site.extra | jsonify }} - }{% endcapture %} - + {% include header.html %} @@ -28,6 +23,11 @@

{{ title }}

{{ page.subtitle }}

+ {% if parent != '' %} + Part of + {{ parent }} + {% endif %} + Cover Cover @@ -51,11 +51,6 @@