From 9661bbba26f9d9e42b9e60ae2d028e10dbe4ee7a Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Wed, 14 Nov 2018 10:45:13 +0100 Subject: new generation workflow: deported yaml files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first new generation workflow, it allows to deported yaml files into remote repositories. Please see documentation at https://github.com/automotive-grade-linux/docs-tools/blob/master-next/docs/NextGenWorkflow.pdf New yaml files are named "section_.yml" and point to the deported yaml files named "book<...>.yaml" from remote repositories. Signed-off-by: Clément Bénier --- site/_layouts/doc.html | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'site/_layouts/doc.html') diff --git a/site/_layouts/doc.html b/site/_layouts/doc.html index 0c39a1e..21f54ff 100644 --- a/site/_layouts/doc.html +++ b/site/_layouts/doc.html @@ -63,10 +63,10 @@ set some constants Edit-links obey the following rules: - if page in /dev/ or /latest/: - show edit link for /dev/ page in source language + if page in /master/ or /latest/: + show edit link for /master/ page in source language if page not in source language: - show translation link for /dev/ page + show translation link for /master/ page else: show edit link for the page in its version and language @@ -76,13 +76,13 @@ set some constants {% capture base_edit_link %}{{ site.urls.edit_git }}{{ page.path }}{% endcapture %} {% capture base_version %}/{{ page.version }}/{% endcapture %} {% capture base_language %}/{{ page.language }}/{% endcapture %} - {% capture dev_version %}/dev/{% endcapture %} + {% capture master_version %}/master/{% endcapture %} {% capture src_language %}/{{ site.src_language }}/{% endcapture %} {% comment %} Edit-links for current pages in non-source languages NOTE: - Pages that are under /dev/ or /latest/ (i.e. site.latest_docs_version) have page.current set to "true". + Pages that are under /master/ or /latest/ (i.e. site.latest_docs_version) have page.current set to "true". {% endcomment %} {% if page.language != site.src_language and page.current %} @@ -91,10 +91,10 @@ set some constants {% endcomment %} {% capture page_path_prefix %}docs/{{ page.language }}/{{ page.version }}{% endcapture %} {% assign page_path_end = page.path | split:"/" | last %} - {% assign crowdin_path = page.path | replace:page_path_prefix,"docs/en/dev" | replace:page_path_end,"" %} + {% assign crowdin_path = page.path | replace:page_path_prefix,"docs/en/master" | replace:page_path_end,"" %} {% capture crowdin_link %}https://crowdin.com/project/cordova/{{ page.language }}#/cordova-docs/{{ crowdin_path }}{% endcapture %} - {% assign edit_link = base_edit_link | replace:base_language,src_language | replace:base_version,dev_version %} + {% assign edit_link = base_edit_link | replace:base_language,src_language | replace:base_version,master_version %} {{ page.edit_source_text }} {{ page.edit_translation_text }} @@ -105,10 +105,10 @@ set some constants {% else %} {% comment %} - Edit-link for latest version points to dev instead + Edit-link for latest version points to master instead {% endcomment %} {% if page.version == site.latest_docs_version %} - {% assign edit_link = base_edit_link | replace:base_version,dev_version %} + {% assign edit_link = base_edit_link | replace:base_version,master_version %} {% else %} {% assign edit_link = base_edit_link %} {% endif %} @@ -119,14 +119,13 @@ set some constants --> - - --> - {% for other_version in site.data.docs-versions[page.language].versions reversed %}
  • {% comment %} @@ -218,9 +215,8 @@ set some constants {% endfor %} - --> - + {% comment %} Get URL for this page in the latest version @@ -236,13 +232,13 @@ set some constants {% endunless %} - + +{% include header.html version=page.version language=page.language %}
    @@ -196,13 +203,14 @@ set some constants layouts change from version to version {% endcomment %} {% capture other_version_root %}/docs/{{ page.language }}/{{ other_version_string }}/{% endcapture %} - {% assign other_version_url = page.url | replace:VERSION_ROOT,other_version_root %} + {% assign other_version_url = page.url | replace:VERSION_URL,other_version_root %} + {% comment %} {% unless ALL_PAGES contains other_version_url %} {% assign other_version_url = other_version_root %} {% endunless %} - - + {% endcomment %} + {% if page.version == other_version %} {{ version_entry_string }} -- cgit From 53e653adeb378f57f204d5310792055efd05db86 Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Fri, 22 Mar 2019 18:14:45 +0100 Subject: toc issue: fixed This reverts commit 13adf0d8f14e1088452ab479d7f354755bbfe53e. --- site/_layouts/doc.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'site/_layouts/doc.html') diff --git a/site/_layouts/doc.html b/site/_layouts/doc.html index 61ffdf0..2b6cf39 100644 --- a/site/_layouts/doc.html +++ b/site/_layouts/doc.html @@ -3,7 +3,7 @@ layout: base docs_tab: true analytics_id: {{site.ganalytics}} -scripts: +scripts: - lib/raphael-min.js - lib/underscore-min.js - lib/sequence-diagram-min.js @@ -15,12 +15,12 @@ scripts: set some constants {% endcomment %} {% assign ALL_PAGES = site.data.all-pages %} -{% assign DOCSDIR = site.docsurl %} +{% capture DOCSDIR %}{{ site.baseurl }}{{ site.docsurl }}{% endcapture %} {% assign TOCSDIR = site.data.tocs %} {% assign TOCFILE = TOCSDIR[page.tocdir][page.tocfile] %} {% capture VERSION_ROOT %}{{DOCSDIR}}/{{ page.language }}/{{ page.version }}/{{page.tocdir}}/{% endcapture %} -{% capture VERSION_URL %}{{DOCSDIR}}/{{ page.language }}/{{ page.version }}/{% endcapture %} +{% capture VERSION_URL %}{{ site.docsurl }}/{{ page.language }}/{{ page.version }}/{% endcapture %} {% capture LANGUAGE_ROOT %}{{DOCSDIR}}/{{ page.language }}/{% endcapture %} {% assign MY_ENTRY = page.url | replace: VERSION_ROOT,"" %} @@ -202,7 +202,7 @@ set some constants This page might not exist in the target version because page layouts change from version to version {% endcomment %} - {% capture other_version_root %}/docs/{{ page.language }}/{{ other_version_string }}/{% endcapture %} + {% capture other_version_root %}{{site.docsurl}}/{{ page.language }}/{{ other_version_string }}/{% endcapture %} {% assign other_version_url = page.url | replace:VERSION_URL,other_version_root %} {% comment %} -- cgit