Permalink
Browse files

Jekyll Updates

Summary:
- Add Gemfile to allow easy running of site locally
- Use new seo plugin for og info
- Use feed plugin for the XML feed
- Use relative URLs for local-to-site links in nav bar (makes it easier for local testing too)

See facebook/nuclide#952 where some of this was provided for Nuclide by a GitHub team member

Tested by running site locally.
Closes #1614

Differential Revision: D4386846

Pulled By: lambdapioneer

fbshipit-source-id: b4cbc9fa90ce0ab858347bbd0a3424e51c8a5598
  • Loading branch information...
1 parent f5f3e97 commit 47be75313d8b8b1c203595d752c37a27a4e24c65 @JoelMarcey JoelMarcey committed with facebook-github-bot Jan 6, 2017
Showing with 23 additions and 18 deletions.
  1. +0 −2 .gitignore
  2. +0 −1 docs/.gitignore
  3. +3 −0 docs/Gemfile
  4. +15 −0 docs/_config.yml
  5. +4 −4 docs/_data/nav.yml
  6. +1 −11 docs/_includes/head.html
View
@@ -6,7 +6,5 @@ local.properties
localhost/
obj/
*.iml
-Gemfile
Gemfile.lock
_site/
-
View
@@ -1,7 +1,6 @@
.DS_STORE
_site/
*-e
-Gemfile
Gemfile.lock
*.swo
*.swp
View
@@ -0,0 +1,3 @@
+source 'https://rubygems.org'
+
+gem 'github-pages', '~> 104', group: :jekyll_plugins
View
@@ -10,6 +10,7 @@ description: >
Fresco is a powerful system for displaying images in Android applications. It takes care of image loading and display so you don’t have to. Fresco supports Android 2.3 (Gingerbread) and later.
timezone: America/Los_Angeles
ghrepo: "facebook/fresco"
+logo: /static/logo.png
current_version: 1.0.0
@@ -46,3 +47,17 @@ color:
# or 'dark'
primary-overlay: "dark"
secondary-overlay: "light"
+
+# Gems
+gems:
+ - jekyll-feed
+ - jekyll-seo-tag
+ - jekyll-sitemap
+
+# Set default open graph image for all pages
+defaults:
+ -
+ scope:
+ path: ""
+ values:
+ image: /static/og_image.png
View
@@ -1,17 +1,17 @@
- title: Docs
- href: http://frescolib.org/docs/
+ href: /docs/
category: docs
- title: Support
- href: http://frescolib.org/support.html
+ href: /support.html
category: support
- title: Blog
- href: http://frescolib.org/blog/
+ href: /blog/
category: posts
- title: API
- href: http://frescolib.org/javadoc/
+ href: /javadoc/
category: apidocs
- title: GitHub
@@ -3,21 +3,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}" />
- <meta property="og:site_name" content="{{ site.title }}"/>
- <meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}" />
- <meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/static/og_image.png" />
- <meta property="og:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}" />
+ {% seo %}
<link rel="stylesheet" href="{{ site.url }}{{ site.baseurl }}/css/main.css" media="screen">
<link rel="icon" href="{{ site.url }}{{ site.baseurl }}/static/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" />
<script src="http://fb.me/react-with-addons-0.13.1.min.js"></script>
-
- <title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
- <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
-
- <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
- <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
</head>

0 comments on commit 47be753

Please sign in to comment.