From 47be75313d8b8b1c203595d752c37a27a4e24c65 Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Fri, 6 Jan 2017 06:58:15 -0800 Subject: [PATCH] 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 https://github.com/facebook/nuclide/pull/952 where some of this was provided for Nuclide by a GitHub team member Tested by running site locally. Closes https://github.com/facebook/fresco/pull/1614 Differential Revision: D4386846 Pulled By: lambdapioneer fbshipit-source-id: b4cbc9fa90ce0ab858347bbd0a3424e51c8a5598 --- .gitignore | 2 -- docs/.gitignore | 1 - docs/Gemfile | 3 +++ docs/_config.yml | 15 +++++++++++++++ docs/_data/nav.yml | 8 ++++---- docs/_includes/head.html | 12 +----------- 6 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 docs/Gemfile diff --git a/.gitignore b/.gitignore index 29183dcec..cd4cae9fa 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,5 @@ local.properties localhost/ obj/ *.iml -Gemfile Gemfile.lock _site/ - diff --git a/docs/.gitignore b/docs/.gitignore index b0b4cdce2..72f5a4fea 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,7 +1,6 @@ .DS_STORE _site/ *-e -Gemfile Gemfile.lock *.swo *.swp diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 000000000..aed0323a1 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'github-pages', '~> 104', group: :jekyll_plugins diff --git a/docs/_config.yml b/docs/_config.yml index 39d16d880..9272ad47b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -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 diff --git a/docs/_data/nav.yml b/docs/_data/nav.yml index f9b971c16..d38ca6e05 100644 --- a/docs/_data/nav.yml +++ b/docs/_data/nav.yml @@ -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 diff --git a/docs/_includes/head.html b/docs/_includes/head.html index 53a516b22..31dedc2b7 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -3,21 +3,11 @@ - - - - - + {% seo %} - - {% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }}{% endif %} - - - -