Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change all local links to be relative #741

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div>
<span>
<a href="https://twitter.com/bitcoincoreorg" target="_blank" class=""><i class="fa fa-fw fa-twitter"></i>Twitter</a><br />
<a href="/en/legal/">Legal</a> | <a href="/en/legal/privacy">Privacy Policy</a> | <a href="/{{ page.lang }}/rss/">RSS <img src="/assets/images/rss-24x24.png" alt="rss feeds" width="14" height="14"></a>
<a href="{{ ROOT_PATH }}/en/legal/">Legal</a> | <a href="{{ ROOT_PATH }}/en/legal/privacy">Privacy Policy</a> | <a href="{{ ROOT_PATH }}/{{ page.lang }}/rss/">RSS <img src="{{ ROOT_PATH }}/assets/images/rss-24x24.png" alt="rss feeds" width="14" height="14"></a>
</span>
</div>
<div>
<img src="/assets/images/bitcoin_core_logo.png" alt="bitcoin core logo" width="160"><br />
<img src="{{ ROOT_PATH }}/assets/images/bitcoin_core_logo.png" alt="bitcoin core logo" width="160"><br />
<span class="copyright">&copy; {{ site.time | date: '%Y' }} {{ site.owner.name }}</span>
</div>

<link rel="stylesheet" href="/assets/css/fonts.css">
<link rel="stylesheet" href="{{ ROOT_PATH }}/assets/css/fonts.css">
14 changes: 7 additions & 7 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- For all browsers -->
<link rel="stylesheet" href="/assets/css/main.css">
<link rel="stylesheet" href="{{ ROOT_PATH }}/assets/css/main.css">
<meta http-equiv="cleartype" content="on">

<!-- Icons -->
<link rel="shortcut icon" href="/assets/images/favicon.ico"><!-- 16x16 -->
<link rel="shortcut icon" href="/assets/images/favicon.png"><!-- 32x32 -->
<link rel="apple-touch-icon-precomposed" href="/assets/images/apple-touch-icon-precomposed.png"><!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/images/apple-touch-icon-72x72-precomposed.png"><!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/images/apple-touch-icon-114x114-precomposed.png"><!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/images/apple-touch-icon-144x144-precomposed.png"><!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->
<link rel="shortcut icon" href="{{ ROOT_PATH }}/assets/images/favicon.ico"><!-- 16x16 -->
<link rel="shortcut icon" href="{{ ROOT_PATH }}/assets/images/favicon.png"><!-- 32x32 -->
<link rel="apple-touch-icon-precomposed" href="{{ ROOT_PATH }}/assets/images/apple-touch-icon-precomposed.png"><!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ ROOT_PATH }}/assets/images/apple-touch-icon-72x72-precomposed.png"><!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ ROOT_PATH }}/assets/images/apple-touch-icon-114x114-precomposed.png"><!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ ROOT_PATH }}/assets/images/apple-touch-icon-144x144-precomposed.png"><!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->

<!-- Hide Searchbar if nojs -->
<noscript>
Expand Down
20 changes: 10 additions & 10 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<div class="navigation-wrapper">
<div class="site-name">
{% assign homelink = site.data.navigation[page.lang]['home'] %}
<a href="{{ homelink.url }}"><img src="/assets/images/bitcoin_core_logo_colored_reversed.png" alt="bitcoin core logo"></a>
<a href="{{ ROOT_PATH }}{{ homelink.url }}"><img src="{{ ROOT_PATH }}/assets/images/bitcoin_core_logo_colored_reversed.png" alt="bitcoin core logo"></a>
</div><!-- /.site-name -->
<div class="top-navigation">
<nav role="navigation" id="site-nav" class="nav">
<ul>
{% for link in site.data.navigation[page.lang] %}
{% if link[0] != 'home' and link[1].submenu != true and link[1].disabled != true %}
<li><a href="{{ link[1].url }}">{{ link[1].title }}</a></li>
<li><a href="{{ ROOT_PATH }}{{ link[1].url }}">{{ link[1].title }}</a></li>
{% elsif link[1].submenu == true and link[1].disabled != true %}
<li>{% if link[1].url %}<a href="{{ link[1].url }}">{{ link[1].title }}</a>{% else %}<a href="javascript:;">{{ link[1].title }}</a>{% endif %}
<li>{% if link[1].url %}<a href="{{ ROOT_PATH }}{{ link[1].url }}">{{ link[1].title }}</a>{% else %}<a href="javascript:;">{{ link[1].title }}</a>{% endif %}
<ul>
{% for sublink in link[1].tree %}

{% if sublink[0] != 'home' and sublink[1].submenu != true and sublink[1].disabled != true %}
<li><a href="{{ sublink[1].url }}">{{ sublink[1].title }}</a></li>
<li><a href="{{ ROOT_PATH }}{{ sublink[1].url }}">{{ sublink[1].title }}</a></li>
{% elsif sublink[1].submenu == true and sublink[1].disabled != true %}
<li>{% if sublink[1].url %}<a href="{{ sublink[1].url }}">{{ sublink[1].title }}</a>{% else %}<a href="javascript:;">{{ sublink[1].title }}</a>{% endif %}
<li>{% if sublink[1].url %}<a href="{{ ROOT_PATH }}{{ sublink[1].url }}">{{ sublink[1].title }}</a>{% else %}<a href="javascript:;">{{ sublink[1].title }}</a>{% endif %}
<ul>
{% for sublink2 in sublink[1].tree %}
<li><a href="{{ sublink2[1].url }}">{{ sublink2[1].title }}</a></li>
<li><a href="{{ ROOT_PATH }}{{ sublink2[1].url }}">{{ sublink2[1].title }}</a></li>
{% endfor %}
</ul>
</li>
Expand All @@ -31,7 +31,7 @@
<li>
{% for article in site.doc %}
{% if article.btcversion == "index" %}
<a href="{{article.url}}">RPC Docs</a>
<a href="{{ ROOT_PATH }}{{article.url}}">RPC Docs</a>
{% endif %}
{% endfor %}
{% assign groups = site.doc | group_by:"btcversion" | sort_by: "btcversion" | reverse %}
Expand All @@ -40,7 +40,7 @@
{% if group.name != "index" %}
{% for article in group.items %}
{% if article.name == "index" %}
<li><a href="{{article.url}}">{{group.name}}</a></li>
<li><a href="{{ ROOT_PATH }}{{article.url}}">{{group.name}}</a></li>
{% endif %}
{% endfor %}
{% endif %}
Expand All @@ -57,9 +57,9 @@

<li id="langselect" class="lang">
<select onchange="window.location=this.value;">
<option value="{{ post.url }}">{{ site.data.languages[page.lang] }}</option>
<option value="{{ ROOT_PATH }}{{ post.url }}">{{ site.data.languages[page.lang] }}</option>
{% for post in posts %}
{% if post.lang != page.lang %}<option value="{{ post.url }}">{{ site.data.languages[post.lang] }}</option>{% endif %}
{% if post.lang != page.lang %}<option value="{{ ROOT_PATH }}{{ post.url }}">{{ site.data.languages[post.lang] }}</option>{% endif %}
{% endfor %}
{% for release in releases %}
{% if release.lang != page.lang %}<option value="{{ release.url }}">{{ site.data.languages[release.lang] }}</option>{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions _includes/related.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<div class="related-articles">
{% assign translations = site.data.translations[page.lang] %}
{% assign navigation = site.data.navigation[page.lang] %}
<h4>{{ translations.related }} <small class="pull-right">(<a href="{{ navigation.blog.url }}">{{ translations.viewallposts }}</a>)</small></h4>
<h4>{{ translations.related }} <small class="pull-right">(<a href="{{ ROOT_PATH }}{{ navigation.blog.url }}">{{ translations.viewallposts }}</a>)</small></h4>
<ul>
{% for post in related_posts limit:3 %}
<li><a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
<li><a href="{{ ROOT_PATH }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
<hr />
</div><!-- /.related-articles -->
{% endif %}
{% endif %}
3 changes: 2 additions & 1 deletion _includes/releases.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% include root_path.html %}
<ul class="releases">
{% assign english_posts = site.releases | sort: 'release' | reverse %}
{% assign translated_posts=site.posts | where:"lang", page.lang | where:"type", 'releases' %}
Expand All @@ -7,7 +8,7 @@
{% if t_post.name == post.name %}{% assign post=t_post %}{% break %}{% endif %}
{% endfor %}
<li>
<a href="{{ post.url }}">
<a href="{{ ROOT_PATH }}{{ post.url }}">
{{ post.title | replace: '<br/>', '' }}
</a>
<div class="desc">{{ post.desc }}</div>
Expand Down
18 changes: 18 additions & 0 deletions _includes/root_path.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% assign ROOT_PATH = ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently produces bad links when assets/elements/404.md is rendered as the content of that page is served at the URL of a non-existent page (e.g. https://bitcoincore.org/foo/bar ), and that URL may be more or less deep than the static 404 page. I think maybe you could throw a {% if page.permalink == "/404.html" %}{% assign ROOT_PATH="" %}{% endif %} in there to fix, since I suspect IFPS doesn't have an automatic 404 redirect feature.

Copy link
Author

@raucao raucao Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have just added the switch.

Since go-ipfs 0.7.0 (latest stable version), the built-in HTTP gateway supports custom 404 pages. So we could add a special one for this site, but would have to think about how that would work with relative links.

Not sure if this means the 404 links on bitcoincore.org would now be broken when looking at a nested path.

%}{% assign depth = page.url | split: '/' | size | minus: 1
%}{% if depth < 1
%}{% assign ROOT_PATH = '.'
%}{% elsif depth == 1
%}{% assign ROOT_PATH = '..'
%}{% elsif depth == 2
%}{% assign ROOT_PATH = '../..'
%}{% elsif depth == 3
%}{% assign ROOT_PATH = '../../..'
%}{% elsif depth == 4
%}{% assign ROOT_PATH = '../../../..'
%}{% elsif depth == 5
%}{% assign ROOT_PATH = '../../../../..'
%}{% elsif depth == 6
%}{% assign ROOT_PATH = '../../../../../..'
%}{% endif
%}
2 changes: 1 addition & 1 deletion _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="/assets/js/scripts.js"></script>
<script src="{{ ROOT_PATH }}/assets/js/scripts.js"></script>
{% if site.owner.google.analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand Down
29 changes: 15 additions & 14 deletions _includes/templates/download.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% include root_path.html %}
{% capture /dev/null %}<!-- suppress render of this part -->
<!-- Copyright 2013 - 2016 The Bitcoin.org Project.
Copyright 2017 - 2020 The BitcoinCore.org Project
Expand All @@ -6,7 +7,7 @@
{% assign VERSION_SORTED_RELEASES = site.releases | sort: 'release' | reverse %}
{% capture CURRENT_RELEASE %}{% for subver in VERSION_SORTED_RELEASES[0].release %}{{subver}}{% unless forloop.last %}.{% endunless %}{% endfor %}{% endcapture %}
{% assign magnet = VERSION_SORTED_RELEASES[0].optional_magnetlink %}
{% capture PATH_PREFIX %}/bin/bitcoin-core-{{CURRENT_RELEASE}}{% endcapture %}
{% capture PATH_PREFIX %}{{ ROOT_PATH }}/bin/bitcoin-core-{{CURRENT_RELEASE}}{% endcapture %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of the site is going to be a challenge. Although the binaries are served from bitcoincore.org/bin/, they're not a part of this repository and so won't be included in a site build unless the builder goes through the extra effort of wget'ing them from the main site.

Edit: thinking about this some more, I think maybe the right solution is to have a special build target / JEKYLL_ENV variable that causes mirror copies of the download page to only link to the torrent magnet link.

Copy link
Author

@raucao raucao Jan 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as additional input, it appears feasible to host larger files on IPFS, too: https://blog.ipfs.io/2020-02-14-improved-bitswap-for-container-distribution/

The question would be how to link them exactly. Going up one node relative to the root path should do the trick I guess. Also, we would need an IPFS-specific build of at least the download page in this case.

{% capture FILE_PREFIX %}bitcoin-{{CURRENT_RELEASE}}{% endcapture %}
{% assign SIGNING_KEY_FINGERPRINT = "01EA5486DE18A882D4C2684590C8019E36C2E964" %}
{% capture SIGNING_KEY_FINGERPRINT_EXPLODED %}{% include fingerprint-split.html hex=SIGNING_KEY_FINGERPRINT %}{% endcapture %}
Expand All @@ -15,54 +16,54 @@
{% assign GPG_WINDOWS_DOWNLOAD_URL = "https://gpg4win.org/download.html" %}
{% assign GITIAN_REPOSITORY_URL = "https://github.com/bitcoin-core/gitian.sigs" %}
{% endcapture %}
<link rel="alternate" type="application/rss+xml" href="/en/releasesrss.xml" title="Bitcoin Core releases">
<link rel="alternate" type="application/rss+xml" href="{{ ROOT_PATH }}/en/releasesrss.xml" title="Bitcoin Core releases">
<div class="download">
<h2>{{ page.latestversion }} {{CURRENT_RELEASE}} <a type="application/rss+xml" href="/en/releasesrss.xml"><img src="/assets/images/icons/icon_rss.svg" alt="rss" class="rssicon"></a></h2>
<div class="mainbutton"><a id="downloadbutton" href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.win64exe }}"><img src="/assets/images/os/but_windows.svg" alt="icon"><span>{{ page.download }}</span></a></div>
<h2>{{ page.latestversion }} {{CURRENT_RELEASE}} <a type="application/rss+xml" href="{{ ROOT_PATH }}/en/releasesrss.xml"><img src="{{ ROOT_PATH }}/assets/images/icons/icon_rss.svg" alt="rss" class="rssicon"></a></h2>
<div class="mainbutton"><a id="downloadbutton" href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.win64exe }}"><img src="{{ ROOT_PATH }}/assets/images/os/but_windows.svg" alt="icon"><span>{{ page.download }}</span></a></div>
<div class="downloadbox">
<p>{{ page.downloados }}</p>
<div>
<div>
<img src="/assets/images/os/med_win.png" alt="windows">
<img src="{{ ROOT_PATH }}/assets/images/os/med_win.png" alt="windows">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.win64exe }}" class="dl" id="downloadwinexe">Windows</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.win64exe }}" class="dl" id="win64exe">exe</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.win64zip }}" class="dl" id="win64zip">zip</a></span>
</span>
</div>
<div>
<img src="/assets/images/os/med_osx.png" alt="osx">
<img src="{{ ROOT_PATH }}/assets/images/os/med_osx.png" alt="osx">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}{{ site.data.binaries.macdmg }}">Mac OS X</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}{{ site.data.binaries.macdmg }}" class="dl" id="macdmg">dmg</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.mactar }}" class="dl" id="mactar">tar.gz</a></span>
</span>
</div>
<div>
<img src="/assets/images/os/med_linux.png" alt="linux">
<img src="{{ ROOT_PATH }}/assets/images/os/med_linux.png" alt="linux">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.lin64 }}" class="dl" id="lin64">Linux (tgz)</a>
</span>
</div>
</div>
<div>
<div>
<img src="/assets/images/os/arm.png" alt="ARM Linux">
<img src="{{ ROOT_PATH }}/assets/images/os/arm.png" alt="ARM Linux">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-arm-linux-gnueabihf.tar.gz" class="dl">ARM Linux</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-aarch64-linux-gnu.tar.gz" class="dl" id="lin64arm">64 bit</a> -
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-arm-linux-gnueabihf.tar.gz" class="dl" id="lin32arm">32 bit</a></span>
</span>
</div>
<div>
<img src="/assets/images/os/but_riscv.svg" alt="RISC-V Linux">
<img src="{{ ROOT_PATH }}/assets/images/os/but_riscv.svg" alt="RISC-V Linux">
<span>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.riscv64 }}.tar.gz" class="dl">RISC-V Linux</a>
<span><a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}-{{ site.data.binaries.riscv64 }}.tar.gz" class="dl" id="lin64riscv">64 bit</a></span>
</span>
</div>
<div>
<img src="/assets/images/os/med_snap.svg" alt="Snap Store Linux">
<img src="{{ ROOT_PATH }}/assets/images/os/med_snap.svg" alt="Snap Store Linux">
<span>
<a href="https://snapcraft.io/bitcoin-core" class="dl">Snap Store Linux</a>
</span>
Expand All @@ -73,7 +74,7 @@ <h2>{{ page.latestversion }} {{CURRENT_RELEASE}} <a type="application/rss+xml" h
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}.torrent" class="dl">{{ page.downloadtorrent }}</a>
{% if magnet %} <a href="{{ magnet | replace: '&', '\&amp;'}}" class="magnetlink" data-proofer-ignore></a>{% endif %}<br>
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX}}.tar.gz" class="dl">{{ page.source }}</a><br>
<a href="/en/releases">{{ page.versionhistory }}</a>
<a href="{{ ROOT_PATH }}/en/releases">{{ page.versionhistory }}</a>
</p>
<p class="downloadkeys">
<span>{{ page.releasekeys }}</span>
Expand Down Expand Up @@ -261,18 +262,18 @@ <h2 style="text-align: center">{{page.build_reproduction}}</h2>
var hreflin64 = document.getElementById('lin64').href;
switch (os) {
case 'windows64':
but.getElementsByTagName('IMG')[0].src = '/assets/images/os/but_windows.svg';
but.getElementsByTagName('IMG')[0].src = '{{ ROOT_PATH }}/assets/images/os/but_windows.svg';
but.href = hrefwin64exe;
linkwinexe.href = hrefwin64exe;
linkwinzip.href = hrefwin64zip;
break;
case 'linux64':
but.getElementsByTagName('IMG')[0].src = '/assets/images/os/but_linux.png';
but.getElementsByTagName('IMG')[0].src = '{{ ROOT_PATH }}/assets/images/os/but_linux.png';
but.href = hreflin64;
linklin.href = hreflin64;
break;
case 'mac':
but.getElementsByTagName('IMG')[0].src = '/assets/images/os/but_mac.svg';
but.getElementsByTagName('IMG')[0].src = '{{ ROOT_PATH }}/assets/images/os/but_mac.svg';
but.href = hrefmacdmg;
break;
}
Expand Down
5 changes: 3 additions & 2 deletions _layouts/doc.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!doctype html>
{% include root_path.html %}
{% include browser_magic.html %}
<head>
{% if page.name != "index" and page.name != "rpcindex" %}
Expand Down Expand Up @@ -46,7 +47,7 @@ <h3 class="toc-header">
<div class="toc-drawer js-hide-on-start">
<ul>
{% for article in group.items %}
<li class="leaf-article"><a href="{{article.url}}">{{article.name}}</a></li>
<li class="leaf-article"><a href="{{ ROOT_PATH }}{{article.url}}">{{article.name}}</a></li>
{% endfor %}
</ul>
</div>
Expand All @@ -73,7 +74,7 @@ <h3 class="toc-header">
{% if group.name != "index" %}
{% for article in group.items %}
{% if article.name == "index" %}
<li><a href="{{article.url}}">{{group.name}}</a></li>
<li><a href="{{ ROOT_PATH }}{{article.url}}">{{group.name}}</a></li>
{% endif %}
{% endfor %}
{% endif %}
Expand Down
11 changes: 6 additions & 5 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!doctype html>
{% include root_path.html %}
{% include browser_magic.html %}
<head>
{% include head.html %}
Expand All @@ -14,9 +15,9 @@
<div class="image-wrap">
<img src=
{% if page.image.feature contains 'http' %}
"{{ page.image.feature }}"
{{ ROOT_PATH }}/"{{ page.image.feature }}"
{% else %}
"/assets/images/{{ page.image.feature }}"
"{{ ROOT_PATH }}/assets/images/{{ page.image.feature }}"
{% endif %}
alt="{% if page.image.alt %}{{ page.image.alt }}{% else %}{{ page.title }}{% endif %} feature image">
{% if page.image.byline %}
Expand All @@ -34,7 +35,7 @@
</div>
<div id="index">
{% assign navigation = site.data.navigation[page.lang] %}
<h3><a href="{{ navigation.blog.url }}">Recent Posts</a></h3>
<h3><a href="{{ ROOT_PATH }}{{ navigation.blog.url }}">Recent Posts</a></h3>
<!-- h3><a href="{{ navigation.blog.url }}">Recent Posts</a></h3 -->
{% assign english_posts=site.posts | where:"lang", 'en' | where:"type", 'posts' %}
{% assign translated_posts=site.posts | where:"lang", page.lang | where:"type", 'posts' %}
Expand All @@ -45,9 +46,9 @@ <h3><a href="{{ navigation.blog.url }}">Recent Posts</a></h3>
{% endfor %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></a></h2>
<h2 class="link-post"><a href="{{ ROOT_PATH }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></a></h2>
{% else %}
<h2><a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<h2><a href="{{ ROOT_PATH }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>
{% endif %}
</article>
Expand Down
Loading