1
0
mirror of https://github.com/bitwarden/help synced 2025-12-16 16:23:20 +00:00

stub out knowledgebase functionality using jekyll

This commit is contained in:
Kyle Spearrin
2016-10-08 00:24:45 -04:00
parent aa2a2c8fc9
commit b6b372c9ce
9 changed files with 213 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
_site/ _site/
.sass-cache/ .sass-cache/
.jekyll-metadata .jekyll-metadata
*.bat

View File

@@ -0,0 +1,10 @@
---
layout: article
title: Changing Your Master Password
category: getting-started
featured: true
popular: true
tags: [password, account]
---
This is how you change your master password.

View File

@@ -0,0 +1,5 @@
---
layout: category
category: getting-started
featured: true
---

12
_config.yml Normal file
View File

@@ -0,0 +1,12 @@
markdown: kramdown
permalink: pretty
encoding: UTF-8
collections:
categories:
output: true
permalink: /:path/
articles:
output: true
permalink: /:path/

7
_layouts/article.html Normal file
View File

@@ -0,0 +1,7 @@
---
layout: default
---
<div class="container">
{{content}}
</div>

14
_layouts/category.html Normal file
View File

@@ -0,0 +1,14 @@
---
layout: default
---
<div class="container">
<h1>{{page.title}}</h1>
<ol>
{% for article in site.articles %}
{% if article.category == page.category %}
<li><a href="{{article.url}}">{{article.title}}</a></li>
{% endif %}
{% endfor %}
</ol>
</div>

83
_layouts/default.html Normal file
View File

@@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>{% if page.title %} {{ page.title }} | {% endif %}bitwarden</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<meta name="x-stylesheet-test-bs" content="" class="invisible" />
<script>!function (a, b, c) { var d, e = document, f = e.getElementsByTagName('SCRIPT'), g = f[f.length - 1].previousElementSibling, h = e.defaultView && e.defaultView.getComputedStyle ? e.defaultView.getComputedStyle(g) : g.currentStyle; if (h && h[a] !== b) for (d = 0; d < c.length; d++) e.write('<link rel="stylesheet" href="' + c[d] + '"/>') }('visibility', 'hidden', ['lib\/bootstrap\/css\/bootstrap.min.css']);</script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
<meta name="x-stylesheet-test-fa" content="" class="fa" />
<script>!function (a, b, c) { var d, e = document, f = e.getElementsByTagName('SCRIPT'), g = f[f.length - 1].previousElementSibling, h = e.defaultView && e.defaultView.getComputedStyle ? e.defaultView.getComputedStyle(g) : g.currentStyle; if (h && h[a] !== b) for (d = 0; d < c.length; d++) e.write('<link rel="stylesheet" href="' + c[d] + '"/>') }('font-family', 'FontAwesome', ['lib\/font-awesome\/css\/font-awesome.min.css']);</script>
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,300italic,400italic,600italic%7CLato:400,700,400italic" rel="stylesheet" type="text/css">
<link href="/css/styles.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><i class="fa fa-shield"></i> <strong>bit</strong>warden</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/"><i class="fa fa-home fa-fw"></i> Home</a>
</li>
</ul>
</div>
</div>
</nav>
{{content}}
<footer class="text-center">
&copy; Copyright 2015 - {{ 'now' | date: "%Y" }}, 8bit Solutions LLC
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script>(window.jQuery || document.write('<script src="lib\/jquery\/jquery.min.js"><\/script>'));</script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>((window.jQuery && window.jQuery.fn && window.jQuery.fn.modal) || document.write('<script src="lib\/bootstrap\/js\/bootstrap.min.js"><\/script>'));</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
//ga('create', 'UA-81915606-4', 'auto');
ga('send', 'pageview');
function gaEvent(action) {
ga('send', {
hitType: 'event',
eventCategory: 'main',
eventAction: action
});
}
</script>
</body>
</html>

26
css/styles.scss Normal file
View File

@@ -0,0 +1,26 @@
---
---
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
padding-top: 51px;
}
.search-header {
background: lightblue;
padding: 50px 0;
margin-bottom: 20px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background-color: #black;
}

55
index.html Normal file
View File

@@ -0,0 +1,55 @@
---
layout: default
title: Help, FAQ, and Support
---
<div class="search-header">
<div class="container">
<form action="search.html" method="get">
<div class="input-group">
<input type="search" class="form-control" placeholder="Type your problem here...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Search</button>
</span>
</div>
</form>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="row">
{% for category in site.categories %}
{% if category.featured == true %}
<div class="col-md-6">
<h3>{{category.title}}</h3>
<ul>
{% for article in site.articles %}
{% if article.category == category.category and article.featured == true %}
<li><a href="{{article.url}}">{{article.title}}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="col-md-4">
<h3>Categories</h3>
<ul>
{% for category in site.categories %}
<li><a href="{{category.url}}">{{category.title}}</a></li>
{% endfor %}
</ul>
<h3>Popular</h3>
<ul>
{% for article in site.articles %}
{% if article.popular == true %}
<li><a href="{{article.url}}">{{article.title}}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>