aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-11-14 10:45:13 +0100
committerStéphane Desneux <stephane.desneux@iot.bzh>2018-11-27 09:01:05 +0100
commit9661bbba26f9d9e42b9e60ae2d028e10dbe4ee7a (patch)
treea2fd3c7c48b564699fd1f6e83356d88c00f3305d
parent16f3a77f6c099396107f672fad0b9aca444b5a21 (diff)
new generation workflow: deported yaml files
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_<version>.yml" and point to the deported yaml files named "book<...>.yaml" from remote repositories. Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
-rw-r--r--conf/_config.yml2
-rw-r--r--conf/_dev.yml2
-rw-r--r--content/tocs/apis_services/section_master.yml11
-rw-r--r--content/tocs/getting_started/section_master.yml15
-rw-r--r--site/.htaccess8
-rw-r--r--site/_layouts/doc.html36
6 files changed, 48 insertions, 26 deletions
diff --git a/conf/_config.yml b/conf/_config.yml
index 9fec3d5..b93c6fb 100644
--- a/conf/_config.yml
+++ b/conf/_config.yml
@@ -22,7 +22,7 @@ excerpt_separator: <!--more-->
# the version to which /latest/ points
# NOTE:
# this value gets overwritten in _version.yml, which is a generated file
-latest_docs_version: dev # overloaded by AppDefaults.js
+latest_docs_version: master # overloaded by AppDefaults.js
# the docs version that is shown by default when clicking on docs links on the site
default_linked_docs_version: latest
diff --git a/conf/_dev.yml b/conf/_dev.yml
index 8bf011a..d281aa7 100644
--- a/conf/_dev.yml
+++ b/conf/_dev.yml
@@ -1,5 +1,5 @@
baseurl: ""
-default_linked_docs_version: dev
+default_linked_docs_version: master
destination: build-dev
exclude:
- static/css-src
diff --git a/content/tocs/apis_services/section_master.yml b/content/tocs/apis_services/section_master.yml
new file mode 100644
index 0000000..455117d
--- /dev/null
+++ b/content/tocs/apis_services/section_master.yml
@@ -0,0 +1,11 @@
+url_fetch : "GERRIT_FETCH"
+git_commit : "AGL_GERRIT_BRANCH"
+
+name: Developer Guides
+template: generated_index.html
+books:
+-
+ id: app-framework-binder-apis-services
+ url_fetch : "https://git.automotivelinux.org/src/app-framework-binder/plain/docs/app-framework-binder-book.yml?h=sandbox/benierc/newdocs"
+ path: docs/app-framework-binder-book.yml
+
diff --git a/content/tocs/getting_started/section_master.yml b/content/tocs/getting_started/section_master.yml
new file mode 100644
index 0000000..e65b474
--- /dev/null
+++ b/content/tocs/getting_started/section_master.yml
@@ -0,0 +1,15 @@
+url_fetch : "AGL_GITHUB_FETCH"
+url_edit : "AGL_GITHUB_EDIT"
+git_commit : "AGL_GITHUB_BRANCH"
+
+name: Getting started
+template: generated_index.html
+books:
+-
+ id: docs-source-getting-started
+ url_fetch: "https://raw.githubusercontent.com/benierc/docs-sources/master/%source%"
+ path: docs/getting-started-book.yml
+-
+ id: homescreen
+ url_fetch : "https://git.automotivelinux.org/apps/homescreen/plain/homescreen/docs/homescreen-book.yml?h=sandbox/benierc/newdocs"
+ path: homescreen/docs/homescreen-book.yml
diff --git a/site/.htaccess b/site/.htaccess
index 61548b8..1decfc7 100644
--- a/site/.htaccess
+++ b/site/.htaccess
@@ -30,7 +30,7 @@ RewriteEngine on
# Some of the below redirects are 302s, and some are 301s. 302s are used
# for redirects whose targets change sometimes. For example:
# - /docs/ -> /docs/fr/, /docs/en/, etc.
-# - /docs/en/ -> /docs/en/dev/, /docs/en/latest/, etc.
+# - /docs/en/ -> /docs/en/master/, /docs/en/latest/, etc.
# - /docs/en/latest -> /docs/en/4.0.0/, /docs/en/5.0.0/, etc.
#
# 301s are for PERMANENT redirects. These are used only for mapping old
@@ -38,7 +38,7 @@ RewriteEngine on
#
# NOTE:
# (\w\w(?:-\w\w)?) - regex for languages
-# (?:\d+\.(?:\d+\.\d+|x))|dev|latest - regex for versions
+# (?:\d+\.(?:\d+\.\d+|x))|master|latest - regex for versions
#
# NOTE:
# Meanings of some of the flags at the ends of rules:
@@ -75,7 +75,7 @@ RewriteRule ^.*docs/(\w\w(?:-\w\w)?)/latest$ {{site.baseurl}}/docs/$1/latest/ [R
#
# docs/XX/* -> docs/YY/*
#
-{% for redirect in site.data.redirects.language-renames %}RewriteRule ^.*docs/{{redirect[0]}}/((?:\d+\.(?:\d+\.\d+|x))|dev|latest)/(.*)$ {{site.baseurl}}/docs/{{redirect[1]}}/$1/$2 [R=302,L]
+{% for redirect in site.data.redirects.language-renames %}RewriteRule ^.*docs/{{redirect[0]}}/((?:\d+\.(?:\d+\.\d+|x))|master|latest)/(.*)$ {{site.baseurl}}/docs/{{redirect[1]}}/$1/$2 [R=302,L]
{% endfor %}
# 301 (PERMANENT):
@@ -87,7 +87,7 @@ RewriteRule ^.*docs/(\w\w(?:-\w\w)?)/latest$ {{site.baseurl}}/docs/$1/latest/ [R
# by site.baseurl. It is thrown away because there is no RewriteCond to
# control whether the rewrite happens to a URI or a local file path
# (when Apache is locating the local file to serve).
-{% for redirect in site.data.redirects.docs-global %}RewriteRule ^.*docs/(\w\w(?:-\w\w)?)/((?:\d+\.(?:\d+\.\d+|x))|dev|latest)/{{redirect[0]}}$ {{site.baseurl}}/docs/$1/$2/{{redirect[1]}} [NE,R=301,L]
+{% for redirect in site.data.redirects.docs-global %}RewriteRule ^.*docs/(\w\w(?:-\w\w)?)/((?:\d+\.(?:\d+\.\d+|x))|master|latest)/{{redirect[0]}}$ {{site.baseurl}}/docs/$1/$2/{{redirect[1]}} [NE,R=301,L]
{% endfor %}
# 301 (PERMANENT):
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 %}
<a class="edit" href="{{ edit_link }}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> {{ page.edit_source_text }}</a>
<a class="edit" href="{{ crowdin_link }}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> {{ page.edit_translation_text }}</a>
@@ -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
-->
<!-- Language dropdown -->
- <!--
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
{{ site.data.docs-versions[page.language].name }}
<span class="caret"></span>
</button>
- <!-- List all languages - ->
+ <!-- List all languages -->
<ul class="dropdown-menu" aria-labelledby="languageDropdown">
{% for other_language_entry in site.data.docs-versions %}
@@ -157,10 +156,8 @@ set some constants
{% endfor %}
</ul>
</div>
- -->
<!-- Version dropdown -->
- <!--
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
{{ page.version }}
@@ -171,7 +168,7 @@ set some constants
</button>
<ul class="dropdown-menu" aria-labelledby="versionDropdown">
- <!-- List versions available in this language - ->
+ <!-- List versions available in this language -->
{% for other_version in site.data.docs-versions[page.language].versions reversed %}
<li>
{% comment %}
@@ -218,9 +215,8 @@ set some constants
{% endfor %}
</ul>
</div>
- -->
</div>
-
+
{% comment %}
Get URL for this page in the latest version
@@ -236,13 +232,13 @@ set some constants
{% endunless %}
<!-- Show warnings for special versions -->
- <!-- dev warning
- {% if page.version == 'dev' %}
+ <!-- master warning
+ {% if page.version == 'master' %}
<div class="alert docs-alert alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
- {{ site.message.indev }}
+ {{ site.message.inmaster }}
<a href="{{ site.baseurl }}{{ latest_url }}">
{{ page.click_here_text }}
</a>
@@ -251,7 +247,7 @@ set some constants
-->
<!-- outdated warning
- {% if page.version != 'dev' and page.version != site.latest_docs_version %}
+ {% if page.version != 'master' and page.version != site.latest_docs_version %}
<div class="alert docs-alert alert-danger" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>