Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Change page titles to say marvel
Browse files Browse the repository at this point in the history
Kibana's standard title is replaced post build until we find something better.

relates to #23
  • Loading branch information
bleskes committed Jan 23, 2014
1 parent bdde41b commit 7da3985
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sense/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<title>Sense - a JSON aware interface to ElasticSearch</title>
<title>Marvel - Sense</title>
<link id="bootstrapThemeCss" href="vendor/bootstrap/css/bootstrap.light.min.css" type="text/css" rel="stylesheet"/>
<link href="vendor/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
<link id="senseThemeCss" href="css/sense.light.css" rel="stylesheet" type="text/css"/>
Expand Down
3 changes: 2 additions & 1 deletion tasks/build_task.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module.exports = function (grunt) {
'build_sense',
'copy:artifacts_to_build',
'clean:build_tmp',
'replace:git_commits'
'replace:git_commits',
'replace:kibana_replace_title'
]);

grunt.registerTask('build_sense', [
Expand Down
15 changes: 15 additions & 0 deletions tasks/options/replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ module.exports = function (config) {
cwd: '<%= buildSiteDir %>',
expand: true, src: ['**/*'], dest: '<%= buildSiteDir %>/'}
]
},
kibana_replace_title: {
options: {
patterns: [
{
match: /<title>.*?<\/title>/,
replacement: '<title>{{dashboard.current.title ? dashboard.current.title : "Marvel"}}</title>'
}
]
},
files: [
{
cwd: '<%= buildSiteDir %>',
expand: true, src: ['kibana/index.html'], dest: '<%= buildSiteDir %>/'}
]
}
}
};

0 comments on commit 7da3985

Please sign in to comment.