Skip to content

Commit fbdecc1

Browse files
bigfootjonHaroenv
authored andcommitted
Add Gentoo Linux install instructions (#935)
* Fix `file_exists` to support trailing whitespace * Add Gentoo Linux install instructions Yarn is available on Gentoo's portage package manager (1), and I have a pending patch to yarn to provide correct install instructions from within the yarn cli (2). (1) https://packages.gentoo.org/packages/sys-apps/yarn (2) yarnpkg/yarn#7123
1 parent b15cb48 commit fbdecc1

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

_data/i18n/en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ install_os_alpine: Alpine
270270
install_os_arch: Arch Linux
271271
install_os_centos: CentOS / Fedora / RHEL
272272
install_os_debian: Debian / Ubuntu
273+
install_os_gentoo: Gentoo Linux
273274
install_os_mac: macOS
274275
install_os_opensuse: openSUSE
275276
install_os_solus: Solus

_layouts/pages/install-ci.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{% include_relative _ci/solano.md %}
2828
{% endcapture %}
2929
{% capture gitlab %}
30-
{% capture exists %}{%file_exists _ci/gitlab.md%}{% endcapture %}
30+
{% capture exists %}{% file_exists _ci/gitlab.md %}{% endcapture %}
3131
{% if exists == "true" %}
3232
{% include_relative _ci/gitlab.md %}
3333
{% endif %}

_layouts/pages/install.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- arch
99
- centos
1010
- debian
11+
- gentoo
1112
- mac
1213
- solus
1314
- windows
@@ -46,11 +47,14 @@
4647
<div id="install-instructions">
4748
<div class="install-os-instructions">Loading...</div>
4849
{% for os in layout.operating_systems %}
49-
{% capture info %}{% include_relative _installations/{{os}}.md %}{% endcapture %}
5050
<div id="{{os}}" class="install-os-instructions" style="display: none">
5151
{% capture os_i18n %}install_os_{{os}}{% endcapture %}
5252
<h3>{{i18n[os_i18n]}}</h3>
53-
{{info | markdownify}}
53+
{% capture exists %}{% file_exists _installations/{{os}}.md %}{% endcapture %}
54+
{% if exists == "true" %}
55+
{% capture info %}{% include_relative _installations/{{os}}.md %}{% endcapture %}
56+
{{info | markdownify}}
57+
{% endif %}
5458
</div>
5559
{% endfor %}
5660
</div>

_plugins/file_exists.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def render(context)
1414
# Adds the site source, so that it also works with a custom one
1515
site_source = context.registers[:site].config['source']
1616
dir_name = File.dirname(context.environments.first["page"]["path"])
17-
file_path = File.join(site_source, dir_name, url)
17+
file_path = File.join(site_source, dir_name, url.strip)
1818

1919
# Check if file exists (returns true or false)
2020
"#{File.exist?(file_path)}"

lang/en/docs/_installations/gentoo.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="install-only-stable" markdown="1">
2+
On Gentoo Linux, you can install Yarn with portage.
3+
```sh
4+
sudo emerge --ask sys-apps/yarn
5+
```
6+
</div>
7+
8+
<div class="install-only-rc install-only-nightly" markdown="1">
9+
Currently, there are no Gentoo packages available for RC or nightly builds of Yarn. Please use the tarball:
10+
{% include_relative _installations/tarball.md %}
11+
</div>
12+
13+
### Path Setup
14+
15+
<!-- prettier-ignore -->
16+
{% include_relative _installations/unix_path_setup.md %}

0 commit comments

Comments
 (0)