Skip to content

Commit e10bcc1

Browse files
committed
Add redirect from api/latest to the Javadoc of the latest release.
Also: - Added badges for the latest and snapshot versions of Javadocs. - Fixed the whitespaces in the generated HTML files. - Fixed the config so that the website works on local development servers. - Removed some unused files. - Added a basic 404 page.
1 parent b16624c commit e10bcc1

File tree

15 files changed

+129
-139
lines changed

15 files changed

+129
-139
lines changed

404.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: default
3+
title: Page Not Found
4+
---
5+
6+
# 404
7+
8+
The requested URL does not exist.

_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Guava
33
subtitle: Google core libraries for Java
44
description: Google core libraries for Java
5-
baseurl: /
65
url: https://guava.dev
76

87
themeColor: red

_includes/footer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% comment %}
1+
{%- comment -%}
22
Copyright (C) 2018 Google LLC.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,8 +11,8 @@
1111
distributed under the License is distributed on an "AS IS" BASIS,
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
14-
limitations under the License.foobar2
15-
{% endcomment %}
14+
limitations under the License.
15+
{%- endcomment -%}
1616

1717
<footer class="c-footer">
1818
<div class="u-container c-footer__container">

_includes/head.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% comment %}
1+
{%- comment -%}
22
Copyright (C) 2018 Google LLC.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,8 +11,8 @@
1111
distributed under the License is distributed on an "AS IS" BASIS,
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
14-
limitations under the License.foobar2
15-
{% endcomment %}
14+
limitations under the License.
15+
{%- endcomment -%}
1616

1717
<head>
1818
<meta charset="utf-8">
@@ -22,12 +22,11 @@
2222
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
2323
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
2424

25-
<link href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,700|Roboto+Mono:400,500' rel='stylesheet' type='text/css'>
25+
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400italic,700|Roboto+Mono:400,500" rel="stylesheet" type="text/css">
2626
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
27-
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
28-
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
29-
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
30-
{% if site.googleAnalyticsId %}
27+
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
28+
<link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace: '/index.html', '/' }}">
29+
{%- if site.googleAnalyticsId %}
3130
<script>
3231
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3332
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -37,5 +36,5 @@
3736
ga('create', '{{ site.googleAnalyticsId }}', 'auto');
3837
ga('send', 'pageview');
3938
</script>
40-
{% endif %}
39+
{%- endif %}
4140
</head>

_includes/navigation.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% comment %}
1+
{%- comment -%}
22
Copyright (C) 2018 Google LLC.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,16 +11,16 @@
1111
distributed under the License is distributed on an "AS IS" BASIS,
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
14-
limitations under the License.foobar2
15-
{% endcomment %}
14+
limitations under the License.
15+
{%- endcomment -%}
1616

1717
<nav class="c-navigation {% if site.fixedNav == 'true' %}is-fixed{% endif %}">
1818
<div class="c-navigation__container u-container">
1919

20-
{% for i in site.nav %}
21-
{% assign url = i.item.url %}
20+
{%- for i in site.nav %}
21+
{%- assign url = i.item.url %}
2222
<a class="c-navigation__item {% if page.url == url %}is-active{% endif %}" href="{{ url | prepend: site.baseurl }}">{{i.item.name}}</a>
23-
{% endfor %}
23+
{%- endfor %}
2424

2525
</div>
2626
</nav>

_includes/social.html

Lines changed: 0 additions & 39 deletions
This file was deleted.

_layouts/base.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% comment %}
1+
{%- comment -%}
22
Copyright (C) 2018 Google LLC.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,16 +12,14 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
{% endcomment %}
15+
{%- endcomment -%}
1616

1717
<!DOCTYPE html>
1818
<html class="t-{{ site.themeColor }}">
19-
{% include head.html %}
20-
<body>
21-
{% include navigation.html %}
22-
23-
{{ content }}
24-
25-
{% include footer.html %}
26-
</body>
19+
{% include head.html %}
20+
<body>
21+
{% include navigation.html %}
22+
{{ content }}
23+
{% include footer.html %}
24+
</body>
2725
</html>

_layouts/default.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
layout: base
1717
---
18+
1819
<article class="c-article">
1920
<header class="c-header c-article__header">
2021
<div class="u-container">
@@ -23,6 +24,6 @@ <h1 class="c-header__title">{{ page.title }}</h1>
2324
</header>
2425

2526
<div class="c-article__main">
26-
{{ content }}
27+
{{ content }}
2728
</div>
2829
</article>

_layouts/post.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

_layouts/redirect.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
{%- comment -%}
2+
Template from https://github.com/jekyll/jekyll-redirect-from/blob/master/lib/jekyll-redirect-from/redirect.html
3+
{%- endcomment -%}
4+
15
<!DOCTYPE html>
26
<html lang="en-US">
37
<meta charset="utf-8">

0 commit comments

Comments
 (0)