From 56d252c6bb7447df65d5117582aca3a79c1a2c55 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Wed, 29 Jun 2016 18:14:25 +0200 Subject: [PATCH] Add option to link to GitHub release. --- docs/getting-started.md | 19 +++++++++++++++++++ material/drawer.html | 15 +++++++++++---- mkdocs.yml | 2 ++ src/drawer.html | 18 +++++++++++++----- 4 files changed, 45 insertions(+), 9 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 8360be1d7..d8cf19074 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -103,6 +103,25 @@ extra: logo: 'images/logo.png' ``` +### Link to GitHub releases page + +If your project has a GitHub url configured, the default behavior is that a +downlink button is displayed, linking to the source download of the given +`extra.version` or `master` branch. To link to the releases page instead, +set `extra.github.download_release` to `true`. It will link to the release of +the given `extra.version` or when no `extra.version` is given, the latest +release: + +``` yaml +repo_name: GitHub +repo_url: https://github.com/squidfunk/mkdocs-material + +extra: + github: + download_release: true +``` + + ### Changing the color palette Material defines a default hue for every primary and accent color on Google's diff --git a/material/drawer.html b/material/drawer.html index c13075d48..e53a37a56 100644 --- a/material/drawer.html +++ b/material/drawer.html @@ -26,10 +26,17 @@ {% if repo_name == "GitHub" and repo_url %}