diff options
Diffstat (limited to 'site')
-rw-r--r-- | site/.htaccess | 8 | ||||
-rw-r--r-- | site/_data/redirects.yml | 1 | ||||
-rw-r--r-- | site/_includes/header.html | 34 | ||||
-rw-r--r-- | site/_layouts/doc.html | 66 | ||||
-rw-r--r-- | site/_layouts/howto-en.html | 15 | ||||
-rw-r--r-- | site/_layouts/reference-en.html | 15 | ||||
-rw-r--r-- | site/docs/docsearch.html | 12 | ||||
-rw-r--r-- | site/index.html | 6 |
8 files changed, 106 insertions, 51 deletions
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/_data/redirects.yml b/site/_data/redirects.yml index 3f10f41..1c6a427 100644 --- a/site/_data/redirects.yml +++ b/site/_data/redirects.yml @@ -3,7 +3,6 @@ # 302 (temporary) renames of versions version-renames: - "master": "dev" "1.0": "1.x" "2.0": "2.x" "2.0.1": "2.x" diff --git a/site/_includes/header.html b/site/_includes/header.html index 6828472..a421f1c 100644 --- a/site/_includes/header.html +++ b/site/_includes/header.html @@ -1,3 +1,15 @@ +{% if include.language == "" or include.language == nil %} + {% assign LANGUAGE = "en" %} +{% else %} + {% assign LANGUAGE = include.language %} +{% endif %} +{% if include.version == "" or include.version == nil %} + {% assign VERSION = site.default_linked_docs_version %} +{% else %} + {% assign VERSION = include.version %} +{% endif %} +<!-- LANGUAGE: {{LANGUAGE}} {{include.language}} --> +<!-- VERSION: {{VERSION}} {{include.version}}--> <header> <a class="scroll-point pt-top" name="top"></a> <nav class="navbar navbar-inverse navbar-fixed-top"> @@ -15,23 +27,31 @@ <div class="nav_bar_left"> <ul class="nav navbar-nav"> <li {% if page.specs_tab %}class="active"{% endif %}> - <a href="{{ site.docsurl }}/getting_started/en/{{ site.default_linked_docs_version }}/">Getting Started</a> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}/getting_started/">Getting Started</a> </li> - + <li {% if page.specs_tab %}class="active"{% endif %}> - <a href="{{ site.docsurl }}/architecture/en/{{ site.default_linked_docs_version }}/">Architecture Guides</a> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}/architecture/">Architecture Guides</a> </li> <li {% if page.appfw_tab %}class="active"{% endif %}> - <a href="{{ site.docsurl }}/hardware/en/{{ site.default_linked_docs_version }}/">Hardware Support</a> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}//hardware/">Hardware Support</a> </li> <li {% if page.specs_tab %}class="active"{% endif %}> - <a href="{{ site.docsurl }}/devguides/en/{{ site.default_linked_docs_version }}/">Developer Guides</a> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}/devguides/">Developer Guides</a> + </li> + + <li {% if page.appfw_tab %}class="active"{% endif %}> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}/apis_services/">APIs & Services</a> </li> - + + <li {% if page.appfw_tab %}class="active"{% endif %}> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}/howto/">How To</a> + </li> + <li {% if page.appfw_tab %}class="active"{% endif %}> - <a href="{{ site.docsurl }}/apis_services/en/{{ site.default_linked_docs_version }}/">APIs & Services</a> + <a href="{{ site.baseurl }}{{ site.docsurl }}/{{LANGUAGE}}/{{VERSION}}/reference/">Reference</a> </li> </ul> </div> diff --git a/site/_layouts/doc.html b/site/_layouts/doc.html index 0c39a1e..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 @@ -11,21 +11,28 @@ scripts: - process-uml.js --- -{% include header.html %} - {% comment %} 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.tocdir}}/{{ page.language }}/{{ page.version }}/{% endcapture %} -{% capture LANGUAGE_ROOT %}{{DOCSDIR}}/{{page.tocdir}}/{{ page.language }}/{% endcapture %} +{% capture VERSION_ROOT %}{{DOCSDIR}}/{{ page.language }}/{{ page.version }}/{{page.tocdir}}/{% 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,"" %} +{% assign MY_ENTRY = page.url | replace: VERSION_ROOT,"" %} {% assign my_entry_parts = MY_ENTRY | split: "/" %} +<!-- + LANGUAGE_ROOT {{ LANGUAGE_ROOT }} + VERSION_ROOT {{VERSION_ROOT}} + DOCSDIR {{DOCSDIR}} + page.language {{page.language}} +--> + +{% include header.html version=page.version language=page.language %} <div class="docs container"> @@ -63,10 +70,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 +83,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 +98,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 +112,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 +126,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 +163,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 +175,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 %} @@ -198,14 +202,15 @@ 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 %} - {% assign other_version_url = page.url | replace:VERSION_ROOT,other_version_root %} + {% 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 %} {% unless ALL_PAGES contains other_version_url %} {% assign other_version_url = other_version_root %} {% endunless %} - - <a href="{{ site.docsurl }}{{ other_version_url }}" class="{% unless ALL_PAGES contains other_version_url %}missing-page{% endunless %}"> + {% endcomment %} + <a href="{{ site.baseurl }}{{ other_version_url }}" class="{% unless ALL_PAGES contains other_version_url %}missing-page{% endunless %}"> {% if page.version == other_version %} <span class="selected"> {{ version_entry_string }} @@ -218,9 +223,8 @@ set some constants {% endfor %} </ul> </div> - --> </div> - + {% comment %} Get URL for this page in the latest version @@ -236,13 +240,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">×</span> </button> - {{ site.message.indev }} + {{ site.message.inmaster }} <a href="{{ site.baseurl }}{{ latest_url }}"> {{ page.click_here_text }} </a> @@ -251,7 +255,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">×</span> diff --git a/site/_layouts/howto-en.html b/site/_layouts/howto-en.html new file mode 100644 index 0000000..1b459f8 --- /dev/null +++ b/site/_layouts/howto-en.html @@ -0,0 +1,15 @@ +--- +layout: umldoc +outdated_text: "This version of the documentation is outdated!" +in_development_text: "This version of the documentation is under development!" +click_here_text: "Click here for the latest released version." +toc_text: "Table of Contents" +latest_text: "Latest" +visit_github_text: "Other versions are on GitHub." +plugin_version_text: "This documentation describes this plugin at version" +edit_text: "Edit" +edit_source_text: "Edit Source on GitHub" +edit_translation_text: "Edit Translation on Crowdin" +--- + +{{ content }} diff --git a/site/_layouts/reference-en.html b/site/_layouts/reference-en.html new file mode 100644 index 0000000..1b459f8 --- /dev/null +++ b/site/_layouts/reference-en.html @@ -0,0 +1,15 @@ +--- +layout: umldoc +outdated_text: "This version of the documentation is outdated!" +in_development_text: "This version of the documentation is under development!" +click_here_text: "Click here for the latest released version." +toc_text: "Table of Contents" +latest_text: "Latest" +visit_github_text: "Other versions are on GitHub." +plugin_version_text: "This documentation describes this plugin at version" +edit_text: "Edit" +edit_source_text: "Edit Source on GitHub" +edit_translation_text: "Edit Translation on Crowdin" +--- + +{{ content }} diff --git a/site/docs/docsearch.html b/site/docs/docsearch.html index 0e3c7b0..3c28cdc 100644 --- a/site/docs/docsearch.html +++ b/site/docs/docsearch.html @@ -5,11 +5,13 @@ <html lang="{% if page.language %}{{ page.language }}{% else %}{{ site.language }}{% endif %}"> {% include head.html %} <body> - <h3><a href="{{ site.docsurl }}/getting_started/en/{{ site.default_linked_docs_version }}/">Getting started</a></h3> - <h3><a href="{{ site.docsurl }}/hardware/en/{{ site.default_linked_docs_version }}/">Hardware Support</a></h3> - <h3><a href="{{ site.docsurl }}/architecture/en/{{ site.default_linked_docs_version }}/">Architecture Guides</a></h3> - <h3><a href="{{ site.docsurl }}/devguides/en/{{ site.default_linked_docs_version }}/">Developer Guides</a></h3> - <h3><a href="{{ site.docsurl }}/apis_services/en/{{ site.default_linked_docs_version }}/">APIs & Services</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/getting_started/">Getting started</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/hardware/">Hardware Support</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/architecture/">Architecture Guides</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/devguides/">Developer Guides</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/apis_services/">APIs & Services</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/howto/">How To</a></h3> + <h3><a href="{{site.baseurl}}{{ site.docsurl }}/en/{{ site.default_linked_docs_version }}/reference/">Reference</a></h3> {% include algolia.html %} </body> </html> diff --git a/site/index.html b/site/index.html index 36aad16..1a2137e 100644 --- a/site/index.html +++ b/site/index.html @@ -19,7 +19,7 @@ change_frequency: monthly <p>Multiple platforms on <em>a common code base</em></p> <p>Free and <em>open source</em></p> <div class="hero_buttons"> - <a href="{{ site.baseurl }}/docs/getting_started/en/{{ site.default_linked_docs_version }}" class="col-xs-12 col-sm-5 btn btn-lg btn-primary"> + <a href="{{ site.baseurl }}/docs/en/{{ site.default_linked_docs_version }}/getting_started" class="col-xs-12 col-sm-5 btn btn-lg btn-primary"> Get Started </a> <a href="{{ site.baseurl }}/contribute" class="col-xs-12 col-sm-5 btn btn-lg btn-primary"> @@ -56,7 +56,7 @@ change_frequency: monthly </div> <div class="blue-divider"></div> - + <!-- /container --> <div class="blue-divider"></div> @@ -66,7 +66,7 @@ change_frequency: monthly <div class="col-md-12 text-center"> <h1>Supported Platforms</h1> <h2>See a list of - <a href="{{ site.baseurl }}/docs/hardware/en/{{ site.default_linked_docs_version }}/index.html">features supported</a> in each platform</h2> + <a href="{{ site.baseurl }}/docs/en/{{ site.default_linked_docs_version }}/hardware/index.html">features supported</a> in each platform</h2> <p> Automotive Grade Linux (AGL) is a Linux Foundation project dedicated to creating open source software solutions for automotive applications. Although the initial target for AGL is In-Vehicle-Infotainment (IVI) systems, additional use cases such as instrument clusters and telematics systems will eventually be supported. AGL has participants from the Automotive, Communications, and Semiconductor Industries and welcomes contributions from individual developers. </p> |