Contents
+{{ docs.text }}
Contents
- - Documentation - -
+{% assign doc_segments = page.relative_path | split: '/' %} +{% if page.lang == nil or page.lang == "en" %} + {% assign indexed = site.data.index %} + {% assign lang = "" %} {% else %} - {% assign doc_segments = page.relative_path | split: '/' %} - {% for section in site.data.doc %} - {% if doc_segments contains section.folder %} -- - - {{ section.category }} - -
- {% if section.category == "External Documentation" %} - {% include doc-external-warning.html %} - {% endif %} - {% if page.translated %} - {% include doc-translated-warning.html %} - {% endif %} + {% assign lang = "/" | append: page.lang %} + {% assign indexed = site.data.translation[page.lang].index %} + {% if indexed == nil or indexed.size == 0 %} + {% assign indexed = site.data.index %} + {% endif %} +{% endif %} + +{% assign doc_link = lang | append: "/doc/" %} +{% assign doc_ind = site.doc | concat: site.qubes-translated | where:'permalink', doc_link %} +{% if doc_ind.size == 0 %} + {% assign doc_link = "/doc/" %} + {% assign indexed = site.data.index %} +{% endif %} + +{% if page.permalink == doc_link %} + {% assign meta = indexed | where_exp: "item", "item.topic != nil" %} ++ + {{ meta[0].metatopic }} +
+{% else %} + +{% assign ind = indexed | where_exp: "item", "item.topic == nil" %} + +{% for section in ind %} + {% if doc_segments contains section.category %} + + {% assign s = section.title | slugify %} ++ + + {{ section.category | replace: "-", " "}} + +
+ {% if section.category == "external" %} + {% include doc-external-warning.html %} {% endif %} - {% endfor %} + {% endif %} +{% endfor %} + {% endif %} diff --git a/_includes/doc-translated-warning.html b/_includes/doc-translated-warning.html index ceabb641..c447be52 100644 --- a/_includes/doc-translated-warning.html +++ b/_includes/doc-translated-warning.html @@ -1,5 +1,15 @@ +{% if page.lang == nil or page.lang == "en" %} + {% assign msgs = site.data.includes %} +{% else %} + {% assign msgs = site.data.translation[page.lang].includes %} + {% if msgs == nil or msgs.size == 0 %} + {% assign msgs = site.data.includes %} + {% endif %} +{% endif %} + +{% assign translated = msgs | where_exp: "item", "item.section == 'doc-translated'" | first %} +- - Improve the Docs -
- - View Page Source -
- - Edit This Page -
- - Report a Security Issue -
- - Report a Bug -
- - Help & Support -
- - Make a Donation - +{% if page.lang == nil or page.lang == "en" %} + {% assign doc_content = site.data.includes %} +{% else %} + {% assign doc_content = site.data.translation[page.lang].includes %} + {% if doc_content == nil or doc_content.size == 0 %} + {% assign doc_content = site.data.includes %} + {% endif %} +{% endif %} + +{% assign docs = doc_content | where_exp: "item", "item.section == 'doc-widget'" | first %} + +{% if lang == "" %} + {% assign master_edit = site.project_repo_path | append: "/qubes-doc/edit/master" | append: page.relative_path | remove_first: '_doc' %} + {% assign master_blob = site.project_repo_path | append: "/qubes-doc/blob/master" | append: page.relative_path | remove_first: '_doc' %} +{% else %} + {% assign master_edit = site.project_repo_path | append: "/qubes-translated/edit/master" | append: page.relative_path | remove_first: '_qubes-translated' %} + {% assign master_blob = site.project_repo_path | append: "/qubes-translated/blob/master" | append: page.relative_path| remove_first: '_qubes-translated' %} +{% endif %} + +{% for item in docs.links %} + {% if item.icon == "fa-book" %} + {% assign a_class = "btn btn-primary btn-block" %} + {% else %} + {% assign a_class = "page-source-link btn btn-default btn-block" %} + {% endif %} + + {% if item.icon == "fa-code" %} + {% assign a_href = master_blob %} + {% elsif item.icon == "fa-code-fork" %} + {% assign a_href = master_edit %} + {% else %} + {% assign a_href = item.url %} + {% endif %} + + {{ item.text }} +
+{% endfor %} diff --git a/_includes/downloads.html b/_includes/downloads.html new file mode 100644 index 00000000..54fe78fd --- /dev/null +++ b/_includes/downloads.html @@ -0,0 +1,393 @@ +{% if page.lang == nil or page.lang == "en" %} + {% assign down = site.data.download %} + {% assign lang = "" %} +{% else %} + {% assign lang = "/" | append: page.lang %} + {% assign down = site.data.translation[page.lang].download %} + {% if down == nil or down.size == 0 %} + {% assign down = site.data.download %} + {% endif %} +{% endif %} + +{% assign hw = down | where_exp: "item", "item.htmlsection == 'hardware'" | first %} +{% assign sr = hw.links | where_exp: "item", "item.id == 1" | first %} +{% assign ch = hw.links | where_exp: "item", "item.id == 2" | first %} +{% assign hcl = hw.links | where_exp: "item", "item.id == 3" | first %} + +{% assign sec = down | where_exp: "item", "item.htmlsection == 'sec'" | first %} +{% assign ig = sec.links | where_exp: "item", "item.id == 1" | first %} +{% assign vs = sec.links | where_exp: "item", "item.id == 2" | first %} +{% assign isc = sec.links | where_exp: "item", "item.id == 3" | first %} + +{% assign help = down | where_exp: "item", "item.htmlsection == 'help'" | first %} +{% assign hs = help.links | where_exp: "item", "item.id == 1" | first %} +{% assign tg = help.links | where_exp: "item", "item.id == 2" | first %} +{% assign rb = help.links | where_exp: "item", "item.id == 3" | first %} + +
{{ hw.title }}
+-
+
- + + {{ sr.text }} + + +
- + + {{ ch.text }} + + +
- + + {{ hcl.text }} + + +
{{ sec.title }}
+-
+
- + + {{ ig.text }} + + +
- + + {{ vs.text }} + + +
- + + {{ isc.text }} + + +
{{ help.title }}
+-
+
- + + {{ hs.text }} + + +
- + + {{ tg.text }} + + +
- + + {{ rb.text }} + + +
+
+{% for releasex in site.data.downloads.releases %} +
{{ release_name }}
+ + {% if testing %} +-
+
- + + + {{ downcont.links[3].text }} + + + {% for docdata in release.docs %} + {% assign doc_name = docdata[0] %} + {% assign doc = docdata[1] %} + {% if doc_name == "Installation Guide" %} +
- + + {{ doc_name }} + + + {% endif %} + {% if doc_name == "Release Notes" %} +
- + + {{ doc_name }} + + + {% endif %} + {% if doc_name == "Release Schedule" %} +
- + + {{ doc_name }} + + + {% endif %} + {% endfor %} +
- + + {{ hs.text }} + + +
- + + + {{ downcont.links[4].text }} + + +
- + + {{ scode.text }} + + +
+{% endfor %} + +{% assign dm = down | where_exp: "item", "item.htmlsection == 'download-mirrors'" | first %} + +
{{ dm.title }}
+| {{ dm.table[0].column }} | +{{ dm.table[1].column }} | +{{ dm.table[2].column }} | +
|---|---|---|
| {{ mirror.organization }} | ++ {{ mirror.location }} + | +
+ {% for url in mirror.urls %}
+ {{ url.url | truncate: 76 }} + {% endfor %} + |
+
+
{{ secinfo.title }}
+-
+
- + + {{ sc.text }} + + +
- + + {{ sp.text }} + + +
- + + {{ sg.text }} + + +
{{ ver.title }}
+-
+
- + + {{ sv.text }} + + +
- + + {{ t.text }} + + +
- + + {{ vs.text }} + + +
{{ code.title }}
+-
+
- + + {{ scode.text }} + + +
- + + {{ cg.text }} + + +
- + + {{ sl.text }} + + +