Adding menu

This commit is contained in:
Pixelastic 2017-12-14 13:08:34 +01:00
parent 01c6e81650
commit c8272bc341
15 changed files with 215 additions and 9 deletions

View File

@ -1,5 +1,5 @@
root = true
[*]
indent_style = space
indent_size = 2

View File

@ -35,21 +35,22 @@ const sidebarMenu = [
{ title: 'Options', url: 'options.html' },
{ title: 'Commandline', url: 'commandline.html' },
{ title: 'Hooks', url: 'hooks.html' },
{ title: 'Indexing modes', url: 'indexing-modes.html' },
],
},
{
title: 'Advanced',
items: [
{ title: 'Github Pages', url: 'github-pages.html' },
{ title: 'Netlify', url: 'netlify.html' },
{ title: 'Travis', url: 'travis.html' },
{ title: 'Deploying on Netlify', url: 'netlify.html' },
{ title: 'Deploying on Github Pages', url: 'github-pages.html' },
],
},
{
title: 'Examples',
items: [
{ title: 'Autocomplete', url: 'autocomplete.html' },
{ title: 'InstantSearch', url: 'instantsearch.html' },
{ title: 'Blog', url: 'blog.html' },
{ title: 'Dropdown menu', url: 'autocomplete.html' },
{ title: 'Collection search', url: 'collections.html' },
],
},
];

View File

@ -0,0 +1,14 @@
---
title: Autocomplete
layout: content-with-menu.pug
---
# Autocomplete
Showing a specific implementation of how to search using a dropdown. We push the
data, and then we build the display using DocSearch for example.

16
docs-src/src/blog.md Normal file
View File

@ -0,0 +1,16 @@
---
title: Blog search
layout: content-with-menu.pug
---
# Blog search
Explanation of how to search into a blog. Examples will be given using common
themes. I could use the Hyde theme as a great use-case and show how to implement
it with InstantSearch.js.

View File

@ -0,0 +1,17 @@
---
title: Blog search
layout: content-with-menu.pug
---
# Search into custom collections
This one will be a more advanced use-case, where I can explain how to search
into a custom collection of items. I will use the actual list of Jekyll plugins
and show how it is possible to search into them, in a more complex use-case.

View File

@ -0,0 +1,12 @@
---
title: Command line
layout: content-with-menu.pug
---
# Commandline
List of all the commandline arguments that can be passed to the plugin and what
they do. Includes ENV variables as well.

View File

@ -61,7 +61,7 @@
},
{
"name": "Documentation",
"url": "documentation.html"
"url": "configuration.html"
},
{
"name": "Examples",

View File

@ -5,4 +5,58 @@ layout: content-with-menu.pug
# Getting started
Hello
## Welcome to jekyll-algolia
`jekyll-algolia` is a Jekyll plugin that lets you index all your content to
Algolia, to make it searchable by typing `jekyll algolia`.
## Requirements
You'll need:
- [Jekyll][1] >= 3.6.0
- [Ruby][2] >= 2.3.0
- [Bundler][3]
## Installation
You need to add `jekyll-algolia` to your `Gemfile`, as part of the
`:jekyll-plugins` group. If you do not yet have a Gemfile, here is the minimal
content you'll need:
```ruby
source 'https://rubygems.org'
gem 'jekyll', '~> 3.6'
group :jekyll_plugins do
gem 'jekyll-algolia'
end
```
Then, run `bundle install` to update your dependencies.
If everything went well, you should be able to run `jekyll help` and see the
`algolia` subcommand listed.
## Configuration
You need to provide certain Algolia credentials for this plugin to *index* your
site.
*If you don't yet have an Algolia account, you can open a free [Community plan
here][4]. Once signed in, you can get your credentials from
[your dashboard][5].*
The plugin will try to fetch the credentials from your environment-variables
hash and fallback to your Jekyll configuration if not found.
To pass the credentials as ENV variables, you can do so at the same time when
you run the `jekyll algolia` command
[1]: https://jekyllrb.com/
[2]: https://www.ruby-lang.org/en/
[3]: http://bundler.io/
[4]: https://www.algolia.com/users/sign_up/hacker
[5]: https://www.algolia.com/licensing

View File

@ -0,0 +1,15 @@
---
title: Deploying on GitHub Pages
layout: content-with-menu.pug
---
# Deploying on GitHub Pages
Explain how to deploy on add search on GitHub Pages. Imagine that they already
have a GitHub pages website.
Then based on if they push to master or gh-pages, should create a Travis account
and put all the info so it builds automatically each time.

13
docs-src/src/hooks.md Normal file
View File

@ -0,0 +1,13 @@
---
title: Hooks
layout: content-with-menu.pug
---
# Hooks
Explanation of what the hooks can do: give more control diretcly in ruby. Make
a list of what can be done, then explain each hook and how it works

View File

@ -0,0 +1,14 @@
---
title: How does this work?
layout: content-with-menu.pug
---
# How does this work?
More tehcnical explanation, to explain the underlying principles of the plugin.
That it acts as a an actual build, but instead of creating HTML files, it will
pus records to Algolia.
What is a record? We will take each page and split it into several JSON objects
and push thoses.

View File

@ -0,0 +1,24 @@
---
title: Indexing modes
layout: content-with-menu.pug
---
# Indexing modes
Several ways to skin a cat, so show different ways of indexing. We want to be
mindful of people quotas.
- atomic: push everything to a new index
- diff: pushes the difference
- atomic-diff: Makes a copy of the current index, then do a diff on it, and
replace it
Show pros and cons of each

View File

@ -1,7 +1,7 @@
extends ./common/meta.pug
block body
section.documentation-section.debug
section.documentation-section
.container
nav.sidebar.pos-abt.z-100
.sidebar-container

12
docs-src/src/netlify.md Normal file
View File

@ -0,0 +1,12 @@
---
title: Deploying on Netlify
layout: content-with-menu.pug
---
# Deploying on Netlify
Showing how to deploy on Netlify easily

14
docs-src/src/options.md Normal file
View File

@ -0,0 +1,14 @@
---
title: Options
layout: content-with-menu.pug
---
# Options
List of all options that can be passed in the \_config.yml file. A subheading
for each of them, explaining what it does. Some of those options might require
a more precise page to explain.
This will be content heavy