Repository: zeppelin Updated Branches: refs/heads/master f9bc7a9fc -> 20f0e5bac
[ZEPPELIN-1398] Use relative path for search_data.json ### What is this PR for? Use relative path for search_data.json ### What type of PR is it? [Bug Fix] ### What is the Jira issue? * [ZEPPELIN-1398](https://issues.apache.org/jira/browse/ZEPPELIN-1398) Author: AhyoungRyu <fbdkdu...@hanmail.net> Author: Luciano Resende <lrese...@apache.org> Closes #1387 from lresende/search and squashes the following commits: 005f8dc [AhyoungRyu] [ZEPPELIN-1398] Fix wrong path in searched docs link f081b87 [AhyoungRyu] [ZEPPELIN-1398] Make screenshots.md not searchable 84b1b2b [Luciano Resende] [ZEPPELIN-1398] Use relative path for search_data.json Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/20f0e5ba Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/20f0e5ba Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/20f0e5ba Branch: refs/heads/master Commit: 20f0e5bacb9cfce98162dcf4e37602db24ae3331 Parents: f9bc7a9 Author: AhyoungRyu <fbdkdu...@hanmail.net> Authored: Thu Sep 1 17:22:04 2016 +0900 Committer: AhyoungRyu <ahyoung...@apache.org> Committed: Tue Sep 6 18:22:57 2016 +0900 ---------------------------------------------------------------------- docs/assets/themes/zeppelin/js/search.js | 6 ++++-- docs/screenshots.md | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/20f0e5ba/docs/assets/themes/zeppelin/js/search.js ---------------------------------------------------------------------- diff --git a/docs/assets/themes/zeppelin/js/search.js b/docs/assets/themes/zeppelin/js/search.js index 469b66e..407c1f9 100644 --- a/docs/assets/themes/zeppelin/js/search.js +++ b/docs/assets/themes/zeppelin/js/search.js @@ -25,7 +25,7 @@ jQuery(function() { this.field('group'); }); - window.data = $.getJSON('/search_data.json'); + window.data = $.getJSON('search_data.json'); window.data.then(function(loaded_data){ $.each(loaded_data, function(index, value){ window.idx.add( @@ -51,6 +51,8 @@ jQuery(function() { function display_search_results(results) { var $search_results = $("#search_results"); var zeppelin_version = {{site.ZEPPELIN_VERSION | jsonify}}; + var base_url = {{site.JB.BASE_PATH | jsonify}}; + var prod_url = {{site.production_url | jsonify}}; window.data.then(function(loaded_data) { if (results.length) { @@ -59,7 +61,7 @@ jQuery(function() { results.forEach(function(result) { var item = loaded_data[result.ref]; - var appendString = '<a href="'+item.url+'">'+item.title+'</a><div class="link">'+'https://zeppelin.apache.org/docs/'+zeppelin_version+item.url+'</div><p>'+item.excerpt+'</p><br/>'; + var appendString = '<a href="'+base_url+item.url.trim()+'">'+item.title+'</a><div class="link">'+prod_url+base_url+item.url.trim()+'</div><p>'+item.excerpt+'</p><br/>'; $search_results.append(appendString); }); http://git-wip-us.apache.org/repos/asf/zeppelin/blob/20f0e5ba/docs/screenshots.md ---------------------------------------------------------------------- diff --git a/docs/screenshots.md b/docs/screenshots.md index 2cad21b..e7af542 100644 --- a/docs/screenshots.md +++ b/docs/screenshots.md @@ -1,7 +1,7 @@ --- layout: page -title: "Screenshots" -description: "" +title: +description: --- <!-- Licensed under the Apache License, Version 2.0 (the "License");