{% seo %}
{{ site.title | default: site.github.repository_name }}
{{ site.description | default: site.github.project_tagline }}
{% if site.github.is_project_page %}
{% endif %}
{{ content }} {%- if page.path contains 'original/' -%} {%- assign pages = site.pages | where_exp: "item", "item.path contains 'original/'" -%} {%- else -%} {%- if page.path contains 'bilingual/' -%} {%- assign pages = site.pages | where_exp: "item", "item.path contains 'bilingual/'" -%} {%- else -%} {%- assign pages = site.pages | where_exp: "item", "item.path contains 'chapters/'" -%} {%- endif -%} {%- endif -%} {%- assign chapter_entries = "" | split: "" -%} {%- assign other_pages = "" | split: "" -%} {%- for p in pages -%} {%- if p.path contains 'Chapter' -%} {%- assign num_str = p.path | split: 'Chapter ' | last | split: '_' | first | strip -%} {%- assign num = num_str | plus: 0 -%} {%- if num < 10 -%} {%- assign padded = '0' | append: num -%} {%- else -%} {%- assign padded = num | append: '' -%} {%- endif -%} {%- assign entry = padded | append: '||' | append: p.url -%} {%- assign chapter_entries = chapter_entries | push: entry -%} {%- else -%} {%- assign other_pages = other_pages | push: p -%} {%- endif -%} {%- endfor -%} {%- assign sorted_entries = chapter_entries | sort -%} {%- assign sorted_chapters = "" | split: "" -%} {%- for e in sorted_entries -%} {%- assign parts = e | split: '||' -%} {%- assign url = parts[1] -%} {%- assign matched = pages | where: "url", url -%} {%- if matched.size > 0 -%} {%- assign sorted_chapters = sorted_chapters | push: matched[0] -%} {%- endif -%} {%- endfor -%} {%- assign sorted_pages = other_pages | concat: sorted_chapters -%} {%- for page_item in sorted_pages -%} {%- if page_item.url == page.url -%} {%- assign current_index = forloop.index0 -%} {%- endif -%} {%- endfor -%} {%- assign pages = sorted_pages -%} {%- assign prev_index = current_index | minus: 1 -%} {%- assign next_index = current_index | plus: 1 -%} {%- if prev_index >= 0 -%} {%- assign prev_page = pages[prev_index] -%} {%- endif -%} {%- if next_index < pages.size -%} {%- assign next_page = pages[next_index] -%} {%- endif -%} {% if prev_page or next_page %}
{% if prev_page %}
{% if page.path contains 'original/' or page.path contains 'bilingual/' %} « Previous: {{ prev_page.title }} {% else %} « 上一章: {{ prev_page.title }} {% endif %}
{% endif %}
{% if next_page %}
{% if page.path contains 'original/' or page.path contains 'bilingual/' %} Next: {{ next_page.title }} » {% else %} 下一章: {{ next_page.title }} » {% endif %}
{% endif %}
{% endif %}
{% if site.google_analytics %} {% endif %}
{% assign md_filename = page.path | split: '/' | last | split: '.' | first %}