Skip to content

Commit 8176995

Browse files
committed
use gha for jekyll [skip ci]
1 parent aadbb78 commit 8176995

11 files changed

Lines changed: 119 additions & 100 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717

1818
1. Clone the repo.
1919
2. `cd docs`
20-
3. `bundle exec jekyll serve --baseurl=''`.
20+
3. `bundle exec jekyll serve --baseurl='' --config _config.dev.yml`.
2121
4. Navigate to `http://localhost:4000` and observe the docs.

.github/workflows/pages-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Pages build
1+
name: GH Pages build (docs)
22

33
on:
44
# push:
@@ -31,6 +31,8 @@ jobs:
3131

3232
- run: bundle exec jekyll build --trace
3333
working-directory: docs
34+
env:
35+
JEKYLL_ENV: production
3436

3537
- name: Upload artifact
3638
uses: actions/upload-pages-artifact@v4

docs/Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ source 'https://rubygems.org'
44

55
gem 'jekyll', '~> 4.4'
66

7-
# gem 'jekyll-theme-minimal', '~> 0.2'
87
gem 'jekyll-seo-tag', '~> 2.2'
8+
gem 'jekyll-minifier', '~> 0.2'
9+
gem 'jekyll-sitemap', '~> 1'
910

1011
gem 'base64', '~> 0.3'
1112

1213
gem 'kramdown-parser-gfm'
1314

14-
gem 'webrick', '~> 1.8'
15+
gem 'webrick', '~> 1.8'

docs/_config.dev.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
title: Lokalise APIv2 Ruby SDK
2+
email: bodrovis@protonmail.com
3+
description: >- # this means to ignore newlines until "baseurl:"
4+
Ruby interface for the Lokalise APIv2 that
5+
represents returned data as Ruby objects.
6+
baseurl: "/ruby-lokalise-api" # the subpath of your site, e.g. /blog
7+
url: "" # the base hostname & protocol for your site, e.g. http://example.com
8+
twitter_username: lokalise
9+
github_username: lokalise
10+
11+
# Build settings
12+
markdown: kramdown
13+
theme: null
14+
15+
strict_front_matter: true
16+
17+
plugins:
18+
- jekyll-seo-tag
19+
- jekyll-sitemap
20+
21+
defaults:
22+
- scope:
23+
path: ""
24+
type: "pages"
25+
values:
26+
layout: "default"

docs/_config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ description: >- # this means to ignore newlines until "baseurl:"
44
Ruby interface for the Lokalise APIv2 that
55
represents returned data as Ruby objects.
66
baseurl: "/ruby-lokalise-api" # the subpath of your site, e.g. /blog
7-
url: "" # the base hostname & protocol for your site, e.g. http://example.com
7+
url: "https://lokalise.github.io" # the base hostname & protocol for your site, e.g. http://example.com
88
twitter_username: lokalise
99
github_username: lokalise
1010

1111
# Build settings
1212
markdown: kramdown
1313
theme: null
1414

15+
strict_front_matter: true
16+
1517
plugins:
1618
- jekyll-seo-tag
19+
- jekyll-minifier
20+
- jekyll-sitemap
1721

1822
defaults:
1923
- scope:

docs/_layouts/default.html

Lines changed: 72 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,77 @@
11
<!DOCTYPE html>
2-
<html lang="{{ site.lang | default: "en-US" }}">
3-
<head>
4-
<meta charset="UTF-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
8-
{% seo %}
9-
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}?v={{ site.github.build_revision | default: site.time | date: '%s' }}">
10-
<!--[if lt IE 9]>
11-
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
12-
<![endif]-->
13-
<link rel="icon" type="image/png" sizes="192x192" href="{{ '/assets/android-icon.png' | relative_url }}">
14-
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/assets/favicon-32x32.png' | relative_url }}">
15-
<link rel="icon" type="image/png" sizes="96x96" href="{{ '/assets/favicon-96x96.png' | relative_url }}">
16-
<link rel="icon" type="image/png" sizes="16x16" href="{{ '/assets/favicon-16x16.png' | relative_url }}">
17-
</head>
18-
<body>
19-
<div class="wrapper">
20-
<header>
21-
<h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>
22-
23-
{% if site.logo %}
24-
<img src="{{site.logo | relative_url}}" alt="Logo" />
25-
{% endif %}
26-
27-
<p>{{ site.description | default: site.github.project_tagline }}</p>
28-
29-
{% if site.github.is_project_page %}
30-
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ site.github.repository_nwo }}</small></a></p>
31-
{% endif %}
32-
33-
<hr>
34-
35-
<nav class="menu">
36-
<h3>Usage</h3>
37-
{% include nav.html %}
38-
</nav>
39-
40-
<hr>
41-
42-
<nav class="menu">
43-
<h3>Additional info</h3>
44-
{% include nav_additional.html %}
45-
</nav>
46-
47-
<hr>
48-
49-
<nav class="menu">
50-
<h3>External resources</h3>
51-
52-
<ul>
53-
<li><a href="https://developers.lokalise.com/reference/lokalise-rest-api" target="_blank">Lokalise APIv2 docs</a></li>
54-
<li><a href="https://github.com/lokalise/php-lokalise-api" target="_blank">PHP API client</a></li>
55-
<li><a href="https://lokalise.github.io/node-lokalise-api/" target="_blank">Node.js API client</a></li>
56-
<li><a href="https://github.com/lokalise/go-lokalise-api" target="_blank">Go API client</a></li>
57-
<li><a href="https://python-lokalise-api.readthedocs.io/" target="_blank">Python API client</a></li>
58-
<li><a href="https://lokalise.github.io/elixir-lokalise-api" target="_blank">Elixir API client</a></li>
59-
</ul>
60-
</nav>
61-
62-
{% if site.show_downloads %}
63-
<ul class="downloads">
64-
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
65-
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
66-
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
2+
<html lang="{{ site.lang | default: 'en-US' }}">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
9+
{% seo %}
10+
<link rel="stylesheet"
11+
href="{{ '/assets/css/style.css' | relative_url }}?v={{ site.github.build_revision | default: site.time | date: '%s' }}">
12+
<link rel="icon" type="image/png" sizes="192x192" href="{{ '/assets/android-icon.png' | relative_url }}">
13+
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/assets/favicon-32x32.png' | relative_url }}">
14+
<link rel="icon" type="image/png" sizes="96x96" href="{{ '/assets/favicon-96x96.png' | relative_url }}">
15+
<link rel="icon" type="image/png" sizes="16x16" href="{{ '/assets/favicon-16x16.png' | relative_url }}">
16+
</head>
17+
18+
<body>
19+
<div class="wrapper">
20+
<header>
21+
{% assign root = "/" | absolute_url %}
22+
<h1><a href="{{ root }}">{{ site.title | default: site.github.repository_name }}</a></h1>
23+
24+
25+
{% if site.logo %}
26+
<img src="{{site.logo | relative_url}}" alt="Logo" />
27+
{% endif %}
28+
29+
<p>{{ site.description | default: site.github.project_tagline }}</p>
30+
31+
{% if site.github.is_project_page %}
32+
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub
33+
<small>{{ site.github.repository_nwo }}</small></a></p>
34+
{% endif %}
35+
36+
<hr>
37+
38+
<nav class="menu">
39+
<h3>Usage</h3>
40+
{% include nav.html %}
41+
</nav>
42+
43+
<hr>
44+
45+
<nav class="menu">
46+
<h3>Additional info</h3>
47+
{% include nav_additional.html %}
48+
</nav>
49+
50+
<hr>
51+
52+
<nav class="menu">
53+
<h3>External resources</h3>
54+
55+
<ul>
56+
<li><a href="https://github.com/lokalise/ruby-lokalise-api" target="_blank">Source code</a></li>
57+
<li><a href="https://developers.lokalise.com/reference/lokalise-rest-api" target="_blank">Lokalise APIv2 docs</a></li>
58+
<li><a href="https://github.com/lokalise/php-lokalise-api" target="_blank">PHP API client</a></li>
59+
<li><a href="https://lokalise.github.io/node-lokalise-api/" target="_blank">Node.js API client</a></li>
60+
<li><a href="https://github.com/lokalise/go-lokalise-api" target="_blank">Go API client</a></li>
61+
<li><a href="https://python-lokalise-api.readthedocs.io/" target="_blank">Python API client</a></li>
62+
<li><a href="https://lokalise.github.io/elixir-lokalise-api" target="_blank">Elixir API client</a></li>
6763
</ul>
68-
{% endif %}
69-
</header>
70-
<section>
64+
</nav>
65+
</header>
66+
<section>
7167

7268
{{ content }}
7369

74-
</section>
75-
<footer>
76-
{% if site.github.is_project_page %}
77-
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
78-
{% endif %}
79-
<p><small>Hosted on GitHub Pages</small></p>
80-
</footer>
81-
</div>
82-
{% if site.google_analytics %}
83-
<script>
84-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
85-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
86-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
87-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
88-
ga('create', '{{ site.google_analytics }}', 'auto');
89-
ga('send', 'pageview');
90-
</script>
91-
{% endif %}
92-
</body>
93-
</html>
70+
</section>
71+
<footer>
72+
<p><small>Hosted on GitHub Pages</small></p>
73+
</footer>
74+
</div>
75+
</body>
76+
77+
</html>

docs/_sass/_jekyll-theme-minimal.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ blockquote {
6767
}
6868

6969
code, pre {
70-
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
70+
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, monospace;
7171
color:#333;
7272
}
7373

docs/additional_info/contribution_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424

2525
1. Clone the repo.
2626
2. `cd docs`
27-
3. `bundle exec jekyll serve --baseurl=''`.
27+
3. `bundle exec jekyll serve --baseurl='' --config _config.dev.yml`.
2828
4. Navigate to `http://localhost:4000` and observe the docs.

docs/api/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require 'ruby_lokalise_api'
2424
@client = RubyLokaliseApi.client 'YOUR_TOKEN_HERE'
2525
```
2626

27-
Now the `@client` can be used to perform API requests! Learn more about additional options in the [Customizing request section](#customizing-request).
27+
Now the `@client` can be used to perform API requests! Learn more about additional options on the [Customizing request]({{ '/additional_info/customization/' | relative_url }}) page.
2828

2929
## Objects and models
3030

docs/assets/css/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ h3,
1414
h4,
1515
h5,
1616
h6 {
17-
font-family: 'FactorA-Medium', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
17+
font-family: 'FactorA-Medium', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
1818
}
1919

2020

0 commit comments

Comments
 (0)