You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2019/12/27 09:48:05 UTC
[incubator-nuttx-website] 37/48: fix relative paths
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-website.git
commit c78615d4b90c5d3ca2451ba02fa013f919352d20
Author: hans <hl...@me.com>
AuthorDate: Thu Dec 26 17:33:51 2019 +0800
fix relative paths
Signed-off-by: hans <hl...@me.com>
---
_config.yml | 2 +-
_includes/JB/categories_list | 4 ++--
_includes/JB/pages_list | 4 ++--
_includes/JB/posts_collate | 2 +-
_includes/JB/setup | 10 +++++-----
_includes/JB/tags_list | 4 ++--
_includes/themes/apache/_navigation.html | 8 ++++----
_includes/themes/apache/default.html | 6 +++---
_includes/themes/apache/footer.html | 2 +-
_includes/themes/apache/post.html | 6 +++---
10 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/_config.yml b/_config.yml
index 5ec5de0..f7bae00 100644
--- a/_config.yml
+++ b/_config.yml
@@ -23,7 +23,7 @@ exclude: [README.md,Gemfile*,vendor]
keep_files: [".git", ".svn", "apidocs"]
# The base path where the website is deployed
-baseurl: apache-nuttx-website
+baseurl: /apache-nuttx-website
# End _config.yml
diff --git a/_includes/JB/categories_list b/_includes/JB/categories_list
index 83be2e2..d3f5378 100644
--- a/_includes/JB/categories_list
+++ b/_includes/JB/categories_list
@@ -22,13 +22,13 @@ Usage:
{% else %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
- <li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
+ <li><a href="{{ site.baseurl }}{{ site.JB.categories_path }}#{{ category }}-ref">
{{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
- <li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
+ <li><a href="{{ site.baseurl }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
{{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
</a></li>
{% endfor %}
diff --git a/_includes/JB/pages_list b/_includes/JB/pages_list
index 42f827a..5311fcf 100644
--- a/_includes/JB/pages_list
+++ b/_includes/JB/pages_list
@@ -27,9 +27,9 @@ Usage:
{% if node.title != null %}
{% if group == null or group == node.group %}
{% if page.url == node.url %}
- <li class="active"><a href="{{ BASE_PATH }}{{node.url}}" class="active">{{node.title}}</a></li>
+ <li class="active"><a href="{{ site.baseurl }}{{node.url}}" class="active">{{node.title}}</a></li>
{% else %}
- <li><a href="{{ BASE_PATH }}{{node.url}}">{{node.title}}</a></li>
+ <li><a href="{{ site.baseurl }}{{node.url}}">{{node.title}}</a></li>
{% endif %}
{% endif %}
{% endif %}
diff --git a/_includes/JB/posts_collate b/_includes/JB/posts_collate
index f612ade..024016a 100644
--- a/_includes/JB/posts_collate
+++ b/_includes/JB/posts_collate
@@ -32,7 +32,7 @@ Usage:
<ul>
{% endif %}
- <li><span>{{ post.date | date: "%B %e, %Y" }}</span> » <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
+ <li><span>{{ post.date | date: "%B %e, %Y" }}</span> » <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% if forloop.last %}
</ul>
diff --git a/_includes/JB/setup b/_includes/JB/setup
index 03d0966..7ab0d27 100644
--- a/_includes/JB/setup
+++ b/_includes/JB/setup
@@ -5,18 +5,18 @@
{% if site.JB.setup.provider == "custom" %}
{% include custom/setup %}
{% else %}
- {% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
- {% assign BASE_PATH = site.JB.BASE_PATH %}
- {% assign HOME_PATH = site.JB.BASE_PATH %}
+ {% if site.safe and site.JB. site.baseurl and site.JB. site.baseurl != '' %}
+ {% assign site.baseurl = site.JB. site.baseurl %}
+ {% assign HOME_PATH = site.JB. site.baseurl %}
{% else %}
- {% assign BASE_PATH = nil %}
+ {% assign site.baseurl = nil %}
{% assign HOME_PATH = "/" %}
{% endif %}
{% if site.JB.ASSET_PATH %}
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
{% else %}
- {% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ layout.theme.name }}{% endcapture %}
+ {% capture ASSET_PATH %}{{ site.baseurl }}/assets/themes/{{ layout.theme.name }}{% endcapture %}
{% endif %}
{% endif %}
{% endcapture %}{% assign jbcache = nil %}
diff --git a/_includes/JB/tags_list b/_includes/JB/tags_list
index 8eb62a7..6a3fb27 100644
--- a/_includes/JB/tags_list
+++ b/_includes/JB/tags_list
@@ -22,11 +22,11 @@ Usage:
{% else %}
{% if tags_list.first[0] == null %}
{% for tag in tags_list %}
- <li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
+ <li><a href="{{ site.baseurl }}{{ site.JB.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
{% endfor %}
{% else %}
{% for tag in tags_list %}
- <li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
+ <li><a href="{{ site.baseurl }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
{% endfor %}
{% endif %}
{% endif %}
diff --git a/_includes/themes/apache/_navigation.html b/_includes/themes/apache/_navigation.html
index eda5088..69c49d5 100644
--- a/_includes/themes/apache/_navigation.html
+++ b/_includes/themes/apache/_navigation.html
@@ -7,8 +7,8 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="{{ BASE_PATH }}">
- <img src="/assets/themes/apache/img/logo.png" width="30">
+ <a class="navbar-brand" href="{{ site.baseurl }}">
+ <img src="{{ site.baseurl }}/assets/themes/apache/img/logo.png" width="30">
{{ site.data.project.name }}
</a>
</div>
@@ -17,8 +17,8 @@
<li id="community">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a>
<ul class="dropdown-menu dropdown-left">
- <li><a href="/community">Get Involved</a></li>
- <li><a href="/community-members">Who we are</a></li>
+ <li><a href="{{ site.baseurl }}/community">Get Involved</a></li>
+ <li><a href="{{ site.baseurl }}/community-members">Who we are</a></li>
</ul>
</li>
<li><a href="{{ site.data.project.source_repository }}">GitHub</a></li>
diff --git a/_includes/themes/apache/default.html b/_includes/themes/apache/default.html
index 7c1ca9e..bfd9822 100644
--- a/_includes/themes/apache/default.html
+++ b/_includes/themes/apache/default.html
@@ -15,9 +15,9 @@
<![endif]-->
<!-- Le styles -->
- <link href="{{ ASSET_PATH }}/bootstrap/css/bootstrap.css" rel="stylesheet">
- <link href="{{ ASSET_PATH }}/css/style.css?body=1" rel="stylesheet" type="text/css">
- <link href="{{ ASSET_PATH }}/css/syntax.css" rel="stylesheet" type="text/css" media="screen" />
+ <link href="{{ site.baseurl }}/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet">
+ <link href="{{ site.baseurl }}/assets/themes/apache/css/style.css?body=1" rel="stylesheet" type="text/css">
+ <link href="{{ site.baseurl }}/assets/themes/apache/css/syntax.css" rel="stylesheet" type="text/css" media="screen" />
<!-- Le fav and touch icons -->
<!-- Update these with your own images
<link rel="shortcut icon" href="images/favicon.ico">
diff --git a/_includes/themes/apache/footer.html b/_includes/themes/apache/footer.html
index debd3f5..4d582fc 100644
--- a/_includes/themes/apache/footer.html
+++ b/_includes/themes/apache/footer.html
@@ -13,7 +13,7 @@
<div style="text-align:center;">
{% if site.data.project.podling %}
<div style="margin-top: 20px; margin-bottom: 20px;">
- <a href="http://incubator.apache.org"><img src="/assets/themes/apache/img/egg-logo.png"
+ <a href="http://incubator.apache.org"><img src="{{ site.baseurl }}/assets/themes/apache/img/egg-logo.png"
alt="Apache Incubator"/></a>
</div>
{% endif %}
diff --git a/_includes/themes/apache/post.html b/_includes/themes/apache/post.html
index 2774711..742bc92 100644
--- a/_includes/themes/apache/post.html
+++ b/_includes/themes/apache/post.html
@@ -31,13 +31,13 @@
<div class="pagination">
<ul>
{% if page.previous %}
- <li class="prev"><a href="{{ BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">← Previous</a></li>
+ <li class="prev"><a href="{{ site.baseurl }}{{ page.previous.url }}" title="{{ page.previous.title }}">← Previous</a></li>
{% else %}
<li class="prev disabled"><a>← Previous</a></li>
{% endif %}
- <li><a href="{{ BASE_PATH }}{{ site.JB.archive_path }}">Archive</a></li>
+ <li><a href="{{ site.baseurl }}{{ site.JB.archive_path }}">Archive</a></li>
{% if page.next %}
- <li class="next"><a href="{{ BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">Next →</a></li>
+ <li class="next"><a href="{{ site.baseurl }}{{ page.next.url }}" title="{{ page.next.title }}">Next →</a></li>
{% else %}
<li class="next disabled"><a>Next →</a>
{% endif %}