`;
- });
- }
- }
-
- function displayDropdown() {
- let active = false;
- const trigger = document.querySelector('.cm-navigation__brands--community');
- document.querySelector('body').addEventListener('click', () => {
- if (active) {
- toggle();
- }
- });
-
- trigger.addEventListener('click', e => {
- e.stopPropagation();
- e.preventDefault();
- toggle();
- });
-
- function toggle() {
- active = !active;
- trigger.classList.toggle('dropdownActive');
- }
- }
-
- // If the user type :"s" or "/", open the searchbox
- function catchCmdF() {
- document.addEventListener('keyup', maybeOpenSearchBox);
-
- function maybeOpenSearchBox(e) {
- if (e.target.tagName !== 'INPUT' && e.keyCode === 83 || e.keyCode === 191) {
- document.querySelector('.cm-search__input').classList.add('open');
- document.querySelector('#searchbox').focus();
- } else if (e.keyCode === 27) {
- document.querySelector('.cm-search__input').classList.remove('open');
- document.querySelector('#searchbox').blur();
- }
- }
- }
-
- window.addEventListener('DOMContentLoaded', () => {
- cmSearch();
- toggleMobileMenu({
- trigger: '#open-menu',
- });
-
- wrapMenuOnMobile();
- displayDropdown();
- catchCmdF();
- });
-
- window.addEventListener('resize', () => {
- if (document.body.clientWidth < 768) {
- wrapMenuOnMobile();
- }
- });
-}
diff --git a/docgen/assets/js/main.js b/docgen/assets/js/main.js
deleted file mode 100644
index 0c725fa350..0000000000
--- a/docgen/assets/js/main.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import sidebar from './sidebar.js';
-import header from './header.js';
-import communityProjects from './communityProjects.js';
-import dropdowns from './dropdowns.js';
-import './editThisPage.js';
-import activateClipboard from './activateClipboard.js';
-
-const container = document.querySelector('.documentation-container');
-const sidebarContainer = document.querySelector('.sidebar');
-
-if (sidebarContainer) {
- sidebar({
- headersContainer: container,
- sidebarContainer,
- headerStartLevel: 2,
- });
-}
-
-header();
-communityProjects();
-dropdowns();
-activateClipboard([...document.querySelectorAll('.code-sample')]);
diff --git a/docgen/assets/js/sidebar.js b/docgen/assets/js/sidebar.js
deleted file mode 100644
index 2a9d8531c0..0000000000
--- a/docgen/assets/js/sidebar.js
+++ /dev/null
@@ -1,140 +0,0 @@
-export default function sidebar(options) {
- const {headersContainer, sidebarContainer} = options;
-
- const list = document.createElement('ul');
- list.classList.add('no-mobile');
-
- sidebarContainer.appendChild(list);
- if (sidebarContainer.firstChild.classList.contains('sidebar-navScroll')) {
- sidebarFollowScroll(sidebarContainer.firstChild);
- }
- activeLinks(sidebarContainer);
- scrollSpy(sidebarContainer, headersContainer);
-}
-
-function sidebarFollowScroll(sidebarContainer) {
- const linksContainer = sidebarContainer.querySelector('ul');
- const {height, navHeight, footerHeight, menuHeight, sidebarTop, titleHeight} =
- getPositionsKeyElements(sidebarContainer);
- const positionSidebar = () => {
- const currentScroll = window.pageYOffset;
- if (currentScroll > sidebarTop - navHeight) {
- const fold = height - footerHeight - menuHeight - navHeight;
- if (currentScroll > fold) {
- sidebarContainer.style.top = `${fold - currentScroll + navHeight}px`;
- } else {
- sidebarContainer.style.top = null;
- }
- sidebarContainer.classList.add('fixed');
- linksContainer.style.maxHeight = `calc(100vh - ${titleHeight + navHeight}px)`;
- } else {
- sidebarContainer.classList.remove('fixed');
- linksContainer.style.maxHeight = '';
- }
- };
-
- window.addEventListener('load', positionSidebar);
- document.addEventListener('DOMContentLoaded', positionSidebar);
- document.addEventListener('scroll', positionSidebar);
-}
-
-function scrollSpy(sidebarContainer, headersContainer) {
- const headers = [...headersContainer.querySelectorAll('h2')];
-
- const setActiveSidebarLink = header => {
- [...sidebarContainer.querySelectorAll('a')].forEach(item => {
- const currentHref = item.getAttribute('href');
- const anchorToFind = `#${header.getAttribute('id')}`;
- const isCurrentHeader =
- currentHref.indexOf(anchorToFind) > 0 &&
- currentHref.indexOf(anchorToFind) ===
- currentHref.length - anchorToFind.length;
- if (isCurrentHeader) {
- item.classList.add('active');
- } else {
- item.classList.remove('active');
- }
- });
- };
-
- const findActiveSidebarLink = () => {
- const highestVisibleHeaders = headers
- .map(header => ({element: header, rect: header.getBoundingClientRect()}))
- .filter(({rect}) =>
- rect.top < window.innerHeight / 3 && rect.bottom < window.innerHeight
- // top element relative viewport position should be at least 1/3 viewport
- // and element should be in viewport
- )
- // then we take the closest to this position as reference
- .sort((header1, header2) => Math.abs(header1.rect.top) < Math.abs(header2.rect.top) ? -1 : 1);
-
- if (headers[0] && highestVisibleHeaders.length === 0) {
- setActiveSidebarLink(headers[0]);
- return;
- }
-
- if (highestVisibleHeaders[0]) {
- setActiveSidebarLink(highestVisibleHeaders[0].element);
- }
- };
-
- findActiveSidebarLink();
- window.addEventListener('load', findActiveSidebarLink);
- document.addEventListener('DOMContentLoaded', findActiveSidebarLink);
- document.addEventListener('scroll', findActiveSidebarLink);
-}
-
-// The Following code is used to set active items
-// On the documentation sidebar depending on the
-// clicked item
-function activeLinks(sidebarContainer) {
- const linksContainer = sidebarContainer.querySelector('ul');
-
- linksContainer.addEventListener('click', e => {
- if (e.target.tagName === 'A') {
- [...linksContainer.querySelectorAll('a')].forEach(item => item.classList.remove('active'));
- e.target.classList.add('active');
- }
- });
-}
-// The Following function will make the '.sidebar-opener'
-// clickable and it will open/close the sidebar on the
-// documentations
-
-function toggleDocumentationSidebar() {
- const sidebarNav = document.querySelector('nav.sidebar');
- const trigger = document.querySelector('.sidebar-opener');
-
- function init() {
- const bodySize = document.body.clientWidth;
- if (bodySize <= 960 && sidebarNav) {
- trigger.addEventListener('click', () => {
- sidebarNav.classList.toggle('Showed');
- trigger.classList.toggle('Showed');
- });
- }
- }
- init();
-}
-toggleDocumentationSidebar();
-
-window.addEventListener('resize', () => {
- toggleDocumentationSidebar();
-});
-
-function getPositionsKeyElements($sidebar) {
- const sidebarBBox = $sidebar.getBoundingClientRect();
- const title = $sidebar.querySelector('.sidebar-header');
- const bodyBBox = document.body.getBoundingClientRect();
- const sidebarTop = sidebarBBox.top - bodyBBox.top;
- const footer = document.querySelector('.ac-footer');
- const navigation = document.querySelector('.cm-navigation');
- const menu = document.querySelector('.sidebar-container');
- const height = document.querySelector('html').getBoundingClientRect().height;
- const navHeight = navigation.offsetHeight;
- const footerHeight = footer.offsetHeight;
- const menuHeight = menu.offsetHeight;
- const titleHeight = title.offsetHeight;
-
- return {sidebarTop, height, navHeight, footerHeight, menuHeight, titleHeight};
-}
diff --git a/docgen/build.js b/docgen/build.js
deleted file mode 100644
index b9fafbd74e..0000000000
--- a/docgen/build.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import builder from './builder.js';
-import revAssets from './plugins/rev-assets.js';
-import {build as middlewares} from './middlewares';
-
-builder({
- middlewares,
-}, err => {
- if (err) {
- throw err;
- }
-
- revAssets();
-});
diff --git a/docgen/builder.js b/docgen/builder.js
deleted file mode 100644
index e6dc712d1d..0000000000
--- a/docgen/builder.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* eslint-disable no-console */
-
-import metalsmith from 'metalsmith';
-import config from './config.js';
-
-export default function builder({
- clean = true,
- middlewares,
-}, cb) {
- console.time('metalsmith build');
- // default source directory is join(__dirname, 'src');
- // https://github.com/metalsmith/metalsmith#sourcepath
- metalsmith(__dirname)
- .metadata(config)
- .clean(clean)
- .destination(config.docsDist)
- .use(middlewares)
- .build(err => {
- console.timeEnd('metalsmith build');
- cb(err);
- });
-}
diff --git a/docgen/config.js b/docgen/config.js
deleted file mode 100644
index c63f1de667..0000000000
--- a/docgen/config.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import pkg from '../package.json';
-import {rootPath} from './path';
-
-const configs = {
- production: {
- docsDist: rootPath('docs-production'),
- publicPath: '/instantsearch.js/',
- },
- development: {
- docsDist: rootPath('docs'),
- publicPath: '/',
- },
-};
-
-export default {...configs[process.env.NODE_ENV], pkg};
diff --git a/docgen/devServer.js b/docgen/devServer.js
deleted file mode 100644
index 921c376332..0000000000
--- a/docgen/devServer.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// this file will start a browsersync server that will serve /docs
-// it will automatically inject any css
-// it will also use webpack and watch/build/hot reload
-
-import webpack from 'webpack';
-import browserSync from 'browser-sync';
-import webpackConfig from './webpack.config.start.babel';
-import webpackDevMiddleware from 'webpack-dev-middleware';
-import webpackHotMiddleware from 'webpack-hot-middleware';
-import compression from 'compression';
-import config from './config.js';
-
-export default function() {
- const compiler = webpack(webpackConfig);
- const bs = browserSync.create();
- bs.init({
- server: config.docsDist,
- open: false,
- files: `${config.docsDist}/**/*`,
- watchOptions: {
- ignored: [
- /\.js$/, // any change to a JavaScript file must be ignored, webpack handles it
- /\.css\.map$/, // no need to reload the whole page for CSS source maps
- ],
- awaitWriteFinish: {
- stabilityThreshold: 150, // wait 150ms for the filesize to be stable (= write finished)
- },
- },
- notify: {
- styles: {
- bottom: 0,
- top: 'auto',
- },
- },
- middleware: [
- compression(),
- webpackDevMiddleware(compiler, {
- noInfo: true,
- publicPath: webpackConfig.output.publicPath,
- }),
- webpackHotMiddleware(compiler),
- ],
- });
-}
diff --git a/docgen/layouts/archetypes/content-with-menu.pug b/docgen/layouts/archetypes/content-with-menu.pug
deleted file mode 100644
index c96eb3de43..0000000000
--- a/docgen/layouts/archetypes/content-with-menu.pug
+++ /dev/null
@@ -1,15 +0,0 @@
-include ../common/meta.pug
-body.documentation
- include ../common/header.pug
- include ../common/hero.pug
-
- section.documentation-section
- a.sidebar-opener
- .container
- nav.sidebar
- block navigation
- .documentation-container
- block content
- include ../common/footer.pug
- script(src=webpack.assets['js/common.js'])
- script(src=webpack.assets['js/main.js'])
diff --git a/docgen/layouts/archetypes/single-column-formatted.pug b/docgen/layouts/archetypes/single-column-formatted.pug
deleted file mode 100644
index c3319770f6..0000000000
--- a/docgen/layouts/archetypes/single-column-formatted.pug
+++ /dev/null
@@ -1,11 +0,0 @@
-include ../common/meta.pug
-body.documentation
- include ../common/header.pug
- include ../common/hero.pug
-
- section.examples-section
- .container
- block content
- include ../common/footer.pug
- script(src=webpack.assets['js/common.js'])
- script(src=webpack.assets['js/main.js'])
diff --git a/docgen/layouts/archetypes/single-column.pug b/docgen/layouts/archetypes/single-column.pug
deleted file mode 100644
index 1a623b6709..0000000000
--- a/docgen/layouts/archetypes/single-column.pug
+++ /dev/null
@@ -1,10 +0,0 @@
-include ../common/meta.pug
-body
- include ../common/header.pug
- include ../common/hero.pug
-
- div
- block content
- include ../common/footer.pug
- script(src=webpack.assets['js/common.js'])
- script(src=webpack.assets['js/main.js'])
diff --git a/docgen/layouts/common/footer.pug b/docgen/layouts/common/footer.pug
deleted file mode 100644
index f2c976654d..0000000000
--- a/docgen/layouts/common/footer.pug
+++ /dev/null
@@ -1,133 +0,0 @@
-footer.ac-footer
- .ac-footer-container
- p.ac-footer-links
- | Code licensed under
- a.ac-footer-link-item(href='https://github.com/raw/algolia/instantsearch.js/develop/LICENSE') MIT
- br
- a.ac-footer-link-item(href='https://github.com/algolia/instantsearch.js/tree/v2') GitHub
- a.ac-footer-link-item(href='https://github.com/algolia/instantsearch.js/issues') issues
- a.ac-footer-link-item(href = 'https://www.algolia.com/policies/privacy') Privacy policy
- .ac-footer-container.ac-footer-brand
- p This project is part of
- img.ac-footer-brand-icon(src="images/community-badge.svg")
- figure
- img.ac-footer-brand-logo(src='https://res.cloudinary.com/hilnmyskv/image/upload/v1484219849/algolia-community-logo-words-darkbg.svg')
- figcaption Algolia Community
- a.ac-footer-btn.ac-footer-btn-cta(href='https://community.algolia.com/') See More
- span.ac-icon.ac-icon-love-dark
- p.ac-footer-version Latest version: #{pkg.version}
- .ac-footer-actions
- .footer-container
- p Build unique search experiences with Algolia
- a.ac-footer-btn.ac-footer-btn-ghost-grey(href='https://www.algolia.com/why?utm_medium=social-owned&utm_source=react%20instantsearch%20website&utm_campaign=homepage&utm_term=why')
- | See Why
- span.ac-icon-triangle
- a.ac-footer-btn.ac-footer-btn-ghost-blue(href='https://www.algolia.com/users/sign_up?utm_medium=social-owned&utm_source=react%20instantsearch%20website&utm_campaign=homepage&utm_term=get_started') Get Started For Free
-
-script(src="https://cdn.jsdelivr.net/g/jquery@3(jquery.slim.min.js),docsearch.js@2,underscorejs@1")
-script.
- docsearch({
- apiKey: '5cb6763f264e31381e18639a1147634c',
- indexName: 'react-instantsearch',
- inputSelector: '#searchbox',
- debug: true
- });
- window.twttr = (function (d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0],
- t = window.twttr || {};
- if (d.getElementById(id)) return t;
- js = d.createElement(s);
- js.id = id;
- js.src = "https://platform.twitter.com/widgets.js";
- fjs.parentNode.insertBefore(js, fjs);
-
- t._e = [];
- t.ready = function (f) {
- t._e.push(f);
- };
-
- return t;
- }(document, "script", "twitter-wjs"));
-
-if navPath === 'index.html'
- script.
- $(function () {
-
- var ACTIONS = {
- PREV: 'PREV',
- NEXT: 'NEXT'
- };
- var $prevBtn = $('.press__tweet__arrow--prev');
- var $nextBtn = $('.press__tweet__arrow--next');
- var $tweets = $('.press__tweet');
- var $tweetsContainer = $('.press__tweets');
-
- var currentIndex = Math.floor($tweets.length / 2);
- function setCurrentTweet(action) {
- switch (action) {
- case ACTIONS.PREV:
- if (currentIndex <= $tweets.length) {
- currentIndex--;
- }
- break;
- case ACTIONS.NEXT:
- if (currentIndex >= 0) {
- currentIndex++;
- }
- break;
- default:
- currentIndex = action;
- }
- centerTweets(action);
- }
- function centerTweets() {
- var action = arguments.length <= 0 || arguments[0] === undefined ? ACTIONS.PREV : arguments[0];
- var $centerElement = $($tweets[currentIndex]);
- var tweetSize = $(_.first($tweets)).width();
- var _$centerElement$posit = $centerElement.position();
- var left = _$centerElement$posit.left;
- var containerSize = $tweetsContainer.width();
- var gap = action === ACTIONS.NEXT ? tweetSize / 3 : tweetSize - 325;
- var offset = -(containerSize / 2) + left + gap;
- $tweets.removeClass('press__tweet--current');
- $centerElement.addClass('press__tweet--current');
- removeClickableTweets();
- $(_.first($tweetsContainer)).css('transform', 'translateX(' + (offset > 0 ? '-' + (offset + 150) : 0) + 'px)');
- }
- function loadTweets() {
- var promises = [];
- $tweets.each(function (index, tweet) {
- var $tweet = $(tweet);
- var tweetId = $tweet.attr('data-tweet-id');
- promises.push(twttr.widgets.createTweet(tweetId, tweet, {
- cards: 'hidden',
- conversation: 'none'
- }));
- });
- return promises;
- }
- function removeLoadingClass() {
- $tweetsContainer.removeClass('press__tweets--loading');
- }
- function bindEvents() {
- $prevBtn.on('click', _.partial(setCurrentTweet, ACTIONS.PREV));
- $nextBtn.on('click', _.partial(setCurrentTweet, ACTIONS.NEXT));
- $(window).on('resize', _.debounce(centerTweets, 100));
- }
-
- function showTab(e) {
- window.location.hash = e.target.hash;
- window.scrollTo(0, 0);
- centerTweets();
- }
-
- function removeClickableTweets() {
- $tweets.find('iframe').contents().find('.EmbeddedTweet').removeClass('js-clickToOpenTarget');
- $tweets.nextAll('.press__tweet--current').find('iframe').contents().find('.EmbeddedTweet').addClass('js-clickToOpenTarget');
- }
- twttr.ready(function () {
- Promise.all(loadTweets()).then(removeLoadingClass).then(centerTweets).then(removeClickableTweets);
- });
- bindEvents();
- });
-include ./marketing.pug
diff --git a/docgen/layouts/common/header.pug b/docgen/layouts/common/header.pug
deleted file mode 100644
index 9e78278ded..0000000000
--- a/docgen/layouts/common/header.pug
+++ /dev/null
@@ -1,72 +0,0 @@
-nav.cm-navigation
- .cm-navigation__brands
- .cm-navigation__brands--algolia
- a#algoliaLogo(href='https://algolia.com')
- img(src="images/logo-algolia.svg", width="100", alt="Algolia logo")
- .cm-navigation__brands--community
- a.cm-badge.no-mobile(href='https://community.algolia.com', title='Click to go to community, hover to access latest community projects')
- img(src="images/logo-community.svg")
- | Community
- .cm-navigation__brands--project
- a(href="") React InstantSearch
- .cm-navigation__dropdown-holder
- .cm-navigation__brands-dropdown
- .cm-navigation__brands-dropdown__container
- div(data-inject-community='')
- .cm-navigation__brands-dropdown__footer
- a(href="https://community.algolia.com")
- img(src="https://res.cloudinary.com/hilnmyskv/image/upload/v1484219849/algolia-community-logo-words.svg", class="community-logo")
- .cm-navigation__menu-mobile-trigger
- button#open-menu
- img(src="images/menu-icon.svg")
- .cm-navigation__menu
- .cm-menu__search
- .cm-menu__search--holder
- .cm-search__input
- input#searchbox(placeholder='Search something..', type='search')
- button#search
- svg
- use(xlink:href='#search-icon')
- button#cancel
- svg
- use(xlink:href='#cancel-icon')
- ul.cm-menu__list
- li.cm-menu__list__item(class=h.maybeActive(navPath, "Getting_started.html"))
- a(href="Getting_started.html", data-link = 'true') Getting started
- li.cm-menu__list__item(class=h.maybeActive(navPath, "guide/"))
- a(href="guide/", data-link = 'true') Guide
- li.cm-menu__list__item(class=h.maybeActive(navPath, ["widgets/", ["connectors/"]]))
- a(aria-controls='dropdown-1', aria-expanded='false', data-toggle-dropdown='dropdown-1', class="dropdown-toggler") API ▼
- ul#dropdown-1.simple-dropdown(role='tree', tabindex='-1')
- li
- a(href="widgets/InstantSearch.html", role='treeitem', data-link = 'true') #{''}
- li
- a(href="widgets/", role='treeitem', data-link = 'true') Widgets
- li
- a(href="connectors/", role='treeitem', data-link = 'true') Connectors
- li.cm-menu__list__item(class=h.maybeActive(navPath, "examples/"))
- a(aria-controls='dropdown-2', aria-expanded='false', data-toggle-dropdown='dropdown-2', class="dropdown-toggler") Examples ▼
- ul#dropdown-2.simple-dropdown(role='tree', tabindex='-1')
- li
- a(href="examples/Demos.html", role='treeitem', data-link = 'true') Demos
- li
- a(href="examples/Recipes.html", role='treeitem', data-link = 'true') Recipes
-
- li.cm-menu__list__item
- a(href='https://github.com/algolia/instantsearch.js/tree/v2', data-link = 'true')
- figure.github-icon
- svg(width='40px', height='39px')
- use(xlink:href='#github-icon')
- figcaption
- | GitHub
-
-svg(style='display: none')
- defs
- symbol#search-icon(viewbox='0 0 15 15')
- path(d='M10.052 10.88c-1.1.91-2.483 1.406-3.91 1.403C2.75 12.283 0 9.533 0 6.14 0 2.75 2.75 0 6.142 0c3.392 0 6.14 2.75 6.14 6.142 0 1.485-.526 2.847-1.403 3.91l3.95 3.95c.227.227.228.596-.002.826-.228.227-.597.228-.826 0l-3.95-3.95zm-3.91.234c2.745 0 4.972-2.227 4.972-4.972 0-2.747-2.227-4.972-4.972-4.972-2.747 0-4.972 2.225-4.972 4.972 0 2.745 2.225 4.972 4.972 4.972z', fill-rule='evenodd')
-
- symbol#cancel-icon(viewbox='0 0 13 13')
- path(d='M5.274 6.5L.614 1.84 0 1.225 1.226 0l.613.613 4.66 4.66 4.66-4.66.614-.613L13 1.226l-.613.613-4.66 4.66 4.66 4.66.613.614L11.774 13l-.613-.613-4.66-4.66-4.66 4.66-.614.613L0 11.774l.613-.613', fill-rule='evenodd')
-
- symbol#github-icon(viewbox='0 0 40 39')
- path#Shape(d='M19.998,0 C8.955,0 0,8.954 0,20 C0,28.837 5.73,36.333 13.678,38.977 C14.678,39.161 15.043,38.544 15.043,38.013 C15.043,37.538 15.026,36.281 15.016,34.613 C9.453,35.82 8.28,31.93 8.28,31.93 C7.37,29.62 6.058,29.005 6.058,29.005 C4.242,27.765 6.195,27.79 6.195,27.79 C8.203,27.93 9.259,29.85 9.259,29.85 C11.042,32.907 13.939,32.024 15.079,31.512 C15.259,30.222 15.777,29.339 16.349,28.839 C11.907,28.334 7.239,26.617 7.239,18.954 C7.239,16.771 8.019,14.984 9.297,13.587 C9.091,13.081 8.404,11.047 9.493,8.294 C9.493,8.294 11.173,7.756 14.993,10.344 C16.624924,9.89926425 18.308563,9.672627 20,9.67 C21.7,9.68 23.41,9.9 25.008,10.345 C28.826,7.757 30.502,8.295 30.502,8.295 C31.592,11.048 30.907,13.082 30.702,13.588 C31.984,14.985 32.757,16.772 32.757,18.955 C32.757,26.638 28.081,28.329 23.627,28.823 C24.343,29.441 24.983,30.661 24.983,32.526 C24.983,35.201 24.958,37.358 24.958,38.013 C24.958,38.549 25.318,39.171 26.334,38.976 C34.274,36.326 40,28.836 40,20 C40,8.955 31.045,0 19.998,0')
diff --git a/docgen/layouts/common/hero.pug b/docgen/layouts/common/hero.pug
deleted file mode 100644
index c7af47ae1f..0000000000
--- a/docgen/layouts/common/hero.pug
+++ /dev/null
@@ -1,20 +0,0 @@
-section.hero-section.shrink
- .container
- .hero-container
- if navPath !== 'index.html'
- .fl-left.article-title.doc-only
- figure
- img(src="images/react-instant-search-logo.svg", width="46")
- figcaption
- if mainTitle
- h1
- | #{mainTitle + ' > '}
- span=title
- else
- h1=title
- else
- .hero-content
- h1.project-title="React InstantSearch"
- h2.tagline.
- ⚡ Lightning-fast search for React and React Native apps
- a(href="Getting_started.html", class="btn btn-cta btn-fat-uc") Get Started
diff --git a/docgen/layouts/common/marketing.pug b/docgen/layouts/common/marketing.pug
deleted file mode 100644
index de2460ecc7..0000000000
--- a/docgen/layouts/common/marketing.pug
+++ /dev/null
@@ -1,82 +0,0 @@
-// GA
-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','//www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-32446386-12', 'auto');
- ga('send', 'pageview');
-// Google Tag Manager
-noscript
- iframe(src='//www.googletagmanager.com/ns.html?id=GTM-N8JP8G', height='0', width='0', style='display:none;visibility:hidden')
-script.
- (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
- new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
- j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
- '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
- })(window,document,'script','dataLayer','GTM-N8JP8G');
-// Twitter
-script.
- !function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
- },s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',
- a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
- twq('init','nuosw');
- twq('track','PageView');
-// Facebook
-script.
- !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
- n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
- n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
- t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
- document,'script','//connect.facebook.net/en_US/fbevents.js');
- fbq('init', '1654938174769952');
- fbq('track', "PageView");
-noscript
- img(height='1', width='1', style='display:none', alt='', src='https://www.facebook.com/tr?id=1654938174769952&ev=PageView&noscript=1')
-// Addroll
-script(type='text/javascript').
- adroll_adv_id = "TGR7R4XSGVGYVPX4LQBDFQ";
- adroll_pix_id = "YQNWNHGUUBD2JMY7BVOBWM";
- // adroll_email = "username@example.com"; // OPTIONAL: provide email to improve user identification
- (function () {
- var _onload = function(){
- if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return}
- if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return}
- var scr = document.createElement("script");
- var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
- scr.setAttribute('async', 'true');
- scr.type = "text/javascript";
- scr.src = host + "/j/roundtrip.js";
- ((document.getElementsByTagName('head') || [null])[0] ||
- document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
- };
- if (window.addEventListener) {window.addEventListener('load', _onload, false);}
- else {window.attachEvent('onload', _onload)}
- }());
-// Pardot
-script(type='text/javascript').
- piAId = '140121';
- piCId = '1667';
- (function() {
- function async_load(){
- var s = document.createElement('script'); s.type = 'text/javascript';
- s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js';
- var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c);
- }
- if(window.attachEvent) { window.attachEvent('onload', async_load); }
- else { window.addEventListener('load', async_load, false); }
- })();
-// KM
-script(type='text/javascript').
- var _kmq = _kmq || [];
- var _kmk = _kmk || 'cb5a3adb92e8915a37a36ba1a50f2ce4fae4a1b9';
- function _kms(u){
- setTimeout(function(){
- var d = document, f = d.getElementsByTagName('script')[0],
- s = d.createElement('script');
- s.type = 'text/javascript'; s.async = true; s.src = u;
- f.parentNode.insertBefore(s, f);
- }, 1);
- }
- _kms('//i.kissmetrics.com/i.js');
- _kms('//scripts.kissmetrics.com/' + _kmk + '.2.js');
diff --git a/docgen/layouts/common/meta.pug b/docgen/layouts/common/meta.pug
deleted file mode 100644
index 5f1a5734cb..0000000000
--- a/docgen/layouts/common/meta.pug
+++ /dev/null
@@ -1,26 +0,0 @@
-doctype html
-html
- head
- base(href=publicPath)
- meta(content='IE=edge', http-equiv='X-UA-Compatible')
- meta(charset='utf-8')
- meta(content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no', name='viewport')
- link(rel='icon', href="assets/img/react-instant-favicon.png")
- meta(content='Add instant-search and autocomplete to your React and React Native apps with a few lines of code. Powered by Algolia.', name='description')
- // / Twitter card
- meta(content='summary_large_image', name='twitter:card')
- meta(content='https://community.algolia.com/instantsearch.js/react/', name='twitter:site')
- meta(content='Algolia', name='twitter:creator')
- meta(content='React InstantSearch', name='twitter:title')
- meta(content='⚡ Lightning-fast search for React and React Native apps', name='twitter:description')
- meta(content='http://res.cloudinary.com/hilnmyskv/image/upload/v1481193392/meta-instant-search-react_hrf6st.jpg', name='twitter:image')
- // / OG meta
- meta(content='https://community.algolia.com/instantsearch.js/react/', property='og:url')
- meta(content='React InstantSearch', property='og:title')
- meta(content='http://res.cloudinary.com/hilnmyskv/image/upload/v1481193392/meta-instant-search-react_hrf6st.jpg', property='og:image')
- meta(content='website', property='og:type')
- meta(content='⚡ Lightning-fast search for React and React Native apps', property='og:description')
- meta(content='React InstantSearch', property='og:site_name')
-
- title React InstantSearch | #{title}
- link(rel='stylesheet', href="stylesheets/index.css")
diff --git a/docgen/layouts/connector.pug b/docgen/layouts/connector.pug
deleted file mode 100644
index a38417fde7..0000000000
--- a/docgen/layouts/connector.pug
+++ /dev/null
@@ -1,73 +0,0 @@
-extends archetypes/content-with-menu.pug
-
-include mixins/nav.pug
-
-block navigation
- +nav(navPath, navigation, mainTitle || title, withHeadings && headings || [])
-
-block content
- h2#description Description
- a.anchor(href=`${navPath}#description`)
- div!=h.markdown(description)
- h2#proptypes Exposed props
- a.anchor(href=`${navPath}#proptypes`)
- if proptype
- p Props exposed on the connected component:
- table.api.proptypes
- tbody
- each type in proptype
- tr.api-entry-values
- td.api-entry-name
- div.api-entry(id=`default-props-entry-${name}-${type.name}`)
- =`${type.name}${type.isRequired ? '*' : ''}`
- a.anchor(href=`${navPath}#default-props-entry-${name}-${type.name}`)
- td.api-entry-type
- span type:
- = ' '
- code=type.type
- td.api-entry-default-value
- if type.defaultValue
- span default:
- = ' '
- code=type.defaultValue
- else
- span
- tr.api-entry-description
- td(colspan=3)!=h.markdown(type.description)
- else
- p This connector does not expose external props.
- h2#provided-props Provided props
- a.anchor(href=`${navPath}#provided-props`)
- if providedproptype
- p These are the props that the wrapped Component will receive.
- table.api.proptypes
- tbody
- each type in providedproptype
- tr.api-entry-values
- td.api-entry-name
- div.api-entry(id=`default-props-entry-${name}-${type.name}`)=type.name
- a.anchor(href=`${navPath}#default-props-entry-${name}-${type.name}`)
- td.api-entry-type
- span type:
- = ' '
- code=type.type
- td.api-entry-default-value
- if type.defaultValue
- span default:
- = ' '
- code=type.defaultValue
- else
- span
- tr.api-entry-description
- td(colspan=3)!=h.markdown(type.description)
- else
- p This connector does not provided props to its wrapped component.
- if requirements
- h2#requirements Requirements
- a.anchor(href=`${navPath}#requirements`)
- div!=h.markdown(requirements)
- if examples
- h2#example Example
- a.anchor(href=`${navPath}#example`)
- each example in examples
- p!=h.highlight(example, {lang: 'jsx'})
diff --git a/docgen/layouts/example.pug b/docgen/layouts/example.pug
deleted file mode 100644
index 8ba9e71ecc..0000000000
--- a/docgen/layouts/example.pug
+++ /dev/null
@@ -1,28 +0,0 @@
-doctype html
-html
- head
- base(href=publicPath)
- meta(content='IE=edge', http-equiv='X-UA-Compatible')
- meta(charset='utf-8')
- meta(content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no', name='viewport')
- link(rel='icon', href="assets/favicon.png")
- title React InstantSearch | Examples > #{title}
- if stylesheets
- for sheet in stylesheets
- link(rel="stylesheet" href=sheet)
- link(rel="stylesheet" href=`examples/${name}/style.css`)
- link(rel='stylesheet', href="stylesheets/header.css")
- body.example
- include ./common/header.pug
- .content!=contents
- script(src=webpack.assets['js/common.js'])
- script(src=webpack.assets['js/main.js'])
- script(src=webpack.assets[`examples/${name}/index.js`])
- script(src="https://cdn.jsdelivr.net/g/docsearch.js@2")
- script.
- docsearch({
- apiKey: '5cb6763f264e31381e18639a1147634c',
- indexName: 'react-instantsearch',
- inputSelector: '#searchbox',
- debug: true
- });
diff --git a/docgen/layouts/examples.pug b/docgen/layouts/examples.pug
deleted file mode 100644
index f86d7ef53f..0000000000
--- a/docgen/layouts/examples.pug
+++ /dev/null
@@ -1,16 +0,0 @@
-extends archetypes/single-column-formatted.pug
-
-block content
- .content!=contents
-
- - var values = []
- if examples
- - values = examples
- div(class="examples-container")
- each val in values
- div.example-tile
- h2=val.title
- a(href=`${examplesEndpoint}/${val.id}`)
- figure
- img(src=`images/examples/${val.id}.png`)
- figcaption=examplesCTA
diff --git a/docgen/layouts/index.pug b/docgen/layouts/index.pug
deleted file mode 100644
index 219cd98877..0000000000
--- a/docgen/layouts/index.pug
+++ /dev/null
@@ -1,372 +0,0 @@
-extends archetypes/single-column.pug
-
-block content
- - var tweets =['816229504318406656','827061841457213441','820023150712946688','808725705978740736','830148696163631105'];
- section.is-section__intro
- div.illu-holder
- img(src='images/Mockup.png',
- srcset='images/Mockup.png, images/Mockup@2x.png 2000w',
- alt='Mockup of Algolia experience',
- class='intro-illu')
-
- section.is-section__widgets
- .container
- figure.widgets-illu
- img(src='images/reactis-logo-inline-expanded.svg')
- h2.title <InstantSearch>
- div.section__graphic
- img(src="images/components.png")
- div.section__description
- figure
- svg.desc-icon
- use(xlink:href="#pen-icon")
- h3.title Built with design in mind
- p Our search widgets feature slick design by default and benefit from our experience building thousands of search interfaces.
- a(href="Getting_started.html", class="light-link") Get started >
-
- section.is-section__code-samples
- div.section__description.text-right
- figure
- svg.desc-icon
- use(xlink:href="#bulb-icon")
- h3.title Intuitive API
- p We crunched feedback from hundreds of users of #[a(href="https://community.algolia.com/instantsearch.js/") instantsearch.js] into building React InstantSearch API.
- a(href="guide/", class="light-link") Read the guide >
- div.section__graphic.no-desktop
- img(src="images/code.png")
- div.section__graphic.no-mobile
- pre(class="al-snippet" data-snippet-theme="dark")
- code.
- const SearchBox = connectSearchBox(
- ({query, refine}) =>
- <div className="searchbox-container">
- <div className="input-group">
- <input type="text"
- value={query}
- onChange={e => refine(e.target.value)}
- className="form-control"/>
-
- <span className="input-group-btn">
- <button className="btn btn-default"><i className="fa fa-search"></i></button>
- </span>
- </div>
- </div>
- );
-
- const RefinementListLinks = connectRefinementList(({items, refine, createURL}) => {
- const itemComponents = items.map(item =>
- <div className={item.isRefined ? ' active' : ''} key={item.label}>
- <a className="item" href={createURL(item.value)} onClick={e => {
- e.preventDefault();
- refine(item.value);
- }}>
- <span> {item.label}</span>
- <span className="badge pull-right">{item.count}</span>
- </a>
- </div>
- );
-
- section.is-section__community
- .container
- div.section__graphic
- img(src="images/illu-mobile.svg", class="phone_illustration")
- img(src="images/react-laptop-12.svg", class="computer_illustration")
- ul.subtle-check-list
- li
- | react-native
- svg
- use(xlink:href='#check-icon')
- li
- | react-ui*
- svg
- use(xlink:href='#check-icon')
- li
- | react-router
- svg
- use(xlink:href='#check-icon')
-
-
- div.section__description
- figure
- svg.desc-icon
- use(xlink:href="#react-icon")
- h3.title React-community ready
- p Connectors provide a way to plug any existing code or React library to React InstantSearch and Algolia.
- a(href="guide/Connectors.html", class="light-link") Connectors guide >
-
- section.is-section__live
- h2.title See it live
- .container
- ul.live__examples.cm-large-tiles
- li.examples-item.tile
- a(href="examples/e-commerce")
- .tile-container
- figure
- img(src="images/e-commerce.svg")
- h3.item-title E-commerce
- span(class="light-link") See it live >
-
- li.examples-item.tile
- a(href="examples/e-commerce-infinite")
- .tile-container
- figure
- img(src="images/e-commerce-infinite.svg")
- h3.item-title E-commerce & Infinite Hits
- span(class="light-link") See it live >
-
- li.examples-item.tile
- a(href="examples/material-ui")
- .tile-container
- figure
- img(src="images/material.svg")
- h3.item-title Material UI
- span(class="light-link") See it live >
-
- li.examples-item.tile
- a(href="examples/media")
- .tile-container
- figure
- img(src="images/media.svg")
- h3.item-title Media
- span(class="light-link") See it live >
-
- li.examples-item.tile
- a(href="examples/tourism")
- .tile-container
- figure
- img(src="images/tourism.svg")
- h3.item-title Tourism
- span(class="light-link") See it live >
-
- li.examples-item.tile.muted
- .tile-container
- figure
- img(src="images/more-icon.svg")
- h3.item-title More to come
-
- section.is-section__twitter
- h2.title What they say
-
- div
- ul.press__tweets.press__tweets--loading.text-center
- each val in tweets
- li.press__tweet(data-tweet-id=val)
- span.press__tweet__arrow.press__tweet__arrow--prev
-
- span.press__tweet__arrow.press__tweet__arrow--next
-
-
-
- section.is-section__features
- .container
- .cm--feature-list
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-speed')
- span Unparalleled speed
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-indexing')
- span Seamless indexing
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-typo')
- span Typo tolerance
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-highlighting')
- span Smart highlighting
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-facets')
- span Instant faceting
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-sla')
- span 99.99% SLA
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-security')
- span First class hosting & security
- .list-item
- svg(viewbox='0 0 40 40')
- use(xmlns:xlink='http://www.w3.org/1999/xlink', xlink:href='#feat-icon-analytics')
- span Comprehensive analytics
- .list-item.list-item_muted
- a(href='https://algolia.com')
- svg(width='35', height='40', viewbox='0 0 35 40', xmlns='http://www.w3.org/2000/svg')
- path(d='M20.63 14.624l-2.422 8.572 7.798-4.27a8.925 8.925 0 0 0-5.376-4.302zm-19.136 8.75C1.494 32.554 8.944 40 18.138 40c9.194 0 16.645-7.445 16.645-16.627 0-9.182-7.45-16.628-16.645-16.628-9.193 0-16.644 7.446-16.644 16.628zm16.644-11.878c6.555 0 11.89 5.328 11.89 11.877 0 6.548-5.335 11.876-11.89 11.876-6.555 0-11.89-5.33-11.89-11.878 0-6.55 5.335-11.877 11.89-11.877zm5.745-6.807c.005-.067.02-.128.02-.194v-1.5A2.994 2.994 0 0 0 20.913 0h-5.23a2.993 2.993 0 0 0-2.986 2.998V4.47a19.298 19.298 0 0 1 11.185.22zM5.63 7.62a2.982 2.982 0 0 0-4.227 0l-.528.53a3.006 3.006 0 0 0 0 4.24l.562.563a19.602 19.602 0 0 1 4.494-5.03l-.3-.303z', fill='#697782', fill-rule='evenodd')
- span Learn more about Algolia
-
- section.is-section__marketing
- .container
- a(href="#", class="icon")
- svg
- use(xlink:href="#algolia-icon")
- h2 Algolia is a leading provider of Search as a Service
- h3 Join 2,000+ customers trusting us with their search
-
- ul.brands-list
- li.brand
- a(href="https://algolia.com/customers", alt="Algolia's customers")
- img(src="images/mono-white_birchbox.svg")
- li.brand
- a(href="https://algolia.com/customers", alt="Algolia's customers")
- img(src="images/mono-white_medium.svg")
- li.brand
- a(href="https://algolia.com/customers", alt="Algolia's customers")
- img(src="images/mono-white_quicksilver.svg")
- li.brand
- a(href="https://algolia.com/customers", alt="Algolia's customers")
- img(src="images/mono-white_periscope.svg")
- li.brand
- a(href="https://algolia.com/customers", alt="Algolia's customers")
- img(src="images/mono-white_jadopado.svg")
- li.brand
- a(href="https://algolia.com/customers", alt="Algolia's customers")
- img(src="images/mono-white_arcteryx.svg")
-
- section.is-section__footer
- div.footer__community
- .container
- figure
- svg.icon.icon-al
- use(xlink:href="#algolia-icon")
- svg.icon.icon-heart
- use(xlink:href="#heart-icon")
- svg.icon.icon-react
- use(xlink:href="#react-icon")
- h3 Join the community!
-
- ul
- li Share your awesome projects
- li Find useful tips & solutions
- a(href="https://discourse.algolia.com/c/instantsearch", class="btn btn-ghost btn-ghost-blue") Join us on discourse >
-
- div.footer__call-to-action
- .container
- h2 React InstantSearch
- a(href="Getting_started.html", class="btn btn-cta btn-ghost btn-black") Get started
- a(href="guide/", class="btn btn-cta btn-ghost btn-ghost-white") Guide
-
- svg(style='display: none')
- style.
- .st0{fill:none;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}
-
- defs
- symbol#check-icon(viewbox="0 0 33 26")
- path(d="M32.57872 2.63298L30.2617.31596c-.38617-.38617-1.01808-.38617-1.40425 0l-18.1851 18.20266-6.4947-6.49468c-.38616-.38617-1.01808-.38617-1.40425 0L.45638 14.34096c-.38617.38617-.38617 1.01808 0 1.40425l7.17926 7.17928 2.31702 2.31702c.38617.38616 1.01808.38616 1.40425 0l2.3346-2.29948 18.8872-18.9048c.38617-.38616.38617-1.01807 0-1.40424z" ,fill-rule="evenodd")
-
- symbol#heart-icon(viewbox="0 0 36 35")
- path(d='M18 4.02C16.552 2.25 14.057.297 10.103.297 3.373.298 0 6.63 0 12.546c0 9.777 15.135 20.15 16.99 21.436a1.77 1.77 0 0 0 2.02 0C20.864 32.695 36 22.322 36 12.546 36 6.63 32.627.298 25.896.298c-3.953 0-6.448 1.954-7.896 3.72v.002z', fill-rule='evenodd')
-
- symbol#pen-icon(viewbox='0 0 100 100')
- path.st0(d='M20.9 61.6l30.8-30.7L72 51.2 41.3 82m34.2-34.3L72 51.2 51.7 30.9l3.5-3.5')
- path.st0(d='M55.2 27.4l3.5-3.5L79 44.2l-3.5 3.5')
- path.st0(d='M79 44.2L58.7 23.9l2.3-2.3c4.8-4.8 12.6-4.8 17.4 0l3 3c4.8 4.8 4.8 12.6 0 17.4L79 44.2zM41.3 82H20.9V61.6m10.2 10.2L61.9 41')
- path.st0(d='M21 75.7c1.1-1.1 3.3-.5 5 1.2s2.3 4 1.2 5m3.8-10l-3.2-7-6.9-3.2M41.2 82L38 75.1l-7-3.2')
-
- symbol#bulb-icon(viewbox='0 0 100 100')
- path.st0(d='M69.9 49.9c0-11.3-9.5-20.4-20.9-19.8-10.3.6-18.6 9.2-18.7 19.5-.1 4.7 1.5 8.9 4.1 12.3 2.5 3.2 3.9 7 3.9 11.1v1.2h23.6v-1c0-4.2 1.5-8.1 4-11.4 2.5-3.3 4-7.5 4-11.9zm-11.1 35H41.4c-1.7 0-3.1-1.4-3.1-3.1v-7.6h23.6v7.6c0 1.7-1.4 3.1-3.1 3.1z')
- path.st0(d='M52 92.1h-3.7c-4 0-7.3-3.3-7.3-7.3h18.3c-.1 4.1-3.3 7.3-7.3 7.3zm-8.5-17.9V55.6m13.2 18.6V55.6M43.5 52h13.2m-13.2 3.6h13.2m-6.6-33V7.9M30.6 30.6L20.2 20.2M22.5 50H7.8m22.7 19.5L20.1 79.9m49.3-10.3l10.4 10.5m-2.3-29.9h14.7M69.5 30.7l10.4-10.4')
-
- symbol#react-icon(viewBox='0 0 93 83')
- g(transform='translate(1 1)', stroke-width='2', fill='none', fill-rule='evenodd')
- ellipse(cx='45.5', cy='30', rx='4.5', ry='4.52612')
- path(d='M45.5049 23.03117c11.3718 0 21.9359 1.64123 29.90118 4.3993 9.59704 3.32304 15.4977 8.36032 15.4977 12.92145 0 4.7532-6.2537 10.1043-16.55948 13.53872-7.79173 2.5966-18.0445 3.95185-28.8394 3.95185-11.06756 0-21.54793-1.27225-29.4256-3.98057C6.1105 50.4348.10604 45.01426.10604 40.35193c0-4.5241 5.6339-9.52235 15.09603-12.84046 7.995-2.8034 18.81995-4.4803 30.30284-4.4803z')
- path(d='M30.51387 31.74147c5.681-9.90815 12.37212-18.29275 18.72675-23.8551 7.6565-6.70177 14.94274-9.32654 18.8711-7.048 4.09383 2.37446 5.57853 10.4967 3.38794 21.19176-1.65623 8.08608-5.61093 17.69638-11.00374 27.10206-5.52905 9.64322-11.8604 18.13905-18.12858 23.64994-7.93186 6.9738-15.6 9.49738-19.61565 7.16825-3.89648-2.2602-5.38675-9.66584-3.51745-19.56788 1.57942-8.3666 5.54306-18.63595 11.2796-28.64106z')
- path(d='M30.52822 49.15732c-5.69738-9.89864-9.57796-19.91666-11.19553-28.23198-1.949-10.0187-.571-17.6789 3.35364-19.96404 4.08977-2.38143 11.82747.38106 19.9457 7.63132 6.13804 5.4815 12.44085 13.72704 17.84935 23.12372 5.5451 9.6339 9.7012 19.39398 11.31776 27.60826 2.04573 10.39466.38983 18.3369-3.62194 20.67283-3.89274 2.26665-11.01606-.13313-18.61178-6.70737-6.41777-5.5547-13.28397-14.1373-19.03723-24.13274z')
-
- symbol#logo-algolia(viewbox='0 0 91 29')
- path(d='M54.778 11.404l-1.194 4.068 3.845-2.026c-.56-.985-1.512-1.73-2.652-2.042zm-7.33-3.334c-.592-.546-1.555-.546-2.15 0l-.267.247c-.593.546-.593 1.43 0 1.977l.286.263c.62-.908 1.392-1.702 2.286-2.346l-.153-.14zm8.74-1.274c0-.03.01-.06.01-.093v-.737c0-.813-.66-1.473-1.472-1.473H52.15c-.81 0-1.47.66-1.47 1.473v.724c1.807-.508 3.723-.47 5.507.107z')
- path(d='M53.584 9.964c3.2 0 5.805 2.584 5.805 5.76 0 3.176-2.605 5.76-5.806 5.76-3.2 0-5.805-2.584-5.805-5.76 0-3.176 2.603-5.76 5.804-5.76zm-8.128 5.76c0 4.453 3.64 8.064 8.128 8.064 4.49 0 8.128-3.61 8.128-8.063 0-4.453-3.64-8.065-8.128-8.065-4.49 0-8.128 3.612-8.128 8.064zM16.484 23.5c-.337-.886-.65-1.756-.948-2.612-.302-.872-.608-1.742-.918-2.61H5.32l-1.865 5.22H.465c.73-2.004 1.47-4.005 2.22-6.003.658-1.752 1.334-3.498 2.03-5.236.66-1.655 1.317-3.233 1.968-4.738.65-1.504 1.332-2.994 2.043-4.47h2.636c.71 1.476 1.39 2.966 2.043 4.47.678 1.57 1.334 3.15 1.968 4.736.695 1.74 1.37 3.484 2.03 5.237.69 1.84 1.43 3.84 2.22 6.004h-3.14zm-2.695-7.583c-.615-1.662-1.242-3.32-1.882-4.972-.62-1.603-1.268-3.142-1.94-4.618C9.26 7.844 8.605 9.384 8 10.945c-.64 1.65-1.256 3.306-1.85 4.972h7.64zM26.503 23.5c-1.654-.04-2.828-.4-3.52-1.085-.694-.684-1.04-1.748-1.04-3.196V.93l2.683-.47v18.32c0 .45.04.82.116 1.113.077.293.202.527.375.704.173.175.404.307.693.395.29.088.646.162 1.07.22l-.376 2.286zm13.047-1.852c-.232.156-.684.355-1.354.598-.67.244-1.454.366-2.348.366-.913 0-1.773-.147-2.58-.438-.8-.288-1.522-.752-2.113-1.36-.603-.61-1.08-1.376-1.43-2.29-.35-.915-.524-2.005-.524-3.27 0-1.11.166-2.128.497-3.053.33-.923.81-1.722 1.443-2.394.63-.672 1.403-1.197 2.317-1.577.915-.38 1.945-.57 3.092-.57 1.262 0 2.365.093 3.308.278.942.186 1.734.355 2.375.51V22c0 2.337-.602 4.03-1.807 5.08-1.206 1.052-3.032 1.577-5.482 1.577-.904.005-1.806-.073-2.696-.232-.845-.157-1.58-.34-2.2-.555l.495-2.365c.544.213 1.21.404 1.996.57.81.167 1.635.25 2.463.248 1.613 0 2.774-.32 3.484-.963.71-.642 1.064-1.665 1.064-3.066v-.642zm-1.12-11.49c-.46-.07-1.076-.103-1.853-.103-1.458 0-2.58.477-3.368 1.43-.788.955-1.18 2.22-1.18 3.797 0 .875.11 1.625.334 2.25.224.62.525 1.137.904 1.546.362.397.81.706 1.312.905.496.195 1.007.292 1.53.292.72 0 1.38-.102 1.983-.306.602-.206 1.08-.444 1.43-.717v-8.876c-.273-.078-.637-.15-1.093-.22zm30.454 13.34c-1.655-.038-2.83-.398-3.52-1.083-.694-.684-1.04-1.75-1.04-3.196V.93l2.684-.47v18.32c0 .45.04.82.116 1.114.077.293.2.528.375.704.17.175.4.308.69.396.29.087.645.16 1.07.22l-.376 2.286zm5.02-18.305c-.485 0-.897-.162-1.235-.484-.34-.324-.508-.76-.508-1.307 0-.548.17-.984.507-1.306.337-.323.75-.485 1.232-.485.484 0 .895.16 1.234.485.338.323.508.758.508 1.305 0 .547-.17.982-.508 1.306-.34.323-.75.484-1.234.484zM72.567 7.95h2.7v15.262h-2.7V7.95zm12.294-.29c1.097 0 2.022.144 2.777.43.752.287 1.36.692 1.82 1.215.46.524.79 1.147.985 1.87.195.72.294 1.516.294 2.386v9.636l-.985.162c-.474.076-.95.14-1.426.193-.53.06-1.103.115-1.72.164-.617.05-1.23.074-1.836.074-.862 0-1.655-.09-2.38-.267-.725-.177-1.352-.458-1.88-.844-.53-.385-.94-.894-1.235-1.526-.295-.633-.442-1.394-.442-2.283 0-.85.17-1.58.515-2.194.332-.602.812-1.112 1.395-1.482.588-.374 1.274-.65 2.057-.83.81-.18 1.638-.27 2.47-.266.273 0 .557.015.85.044.295.03.574.07.84.12.264.048.494.093.69.133.195.04.333.07.41.088v-.77c0-.454-.05-.904-.146-1.35-.092-.426-.272-.83-.53-1.184-.254-.345-.602-.622-1.043-.83-.44-.208-1.014-.312-1.72-.312-.9 0-1.688.065-2.365.194-.675.128-1.18.262-1.512.4l-.323-2.283c.353-.158.94-.312 1.763-.46.823-.148 1.715-.222 2.674-.222h-.002zm.235 13.815c.573.002 1.147-.013 1.72-.045.498-.03.915-.083 1.248-.163v-4.595c-.197-.098-.515-.182-.955-.25-.442-.07-.975-.105-1.602-.105-.41 0-.847.03-1.307.09-.46.058-.882.182-1.263.37-.374.18-.7.444-.955.77-.254.326-.382.756-.382 1.29 0 .988.313 1.674.94 2.06.627.386 1.48.58 2.557.58v-.002z')
-
- symbol#algolia-icon
- svg(viewbox='0 0 95 95', xmlns='http://www.w3.org/2000/svg')
- path(d='M0 12.37C0 5.54 5.532 0 12.367 0h69.31c6.831 0 12.368 5.533 12.368 12.37v69.331c0 6.832-5.532 12.371-12.367 12.371h-69.31C5.536 94.072 0 88.539 0 81.702V12.37zm48.125 11.405c-14.671 0-26.58 11.898-26.58 26.588 0 14.69 11.895 26.588 26.58 26.588 14.685 0 26.58-11.912 26.58-26.602S62.81 23.775 48.125 23.775zm0 45.307c-10.343 0-18.727-8.386-18.727-18.733 0-10.346 8.384-18.732 18.727-18.732 10.344 0 18.727 8.386 18.727 18.732 0 10.347-8.383 18.733-18.727 18.733zm0-33.6v13.955c0 .408.436.68.803.49L61.3 43.501a.548.548 0 0 0 .217-.762c-2.572-4.506-7.335-7.596-12.834-7.8a.549.549 0 0 0-.558.544zM30.76 25.246l-1.62-1.62a4.082 4.082 0 0 0-5.77 0l-1.933 1.933a4.085 4.085 0 0 0 0 5.773l1.606 1.606c.245.245.64.204.844-.068a30.572 30.572 0 0 1 3.116-3.662 29.723 29.723 0 0 1 3.689-3.131c.272-.19.3-.6.068-.83zm26.063-4.234v-3.226a4.078 4.078 0 0 0-4.083-4.084h-9.5a4.078 4.078 0 0 0-4.083 4.084v3.308c0 .368.354.626.708.531a29.562 29.562 0 0 1 8.275-1.157c2.722 0 5.403.367 7.989 1.075a.55.55 0 0 0 .694-.53z', fill-rule='evenodd')
-
- symbol#icon-dev-friendly
- svg(width='48', height='31', viewbox='0 0 48 31', xmlns='http://www.w3.org/2000/svg')
- title Shape
- path(d='M43.436 0H5.016C4.18 0 0 .406 0 4.755v21.73c0 4.35 4.56 4.337 5.39 4.337h36.92c.83 0 5.518.014 5.518-4.906V5.128C47.828.406 44.268 0 43.436 0zM19.298 15.61L6.456 21.504c-.662.312-1.447.015-1.75-.648-.078-.183-.116-.366-.116-.548 0-.504.282-.984.77-1.204l10.267-4.716-10.26-4.776c-.662-.304-.952-1.096-.64-1.76.22-.478.7-.76 1.196-.76.183 0 .373.038.556.12l12.81 5.994c.275.123.48.61.61.61h.008c.015 0 .03.038.038.07.305.653.015 1.416-.648 1.72zm20.91 10.266c-.04.054-.085.108-.14.145-.007.017-.02.032-.044.047-.016.015-.03.022-.047.038-.053.046-.113.09-.182.13-.25.144-.55.227-.87.227l-16.634.04c-.86 0-1.552-.595-1.56-1.327 0-.365.175-.693.457-.937.282-.236.663-.38 1.097-.388l16.635-.038c.852 0 1.553.594 1.553 1.325 0 .275-.098.527-.266.74z', fill='#41C8A0', fill-rule='evenodd')
-
- symbol#feat-icon-analytics
- svg(width='41', height='28', viewbox='0 0 41 28', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', fill='#F3F4F7', fill-rule='evenodd')
- path(d='M12.092 5.48l7.588-4.315c.637-.362 1.674-.363 2.315 0l8.146 4.314v11.518l-8.146 4.206c-.64.353-1.682.351-2.325-.005l-7.569-4.196c-.646-.358-.647-11.16-.01-11.523z', stroke-width='1.28')
- path(d='M22.567.977C21.61.436 20.058.44 19.088.99l-6.404 3.642c-.965.548-.97 1.423 0 1.961l6.404 3.55c.965.535 2.527.538 3.502 0l6.435-3.55c.969-.535.974-1.41.022-1.949L22.567.977z', stroke-width='1.28')
- path(d='M1.012 22.623l7.57 4.196c.642.357 1.684.359 2.324.006l7.993-4.612V6.41l-7.993-4.734c-.64-.363-1.678-.362-2.315 0L.584 6.41l.428 16.213z', stroke-width='1.28')
- path(d='M11.478 1.7c-.957-.54-2.509-.538-3.479.014L1.595 5.355c-.965.549-.97 1.424 0 1.962l6.404 3.55c.965.535 2.527.538 3.502 0l6.435-3.55c.969-.535.974-1.41.022-1.95l-6.48-3.666zm11.188 21.43l7.953 4.2c.643.357 1.685.359 2.324.006l7.906-4.513v-5.701l-7.906-4.714c-.64-.363-1.678-.362-2.315 0l-7.962 5.073v5.648z', stroke-width='1.28')
- path(d='M34.015 13.014c-1.233-.698-3.235-.692-4.453 0l-5.456 3.102c-1.226.697-1.217 1.819.025 2.508l5.406 2.996c1.24.688 3.254.69 4.49.007l5.457-3.01c1.24-.684 1.254-1.799.012-2.501l-5.481-3.102z', stroke-width='1.28')
- path(d='M9.65 12.013v13.836m10.948-14.361v9.25m11.47 2.354v3.268', stroke-linecap='square')
-
- symbol#feat-icon-code
- svg(width='37', height='22', viewbox='0 0 37 22', xmlns='http://www.w3.org/2000/svg')
- path(d='M9.932 4.648l.905 1.4-7.208 4.346 7.208 4.368-.986 1.358L2 11.287V9.481l7.932-4.833zm25.65 5.715v1.81l-7.85 4.83-.987-1.358 7.208-4.368-7.208-4.343.906-1.404 7.931 4.833zm-20.656 10.17l-1.437-.67L21.792 2l1.418.707-8.284 17.826z', stroke='#788895', stroke-width='1.3', fill='#F3F4F7', fill-rule='evenodd', stroke-linejoin='round')
-
- symbol#feat-icon-facets
- svg(width='32', height='34', viewbox='0 0 32 34', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', fill='#F3F4F7', fill-rule='evenodd')
- path(d='M31.216 21.854l-5.679 7.771-9.187 2.968-9.188-2.968-5.679-7.77v-9.606l5.679-7.772L16.35 1.51l9.187 2.968 5.68 7.772v9.605z', stroke-width='1.5')
- path(d='M10.191 25.327L6.574 14.1l9.47-6.94 9.47 6.94-3.617 11.227H10.191zM25.893 14.023l5.323-1.683-5.679-7.837-9.187-2.994V7.07', stroke-width='1.024')
- path(d='M22.052 25.167l3.361 4.6 5.803-7.853v-9.707l-5.44 1.687-3.724 11.273z', stroke-width='1.024')
- path(d='M22.233 25.327l3.281 4.398-9.164 2.868-9.165-2.868 3.281-4.398h11.767z', stroke-width='1.024')
- path(d='M6.923 13.894l-5.44-1.687v9.707l5.803 7.853 3.361-4.6-3.724-11.273z', stroke-width='1.024')
-
- symbol#feat-icon-geosearch
- svg(width='22', height='36', viewbox='0 0 22 36', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', fill='none', fill-rule='evenodd')
- path(d='M20.446 10.996c0 5.136-9.39 23.248-9.39 23.248s-9.39-18.112-9.39-23.248c0-5.135 4.204-9.299 9.39-9.299 5.186 0 9.39 4.164 9.39 9.3z', stroke-width='1.5', fill='#F3F4F7')
- path(d='M11.056 15.099a4.022 4.022 0 0 1-4.024-4.02c0-2.22 1.801-4.021 4.024-4.021s4.024 1.8 4.024 4.02a4.02 4.02 0 0 1-4.024 4.02z', stroke-width='1.024', fill='#FFF')
-
- symbol#feat-icon-highlighting
- svg(width='29', height='26', viewbox='0 0 29 26', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', stroke-width='1.5', fill='#F3F4F7', fill-rule='evenodd')
- path(d='M5.824 11.934L23.12 1.115l4.718 4.637L16.83 22.754 5.824 11.934z', stroke-linecap='round', stroke-linejoin='bevel')
- path(d='M16.231 22.446c-2.88-.013-5.497-.037-8.215.997l-3.289-3.34C5.745 17.34 6.074 15.526 6.06 12.6l10.171 9.845z', stroke-linejoin='bevel')
- path(d='M5.194 21.384L2 24.68h3.792l1.475-1.37-2.073-1.925z')
-
- symbol#feat-icon-indexing
- svg(width='29', height='28', viewbox='0 0 29 28', xmlns='http://www.w3.org/2000/svg')
- g(transform='translate(1 1)', stroke='#788895', fill='#F3F4F7', fill-rule='evenodd')
- path(d='M26.923 17.382c0-2.335-6.027-4.229-13.462-4.229C6.027 13.153 0 15.047 0 17.383v4.228c0 2.335 6.027 4.229 13.461 4.229 7.435 0 13.462-1.894 13.462-4.23v-4.228z', stroke-width='1.6')
- ellipse(stroke-width='1.6', cx='13.461', cy='17.26', rx='13.099', ry='4.115')
- path(d='M26.923 17.382c0-2.335-6.027-4.229-13.462-4.229C6.027 13.153 0 15.047 0 17.383v4.228c0 2.335 6.027 4.229 13.461 4.229 7.435 0 13.462-1.894 13.462-4.23v-4.228z', stroke-width='1.6')
- ellipse(stroke-width='.8', cx='13.461', cy='17.378', rx='13.335', ry='4.189')
- path(d='M26.923 10.94c0-2.336-6.027-4.23-13.462-4.23C6.027 6.71 0 8.605 0 10.94v4.228c0 2.336 6.027 4.23 13.461 4.23 7.435 0 13.462-1.894 13.462-4.23V10.94z', stroke-width='1.6')
- ellipse(stroke-width='.8', cx='13.461', cy='10.936', rx='13.335', ry='4.189')
- path(d='M26.923 4.229C26.923 1.893 20.896 0 13.461 0 6.027 0 0 1.893 0 4.229v4.229c0 2.335 6.027 4.228 13.461 4.228 7.435 0 13.462-1.893 13.462-4.228v-4.23z', stroke-width='1.6')
- ellipse(stroke-width='.8', cx='13.461', cy='4.225', rx='13.335', ry='4.189')
-
- symbol#feat-icon-ranking
- svg(width='35', height='37', viewbox='0 0 35 37', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', fill='#F3F4F7', fill-rule='evenodd')
- path(stroke-width='2', d='M15.675 19.835h3.662v7.4h-3.662z')
- path(d='M28.234 2.454c.029-.678.041-1.266.041-1.727H6.963c0 .46.012 1.049.04 1.729l-.184-.004c-3.09-.054-5.642 2.626-5.7 5.985-.06 3.36 2.398 6.127 5.487 6.18l2.616.046c1.792 3.682 4.085 6.761 8.285 6.761 4.202 0 7.163-2.983 8.737-6.766l2.328-.04c3.09-.055 5.546-2.822 5.488-6.181-.06-3.36-2.611-6.04-5.7-5.985l-.126.002zM28.1 4.738c-.185 2.414-.532 5.276-1.12 7.625l1.648-.028c1.933-.034 3.471-1.764 3.435-3.863-.037-2.1-1.634-3.775-3.568-3.74l-.395.006zM7.145 4.74c.196 2.423.57 5.296 1.23 7.627l-1.824-.032c-1.933-.034-3.471-1.763-3.435-3.863.037-2.1 1.634-3.774 3.568-3.74l.461.008zM25.023 27.91h1.286l2.688 2.19h.07v5.637H6.174v-5.636h.071l2.688-2.19h1.265c.765-.904 2.767-1.627 4.432-2.211l1.434-1.621s.387.433 1.556.433c1.168 0 1.644-.433 1.644-.433l1.29 1.62c1.656.469 3.682 1.297 4.47 2.211z', stroke-width='1.4', stroke-linejoin='round')
- path(stroke-width='.5', stroke-linecap='square', d='M7.205 30.474h21.831')
- path(stroke-width='.8', d='M18.1 12.093l-3.406 1.57.65-3.324-2.755-2.355 3.807-.484L18.1 4.475 19.802 7.5l3.807.484-2.755 2.355.65 3.324z')
- path(d='M10.77 28.332s.703.754 6.71.754 7.321-.754 7.321-.754M6.498 30.624H28.47', stroke-linecap='square')
-
- symbol#feat-icon-security
- svg(width='31', height='36', viewbox='0 0 31 36', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', fill='#F3F4F7', fill-rule='evenodd')
- path(d='M26.733 14.524H4.327L2.294 16.19v16.258l2.033 1.811h22.406l1.875-1.811V16.19l-1.875-1.666z', stroke-width='1.5')
- path(d='M16.45 26.4a2.386 2.386 0 0 0 1.675-2.292c0-1.32-1.05-2.391-2.345-2.391-1.296 0-2.346 1.07-2.346 2.39 0 1.113.746 2.048 1.755 2.315v3.89h1.26V26.4z', stroke-linejoin='round')
- path(d='M26.733 14.524H4.327L2.294 16.19l2.033 1.623h22.406l1.875-1.623-1.875-1.666z', stroke-linecap='square', stroke-linejoin='bevel')
- path(d='M5.583 15.758v-4.586C5.583 5.394 10.295.71 16.109.71c5.813 0 10.525 4.685 10.525 10.463v4.586c0 .973-3.947.833-3.947 0v-4.763c0-3.617-2.945-6.55-6.578-6.55-3.634 0-6.579 2.933-6.579 6.55v4.763c0 .973-3.947.973-3.947 0z')
-
- symbol#feat-icon-sla
- svg(width='25', height='26', viewbox='0 0 25 26', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', stroke-width='1.597', fill='none', fill-rule='evenodd', stroke-linecap='round')
- path(d='M7.07 12.402l4.047 4.093 7.226-7.309', stroke-linejoin='round')
- path(d='M24.124 12.695c0 6.458-5.177 11.694-11.562 11.694C6.176 24.39 1 19.153 1 12.695 1 6.235 6.176 1 12.562 1c6.385 0 11.562 5.236 11.562 11.695z')
-
- symbol#feat-icon-speed
- svg(width='22', height='39', viewbox='0 0 22 39', xmlns='http://www.w3.org/2000/svg')
- path(d='M18.663 2l-6.39 14.658 7.976-1.086L2.217 37l7.071-15.745-7.69 1.092L18.664 2z', stroke='#788895', stroke-width='1.5', fill='none', fill-rule='evenodd', stroke-linejoin='round')
-
- symbol#feat-icon-typo
- svg(width='24', height='31', viewbox='0 0 24 31', xmlns='http://www.w3.org/2000/svg')
- g(stroke='#788895', fill='none', fill-rule='evenodd')
- path(d='M15.853 19.636h-7.36v-.756a12.351 12.351 0 0 1 2.435-.626V2.73H6.922L5.533 6.462h-.655a17.017 17.017 0 0 1-.131-1.187 77.995 77.995 0 0 1-.157-2.713c-.018-.444-.026-.84-.026-1.187h15.218c0 .348-.009.74-.026 1.174-.018.435-.04.882-.066 1.343l-.078 1.357c-.027.443-.066.848-.118 1.213h-.681l-1.362-3.73h-4.008v15.522c.454.087.878.173 1.27.26.393.087.773.21 1.14.366v.756z', stroke-width='1.3')
- path(d='M1.395 30s1.072-3.222 3.437-3.222c2.365 0 2.365 3.222 4.73 3.222 2.366 0 2.366-3.222 4.731-3.222 2.365 0 2.365 3.222 4.73 3.222 2.366 0 3.76-3.222 3.76-3.222', stroke-width='1.5', stroke-linecap='square')
diff --git a/docgen/layouts/main.pug b/docgen/layouts/main.pug
deleted file mode 100644
index 30177a6de2..0000000000
--- a/docgen/layouts/main.pug
+++ /dev/null
@@ -1,8 +0,0 @@
-extends archetypes/content-with-menu.pug
-include mixins/nav.pug
-
-block navigation
- +nav(navPath, navigation, mainTitle || title, withHeadings && headings || [], navScroll)
-
-block content
- .content!=contents
diff --git a/docgen/layouts/mixins/nav-main.pug b/docgen/layouts/mixins/nav-main.pug
deleted file mode 100644
index 8d16ace17d..0000000000
--- a/docgen/layouts/mixins/nav-main.pug
+++ /dev/null
@@ -1,16 +0,0 @@
-mixin nav(currentPath, navItems, title, headings)
- ul.category-content
- if navItems
- +navRec(currentPath, navItems, title, 2)
-
-mixin navRec(currentPath, navItems, title, depth)
- for navItem in navItems
- - var isCurrentFile = navItem.path === currentPath;
- - var className = ['sidebar-element', ('level-h' + depth), (isCurrentFile ? 'navItem-active' : 'navItem')];
- - var activeClass = isCurrentFile ? 'navItem-active' : '';
- li(class=className)
- a(href=navItem.path class=activeClass)=navItem.title
- if navItem.metadata.source
- span
- | -
- a(href=navItem.metadata.source) source code
diff --git a/docgen/layouts/mixins/nav.pug b/docgen/layouts/mixins/nav.pug
deleted file mode 100644
index f0ad4c13c3..0000000000
--- a/docgen/layouts/mixins/nav.pug
+++ /dev/null
@@ -1,33 +0,0 @@
-mixin nav(currentPath, navItems, title, headings, navScroll=false)
- div(class={"sidebar-container": true, "sidebar-navScroll": navScroll})
- h2.sidebar-header=title
- ul.sidebar-elements
- if navItems
- if navItems.length === 1
- +navContent(headings, 0, currentPath)
- else
- +navRec(currentPath, navItems, title, 2, headings)
-
-mixin navRec(currentPath, navItems, title, depth, headings)
- for navItem in navItems
- - if(navItem.metadata.showInNav !== false)
- - var isCurrentFile = navItem.path === currentPath;
- - var className = ['sidebar-element', ('level-h' + depth), (isCurrentFile ? 'navItem-active' : 'navItem'), currentPath.split('/')[0]];
- - var activeClass = isCurrentFile ? 'navItem-active' : '';
- li(class=className)
- if navItem.title === 'InstantSearch'
- a(href=navItem.path class=activeClass)=''
- else
- a(href=navItem.path class=activeClass)=navItem.title
- ul
- if(isCurrentFile)
- +navContent(headings, depth, currentPath)
-
-mixin navContent(headings, currentDepth, currentPath)
- if headings && headings.length > 1
- each item in headings
- - var level = parseFloat(/h([0-9]+)/.exec(item.tag)[1]);
- - var actualLevel = level + currentDepth - 1;
- - var className = ['sidebar-element', 'level-h' + actualLevel]
- li(class=className)
- a(href=`${currentPath}#${item.id}`)= item.text
diff --git a/docgen/layouts/widget.pug b/docgen/layouts/widget.pug
deleted file mode 100644
index 95f932b94b..0000000000
--- a/docgen/layouts/widget.pug
+++ /dev/null
@@ -1,82 +0,0 @@
-extends archetypes/content-with-menu.pug
-
-include mixins/nav.pug
-
-block navigation
- +nav(navPath, navigation, mainTitle || title, withHeadings && headings || [])
-
-block content
- h2#description Description
- a.anchor(href=`${navPath}#description`)
- div!=h.markdown(description)
- div.storybook-section
- a.btn.btn-cta(href=`${storyBookPublicPath}?selectedKind=${name}&selectedStory=default` target='_blank') See live example
- h2#proptypes Props
- a.anchor(href=`${navPath}#proptypes`)
- if proptype
- table.api.proptypes
- tbody
- each type in proptype
- tr.api-entry-values
- td.api-entry-name
- div.api-entry(id=`default-props-entry-${name}-${type.name}`)
- =`${type.name}${type.isRequired ? '*' : ''}`
- a.anchor(href=`${navPath}#default-props-entry-${name}-${type.name}`)
- td.api-entry-type
- span type:
- = ' '
- code=type.type
- td.api-entry-default-value
- if type.defaultValue
- span default:
- = ' '
- code=type.defaultValue
- else
- span
- tr.api-entry-description
- td(colspan=3)!=h.markdown(type.description)
- else
- p This widget has no props.
- if requirements
- h2#requirements Requirements
- a.anchor(href=`${navPath}#requirements`)
- div!=h.markdown(requirements)
- if operations
- h2#operations Operations
- a.anchor(href=`${navPath}#operations`)
- div!=h.markdown(operations)
- h2#example Example usage
- a.anchor(href=`${navPath}#example`)
- if examples
- each example in examples
- p!=h.highlight(example, {lang: 'jsx'})
- h2#classnames CSS classes
- a.anchor(href=`${navPath}#classnames`)
- if themekey
- table.api
- tbody
- each type in themekey
- tr.api-entry-values
- td.api-entry-name
- - var themeId = `default-theme-entry-${name}-${type.key}`;
- div.api-entry(id=themeId)=`.${type.key} {}`
- a.anchor(href=`${navPath}#${themeId}`)
- tr.api-entry-description
- td(colspan=3)!=h.markdown(type.description)
- else
- p This widget has no theming options.
- h2#translations Translation keys
- a.anchor(href=`${navPath}#translations`)
- if translationkey
- table.api
- tbody
- each type in translationkey
- tr.api-entry-values
- td.api-entry-name
- - var themeId = `default-theme-entry-${name}-${type.key}`;
- div.api-entry(id=themeId)=type.key
- a.anchor(href=`${navPath}#${themeId}`)
- tr.api-entry-description
- td(colspan=3)!=h.markdown(type.description)
- else
- p This widget has no translations.
diff --git a/docgen/mdRenderer.js b/docgen/mdRenderer.js
deleted file mode 100644
index d1b27e4462..0000000000
--- a/docgen/mdRenderer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import MarkdownIt from 'markdown-it';
-import markdownItAnchor from 'markdown-it-anchor';
-
-import highlight from './syntaxHighlighting.js';
-
-const md =
- new MarkdownIt('default', {
- highlight: (str, lang) => highlight(str, lang),
- linkify: true,
- typographer: true,
- html: true,
- })
- .use(markdownItAnchor, {
- permalink: true,
- permalinkClass: 'anchor',
- permalinkSymbol: '',
- // generate proper Getting_started.html#install hrefs since we are
- // using the base href trick to handle different base urls (dev, prod)
- permalinkHref: (slug, {env: {path}}) => `${path}#${slug}`,
- });
-
-export default md;
diff --git a/docgen/middlewares.js b/docgen/middlewares.js
deleted file mode 100644
index 0bc5fba55b..0000000000
--- a/docgen/middlewares.js
+++ /dev/null
@@ -1,124 +0,0 @@
-import headings from 'metalsmith-headings';
-import layouts from 'metalsmith-layouts';
-import msWebpack from 'ms-webpack';
-import navigation from 'metalsmith-navigation';
-import nav from './plugins/navigation.js';
-import sass from 'metalsmith-sass';
-
-import assets from './plugins/assets.js';
-import helpers from './plugins/helpers.js';
-import ignore from './plugins/ignore.js';
-import jsdoc from './plugins/jsdoc-data.js';
-import markdown from './plugins/markdown.js';
-import onlyChanged from './plugins/onlyChanged.js';
-import webpackEntryMetadata from './plugins/webpackEntryMetadata.js';
-import autoprefixer from './plugins/autoprefixer.js';
-import sources from './plugins/sources.js';
-
-// performance and debug info for metalsmith, when needed see usage below
-// import {start as perfStart, stop as perfStop} from './plugins/perf.js';
-
-import webpackStartConfig from './webpack.config.start.babel.js';
-import webpackBuildConfig from './webpack.config.build.babel';
-
-import {reactPackage} from './path.js';
-
-const common = [
- helpers,
- assets({
- source: './assets/',
- destination: './assets/',
- }),
- assets({
- source: './rootFiles',
- destination: './',
- }),
- sources([
- reactPackage('src/widgets/*.js'),
- reactPackage('src/connectors/*.js'),
- reactPackage('src/core/InstantSearch.js'),
- ], {
- ignore: '**/*.test.js',
- computeFilename: filename => `${filename}.jsdoc`, // denotes jsdoc file but also avoid js ignore
- }),
- ignore(fileName => {
- // This is a fix for VIM swp files inside src/,
- // We could also configure VIM to store swp files somewhere else
- // http://stackoverflow.com/questions/1636297/how-to-change-the-folder-path-for-swp-files-in-vim
- if (/\.swp$/.test(fileName)) return true;
-
- // if it's a build js file, keep it (`build`)
- if (/-build\.js$/.test(fileName)) return false;
-
- // if it's any other JavaScript file, ignore it, it's handled by build files above
- if (/\.js$/.test(fileName)) return true;
-
- // ignore scss partials, only include scss entrypoints
- if (/_.*\.s[ac]ss/.test(fileName)) return true;
-
- // otherwise, keep file
- return false;
- }),
- markdown,
- jsdoc(),
- headings('h2'),
- nav(),
- // After markdown, so that paths point to the correct HTML file
- navigation({
- core: {
- sortBy: 'nav_sort',
- filterProperty: 'nav_groups',
- },
- widget: {
- sortBy: 'nav_sort',
- filterProperty: 'nav_groups',
- },
- connector: {
- sortBy: 'nav_sort',
- filterProperty: 'nav_groups',
- },
- examples: {
- sortBy: 'nav_sort',
- filterProperty: 'nav_groups',
- },
- gettingstarted: {
- sortBy: 'nav_sort',
- filterProperty: 'nav_groups',
- },
- }, {
- navListProperty: 'navs',
- }),
- // perfStart(),
- sass({
- sourceMap: true,
- sourceMapContents: true,
- outputStyle: 'nested',
- }),
- // since we use @import, autoprefixer is used after sass
- autoprefixer,
- // perfStop(),
-];
-
-// development mode
-export const start = [
- webpackEntryMetadata(webpackStartConfig),
- ...common,
- onlyChanged,
- layouts('pug'),
-];
-
-export const build = [
- msWebpack({
- ...webpackBuildConfig,
- stats: {
- chunks: false,
- modules: false,
- chunkModules: false,
- reasons: false,
- cached: false,
- cachedAssets: false,
- },
- }),
- ...common,
- layouts('pug'),
-];
diff --git a/docgen/path.js b/docgen/path.js
deleted file mode 100644
index 3ced6c5fa9..0000000000
--- a/docgen/path.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import {join} from 'path';
-
-export const rootPath = (...args) => join(__dirname, '..', ...args);
-export const reactPackage = (...args) => rootPath('packages/react-instantsearch/', ...args);
diff --git a/docgen/plugins/assets.js b/docgen/plugins/assets.js
deleted file mode 100644
index c123ae12b4..0000000000
--- a/docgen/plugins/assets.js
+++ /dev/null
@@ -1,79 +0,0 @@
-// extracted from https://github.com/treygriffith/metalsmith-assets
-// converted to es6 (http://lebab.io/try-it)
-// tweaked to add `stats` to the file object
-
-import fs from 'fs';
-import path from 'path';
-import readdir from 'recursive-readdir';
-import mode from 'stat-mode';
-import {each} from 'async';
-
-/**
- * Expose `assets`.
- */
-
-export default assets;
-
-/**
- * Default plugin options
- */
-const defaults = {
- source: './public',
- destination: '.',
-};
-
-/**
- * Metalsmith plugin to include static assets.
- *
- * @param {Object} userOptions (optional)
- * @property {String} source Path to copy static assets from (relative to working directory). Defaults to './public'
- * @property {String} destination Path to copy static assets to (relative to destination directory). Defaults to '.'
- * @return {Function} a Metalsmith plugin
- */
-function assets(userOptions = {}) {
- const options = {
- ...defaults,
- ...userOptions,
- };
-
- return (files, metalsmith, cb) => {
- const src = metalsmith.path(options.source);
- const dest = options.destination;
-
- // copied almost line for line from https://github.com/segmentio/metalsmith/blob/master/lib/index.js
- readdir(src, (readDirError, arr) => {
- if (readDirError) {
- cb(readDirError);
- return;
- }
-
- each(arr, read, err => cb(err, files));
- });
-
- function read(file, done) {
- const name = path.join(dest, path.relative(src, file));
- fs.stat(file, (statError, stats) => {
- if (statError) {
- done(statError);
- return;
- }
-
- fs.readFile(file, (err, buffer) => {
- if (err) {
- done(err);
- return;
- }
-
- const newFile = {};
-
- newFile.contents = buffer;
- newFile.stats = stats;
-
- newFile.mode = mode(stats).toOctal();
- files[name] = newFile;
- done();
- });
- });
- }
- };
-}
diff --git a/docgen/plugins/autoprefixer.js b/docgen/plugins/autoprefixer.js
deleted file mode 100644
index ee01edca23..0000000000
--- a/docgen/plugins/autoprefixer.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import postcss from 'postcss';
-import syntax from 'postcss-scss';
-import autoprefixer from 'autoprefixer';
-
-export default function sassAutoprefixer(files, metalsmith, done) {
- const processor = postcss([autoprefixer]);
- Object
- .keys(files)
- .filter(file => (/\.css$/).test(file))
- .forEach(file => {
- const originalContent = files[file].contents.toString();
- const autoprefixedContent = processor.process(originalContent, {syntax}).css;
- files[file].contents = new Buffer(autoprefixedContent);
- });
-
- done();
-}
diff --git a/docgen/plugins/helpers.js b/docgen/plugins/helpers.js
deleted file mode 100644
index 3537273f95..0000000000
--- a/docgen/plugins/helpers.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import highlight from '../syntaxHighlighting.js';
-import md from '../mdRenderer.js';
-
-// this plugin provides ATM one helper to easily compute the publicPath of assets
-export default function helpers(filenames, metalsmith, cb) {
- metalsmith.metadata().h = {
- markdown(src) {
- return md.render(src);
- },
- highlight(src, opts) {
- const lang = opts && opts.lang;
- return highlight(src, lang);
- },
- maybeActive(navPath, singlePathOrArrayOfPaths) {
- const pathsToTest = [].concat(singlePathOrArrayOfPaths);
- return pathsToTest.some(pathToTest => navPath.indexOf(pathToTest) === 0) ?
- 'active' :
- '';
- },
- };
-
- cb();
-}
diff --git a/docgen/plugins/ignore.js b/docgen/plugins/ignore.js
deleted file mode 100644
index 1d29a9a703..0000000000
--- a/docgen/plugins/ignore.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export default function ignore(testFn) {
- return (files, metalsmith, cb) => {
- Object
- .keys(files)
- .forEach(fileName => {
- if (testFn(fileName) === true) delete files[fileName];
- });
-
- cb(null);
- };
-}
diff --git a/docgen/plugins/jsdoc-data.js b/docgen/plugins/jsdoc-data.js
deleted file mode 100644
index ae543751d2..0000000000
--- a/docgen/plugins/jsdoc-data.js
+++ /dev/null
@@ -1,164 +0,0 @@
-import collectJson from 'collect-json';
-import jsdocParse from 'jsdoc-parse';
-import {forEach, groupBy} from 'lodash';
-import {hasChanged} from './onlyChanged.js';
-import {join} from 'path';
-
-let cachedFiles;
-
-export default function() {
- return function(files, metalsmith, done) {
- const allFilles = Object
- .entries(files)
- .reduce((memo, [filename, file]) =>
- (/\.jsdoc$/).test(filename) ?
- [...memo, {filename: filename.replace(/\.jsdoc$/, ''), ...file}] :
- memo,
- []
- );
-
- const filesToParse = allFilles
- .filter(file => hasChanged(file))
- .map(file => file.filename);
-
- if (cachedFiles) {
- // remove any file from cache not present in filestoparse
- Object.entries(cachedFiles).forEach(([buildFilename, file]) => {
- if (!allFilles.some(({filename}) => file.filename === filename)) {
- delete cachedFiles[buildFilename];
- } else {
- files[buildFilename] = cachedFiles[buildFilename];
- }
- });
- } else {
- cachedFiles = {};
- }
-
- allFilles.forEach(({filename}) => delete files[`${filename}.jsdoc`]);
-
- if (filesToParse.length === 0) {
- done();
- return;
- }
-
- jsdocParse({
- src: filesToParse,
- json: true,
- }).pipe(collectJson(dataReady));
-
- function dataReady(unfilteredSymbols) {
- const symbolsByCategory = groupBy(
- unfilteredSymbols.filter(
- o => !o.deprecated &&
- o.kind &&
- (o.kind === 'component' || o.kind === 'widget' || o.kind === 'connector')
- ),
- 'kind'
- );
-
- forEach(symbolsByCategory, symbols => {
- forEach(symbols, data => {
- const buildFilename = `${data.kind}s/${data.name}.html`;
- const customTags = parseCustomTags(data.customTags);
- const isNameUnique = unfilteredSymbols.map(s => s.name).filter(n => n === data.name).length === 1;
- const title = isNameUnique ?
- data.name :
- `${data.name} ${data.kind}`;
-
- const fileFromMetalsmith = allFilles
- .find(
- ({filename}) =>
- filename === join(data.meta.path, data.meta.filename)
- );
-
- files[buildFilename] = cachedFiles[buildFilename] = {
- ...data,
- ...customTags,
- mode: '0764',
- contents: '',
- stats: fileFromMetalsmith && fileFromMetalsmith.stats,
- filename: fileFromMetalsmith && fileFromMetalsmith.filename,
- title,
- mainTitle: `${data.kind.charAt(0).toUpperCase()}${data.kind.slice(1)}s`, //
- withHeadings: false,
- layout: `${data.kind}.pug`,
- category: data.kind,
- navWeight: data.name === 'InstantSearch' ? 1000 : 0,
- };
- });
- });
-
- done();
- }
- };
-}
-
-/**
- * This regexp aims to parse the following kind of jsdoc tag values:
- * 1 - `{boolean} [showMore=false] - description`
- * 2 - `{boolean} showMore - description`
- * The groups output for 1/ are:
- * [
- * '{boolean} [showMore=false] - description',
- * 'boolean',
- * '[',
- * 'showMore',
- * 'false',
- * 'description'
- * ]
- * the first square bracket is matched in order to detect optional parameter
- */
-const typeNameValueDescription = /\{(.+)\} (?:(\[?)(\S+?)(?:=(\S+?))?]? - )?([\s\S]*)/;
-function parseTypeNameValueDescription(v) {
- const parsed = typeNameValueDescription.exec(v);
- if (!parsed) return null;
- return {
- type: parsed[1],
- isRequired: parsed[2] !== '[',
- name: parsed[3],
- defaultValue: parsed[4],
- description: parsed[5],
- };
-}
-
-/**
- * This regexp aims to parse simple key description tag values. Example
- * showMore - container for the show more button
- */
-const keyDescription = /(?:(\S+) - )?([\s\S]*)/;
-function parseKeyDescription(v) {
- const parsed = keyDescription.exec(v);
- if (!parsed) return null;
- return {
- key: parsed[1],
- description: parsed[2],
- };
-}
-
-const customTagParsers = {
- proptype: parseTypeNameValueDescription,
- providedproptype: parseTypeNameValueDescription,
- themekey: parseKeyDescription,
- translationkey: parseKeyDescription,
-};
-
-function parseCustomTags(customTagObjects) {
- if (!customTagObjects) return {};
-
- const res = {};
- customTagObjects.forEach(({tag, value}) => {
- const tagValueParser = customTagParsers[tag];
-
- // when no custom tag parser found, just forward the value
- // example: requirements
- if (!tagValueParser) {
- res[tag] = value;
- return;
- }
-
- res[tag] = res[tag] || [];
- res[tag].push(tagValueParser(value));
- });
-
- return res;
-}
diff --git a/docgen/plugins/markdown.js b/docgen/plugins/markdown.js
deleted file mode 100644
index 02eb2f62c2..0000000000
--- a/docgen/plugins/markdown.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import {basename, dirname, extname} from 'path';
-import md from '../mdRenderer';
-
-const isMarkdown = filepath => (/\.md|\.markdown/).test(extname(filepath));
-
-export default function markdown(files, metalsmith, done) {
- Object.keys(files).forEach(file => {
- if (!isMarkdown(file)) return;
- const data = files[file];
- const dir = dirname(file);
- let html = `${basename(file, extname(file))}.html`;
- if (dir !== '.') html = `${dir}/${html}`;
- const str = md.render(data.contents.toString(), {path: html});
- data.contents = new Buffer(str);
- delete files[file];
- files[html] = data;
- });
-
- done();
-}
diff --git a/docgen/plugins/navigation.js b/docgen/plugins/navigation.js
deleted file mode 100644
index a86490f68d..0000000000
--- a/docgen/plugins/navigation.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import {forEach} from 'lodash';
-
-export default function() {
- return function(files, metalsmith, done) {
- const categories = {};
-
- // First we scann all the HTML files to retrieve all the related documents based
- // on the category attribute in the metadata
- forEach(files, (data, path) => {
- if (!path.match(/\.html$/) || data.tocVisibility === false) return;
- const category = data.category || 'other';
- categories[category] = categories[category] || [];
- categories[category].push({
- path,
- title: data.title,
- navWeight: data.navWeight,
- metadata: data,
- });
- });
-
- // Then we go through all the files again to attach in the navigation attribute
- // all the related documents
- forEach(files, (data, path) => {
- if (!path.match(/\.html$/)) return;
- const category = data.category || 'other';
- // The navigation is sorted by weight first. A document with weigth is always more important
- // than one without.
- // Then navigation is sorted by title.
- data.navigation = categories[category].sort((a, b) => {
- if (a.title && b.title &&
- a.navWeight === b.navWeight) {
- return a.title.localeCompare(b.title);
- } else {
- return b.navWeight - a.navWeight;
- }
- });
- data.navPath = path;
- });
-
- done();
- };
-}
diff --git a/docgen/plugins/onlyChanged.js b/docgen/plugins/onlyChanged.js
deleted file mode 100644
index 3af05e2784..0000000000
--- a/docgen/plugins/onlyChanged.js
+++ /dev/null
@@ -1,83 +0,0 @@
-// This plugin mutates the `files` map of metalsmith
-// at build time to only keep what was updated
-// We consider any update in layouts/ to trigger an update on every html file
-// Otherwise, if it's an asset or a file with no layout then we compare
-// the file's last modification time to the process start time
-
-import {join} from 'path';
-
-import {parallel} from 'async';
-import {watch} from 'chokidar';
-
-let lastRunTime = false;
-let layoutChange = true;
-let cssChange = true;
-const layoutFiles = join(__dirname, '../layouts/**/*');
-const cssFiles = join(__dirname, '../src/stylesheets/**/*');
-const CSSEntryPoints = ['stylesheets/index.css', 'stylesheets/header.css'];
-
-export const hasChanged = file => file.stats && file.stats.ctime && file.stats.mtime ?
- Date.parse(file.stats.ctime) > lastRunTime || Date.parse(file.stats.mtime) > lastRunTime :
- true;
-
-export default function onlyChanged(files, metalsmith, cb) {
- if (lastRunTime === false) {
- watch(layoutFiles, {ignoreInitial: true})
- .on('all', () => { layoutChange = true; })
- .on('error', err => { throw err; });
-
- watch(cssFiles, {ignoreInitial: true})
- .on('all', () => { cssChange = true; })
- .on('error', err => { throw err; });
-
- lastRunTime = Date.now();
- layoutChange = false;
- cssChange = false;
- cb(null);
- return;
- }
-
- parallel(
- Object
- .entries(files)
- .map(([name, file]) => done => {
- if (!file.stats) {
- done(null); // keep file, we do not know
- return;
- }
-
- if (!file.layout) {
- const cssEntryPointNeedsUpdate = CSSEntryPoints.indexOf(name) !== -1 && cssChange === true;
-
- if (!hasChanged(file) && !cssEntryPointNeedsUpdate) {
- // file has no layout and was not updated, remove file
- // from files to process
- delete files[name];
- }
-
- done(null);
- return;
- }
-
- if (/\.html$/.test(name) && layoutChange === true) {
- done(null); // html page need rebuild, some layout files changed
- return;
- }
-
- if (!hasChanged(file)) {
- delete files[name]; // file was not updated, layouts were not updated
- }
-
- done(null);
- }),
- err => {
- if (!err) {
- lastRunTime = Date.now();
- layoutChange = false;
- cssChange = false;
- console.log(`[metalsmith]: onlyChanged | ${Object.keys(files)}`); // eslint-disable-line no-console
- }
- cb(err);
- }
- );
-}
diff --git a/docgen/plugins/perf.js b/docgen/plugins/perf.js
deleted file mode 100644
index 57809ed916..0000000000
--- a/docgen/plugins/perf.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* eslint-disable no-console */
-
-export const start = (label = 'performance') => (files, metalsmith, cb) => {
- console.time(label);
- console.log(`${Object.entries(files).length} file(s) to process: ${Object.keys(files)}`);
- cb();
-};
-
-export const stop = (label = 'performance') => (files, metalsmith, cb) => {
- console.timeEnd(label);
- cb();
-};
diff --git a/docgen/plugins/rev-assets.js b/docgen/plugins/rev-assets.js
deleted file mode 100644
index ecbc1fe4b9..0000000000
--- a/docgen/plugins/rev-assets.js
+++ /dev/null
@@ -1,67 +0,0 @@
-import fs from 'fs';
-import path from 'path';
-import glob from 'glob';
-import hasha from 'hasha';
-import replace from 'replace-in-file';
-
-import config from '../config.js';
-
-const DIST_PATH = path.resolve(config.docsDist);
-
-// HELPERS TO ADD REVISION HASH TO FILENAMES
-// -----------------------------------------
-function computeHashForFiles(files: string[]): Promise<[{ file: string, hash: string }]> {
- const promises = files.map(
- file => hasha
- .fromFile(file, {algorithm: 'md5'})
- .then(hash => ({file, hash}))
- );
-
- return Promise.all(promises);
-}
-
-function renameFiles(files: { file: string, hash: string }[]): { oldPath: string, newPath: string }[] {
- return files.map(({file, hash}) => {
- const ext = path.extname(file);
- const newPath = `${file.replace(ext, `-${hash}`)}${ext}`;
-
- // rename original with hash file
- fs.renameSync(file, newPath);
-
- // check for `.[css|js].map` files to rename also
- if ((ext === '.css' || ext === '.js') && fs.existsSync(`${file}.map`)) {
- fs.renameSync(`${file}.map`, `${newPath}.map`);
- }
-
- return {oldPath: file, newPath};
- });
-}
-
-function renameReferences(inFiles: string|string[], files: { oldPath: string, newPath: string }[]) {
- const {from, to} = files.reduce((toRename, {oldPath, newPath}) => ({
- from: [...toRename.from, new RegExp(oldPath.replace(`${DIST_PATH}/`, ''), 'g')],
- to: [...toRename.to, newPath.replace(`${DIST_PATH}/`, '')],
- }), {from: [], to: []});
-
- return replace({from, to, files: inFiles});
-}
-
-function computeFiles([filesGlob, replaceFilesGlob]: Array): Promise<*> {
- const files = glob.sync(`${DIST_PATH}/${filesGlob}`);
- return computeHashForFiles(files)
- .then(renameFiles)
- .then(result => renameReferences(`${DIST_PATH}/${replaceFilesGlob}`, result));
-}
-
-export default function revAssets(): Promise<*> {
- // 1. compute MD5 for images / json -> replace in CSS, JS, HTML
- // 2. compute MD5 for CSS -> replace in JS, HTML
- // 3. compute MD5 for JS -> replace in HTML
- const imagesJson = ['**/*.{json,svg,png,jpeg,jpg,gif}', '**/*.{js,html,css}'];
- const css = ['**/*.css', '**/*.{js,html}'];
- const js = ['**/*.js', '**/*.html'];
-
- return computeFiles(imagesJson)
- .then(() => computeFiles(css))
- .then(() => computeFiles(js));
-}
diff --git a/docgen/plugins/sources.js b/docgen/plugins/sources.js
deleted file mode 100644
index 69ffb1fc41..0000000000
--- a/docgen/plugins/sources.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import {glob} from 'glob';
-import {stat} from 'fs';
-import async from 'async';
-
-export default function sourcesPlugin(sources, {ignore, computeFilename}) {
- return (files, m, pluginDone) =>
- async.reduce(
- sources,
- {},
- (sourcesMemo, source, globDone) => {
- glob(
- source,
- {ignore},
- (globErr, filenames) => {
- if (globErr) {
- globDone(globErr);
- return;
- }
-
- async.reduce(
- filenames,
- {},
- (statMemo, filename, statDone) => {
- stat(filename, (statErr, stats) => {
- if (statErr) {
- pluginDone(statErr);
- return;
- }
-
- statDone(null, {...statMemo, [computeFilename(filename)]: {stats}});
- });
- },
- (err, filesnamesWithStat) => {
- if (err) {
- globDone(err);
- return;
- }
-
- globDone(null, {
- ...sourcesMemo,
- ...filesnamesWithStat,
- });
- }
- );
- }
- );
- },
- (err, newFiles) => {
- if (err) {
- pluginDone(err);
- return;
- }
-
- Object.assign(files, newFiles);
- pluginDone(null);
- }
- );
-}
diff --git a/docgen/plugins/webpackEntryMetadata.js b/docgen/plugins/webpackEntryMetadata.js
deleted file mode 100644
index 52d465fbe5..0000000000
--- a/docgen/plugins/webpackEntryMetadata.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// this plugin adds the webpack entry points to metadata.webpack.assets
-// useful in dev mode when not using ms-webpack
-export default function webpackEntryMetadata(webpackConfig) {
- return (filenames, metalsmith, cb) => {
- const assets = Object
- .keys(webpackConfig.entry)
- .reduce((memo, entryName) => ({
- ...memo,
- [`${entryName}.js`]: `${webpackConfig.output.publicPath}${entryName}.js`,
- }), {});
- metalsmith.metadata().webpack = {
- assets: {
- ...assets,
- 'js/common.js': `${webpackConfig.output.publicPath}js/common.js`,
- },
- };
-
- cb();
- };
-}
diff --git a/docgen/readme-logo.png b/docgen/readme-logo.png
deleted file mode 100644
index e842dd213e..0000000000
Binary files a/docgen/readme-logo.png and /dev/null differ
diff --git a/docgen/rootFiles/_redirects b/docgen/rootFiles/_redirects
deleted file mode 100644
index bd44143285..0000000000
--- a/docgen/rootFiles/_redirects
+++ /dev/null
@@ -1 +0,0 @@
-/ /instantsearch.js/react 301
diff --git a/docgen/src/Getting_started.md b/docgen/src/Getting_started.md
deleted file mode 100644
index 1ae59ed9cf..0000000000
--- a/docgen/src/Getting_started.md
+++ /dev/null
@@ -1,317 +0,0 @@
----
-title: Getting started tutorial
-layout: main.pug
-category: gettingstarted
-withHeadings: true
-navScroll: true
----
-
-## Welcome to React InstantSearch
-
-React InstantSearch is the ultimate toolbox for creating instant-search
-experiences using [React](https://facebook.github.io/react/) and [Algolia](https://www.algolia.com/).
-
-In this tutorial, you'll learn how to:
-
- - install `react-instantsearch` in your [React](https://facebook.github.io/react/) project
- - bootstrap an app using the `` component
- - display results from Algolia
- - add widgets to filter the results
- - connect your own component to the search
-
-## Before we start
-
-React InstantSearch is meant to be used with Algolia.
-
-Therefore, you'll need the credentials to an Algolia index. To ease
-this getting started, here are the credentials to an already configured index:
- - `appId`: `latency`
- - `searchKey`: `3d9875e51fbd20c7754e65422f7ce5e1`
- - `indexName`: `bestbuy`
-
-It contains sample data for an e-commerce website.
-
-This guide also expects you to have a working [React](https://facebook.github.io/react/) project. If you need to setup a React project, we suggest you use
-[facebookincubator/create-react-app](https://github.com/facebookincubator/create-react-app#getting-started) which is the official React-CLI from Facebook.
-
-## Install `react-instantsearch`
-
-React InstantSearch is available in the [npm](https://www.npmjs.com) registry. Install it:
-
-```shell
-yarn add react-instantsearch
-```
-
-Note: we use `yarn add` to install dependencies but React InstantSearch is also installable via `npm install`.
-
-## Add the `` component
-
-[``](widgets/InstantSearch.html) is the component that will connect to Algolia
-and will synchronise all the widgets together.
-
-It maintains the state
-of the search, does the queries, and provides the results to the widgets so
-that they can update themselves when needed.
-
-```jsx
-import React from 'react';
-import ReactDOM from 'react-dom';
-
-import {InstantSearch} from 'react-instantsearch/dom';
-
-const App = () =>
-
- {/* Search widgets will go there */}
-
-
-// Needed only if your js app doesn't do it already.
-// Create-react-app does it for you
-ReactDOM.render(, document.querySelector('#app'));
-```
-
-`appId`, `apiKey` and `indexName` are mandatory. Those props are the
-credentials of your application in Algolia. They can be found in your [Algolia
-dashboard](https://www.algolia.com/api-keys).
-
-Congrats 🎉! Your application is now connected to Algolia.
-
-In this section we've seen:
- - How to connect a part of a [React](https://facebook.github.io/react/) application to Algolia
- - How to configure your Algolia credentials
-
- > To get more *under the hood* information about the `` wrapper
- > component, [read our guide](guide/.html).
-
-## Load the Algolia theme
-
-We do not inject any CSS in your application by default, only CSS class names are declared
-on our widgets. It's your responsibility to then load a theme or style the CSS classes accordingly.
-
-We provide an Algolia theme that should be a good start.
-
-Include it in your webpage with this CDN link or copy paste the raw content:
-
-```html
-
-```
-
-Read the [styling](guide/Styling_widgets.html) guide for more information.
-
-## Display results
-
-The core of a search experience is to display results. By default, React InstantSearch
-will do a query at the start of the page and will retrieve the most relevant hits.
-
-To display results, we are gonna use the [Hits](widgets/Hits.html) widget. This widget will
-display all the results returned by Algolia, and it will update when there
-are new results.
-
-While we're doing that, let's create a new component for the search so we
-ease the reading of our React code:
-
-```jsx
-// First, we need to add the Hits component to our import
-import {InstantSearch, Hits} from 'react-instantsearch/dom';
-
-// [...]
-
-function Search() {
- return (
-
-
-
- );
-}
-```
-
-We can then call this component in the render of App:
-
-```jsx
-const App = () =>
-
-
-
-```
-
-You should now be able to see the results without any styling. This
-view lets you inspect the values that are retrieved from Algolia, in order
-to build your custom view.
-
-In order to customize the view for each product, we can use a special prop
-of the Hit widget: `hitComponent`. This prop accepts a Component that
-will be used for each hit in the results from Algolia.
-
-```jsx
-function Product({hit}) {
- return (
-
- {hit.name}
-
- );
-};
-```
-
-The widget receives a prop `hit` that contains the content of the
-record. Here we are only displaying the name for the sake of simplicity
-but there is no limit as long as the data is in the record.
-
-Now let's modify the `Hits` usage to add our new `hitComponent`.
-
-```jsx
-function Search() {
- return (
-
-
-
- );
-}
-```
-
-In this section we've seen:
- - how to display the results from Algolia
- - how to customize the display of those results
-
-## Add a SearchBox
-
-Now that we've added the results, we can start querying our index. To do this, we are gonna use the [Searchbox](widgets/SearchBox.html) widget. Let's add it
-in the Search component that we created before:
-
-```jsx
-// We need to add the SearchBox to our import
-import {InstantSearch, Hits, SearchBox} from 'react-instantsearch/dom';
-
-// [...]
-
-function Search() {
- return (
-
-
-
-
- );
-}
-```
-
-The search is now interactive but we don't see what matched in each of the products.
-Good thing for us, Algolia computes the matching part. Let's add this to our custom
-search result component:
-
-```jsx
-// We need to add the Highlight widget to our import
-import {InstantSearch, Hits, SearchBox, Highlight} from 'react-instantsearch/dom';
-
-// [...]
-
-function Product({hit}) {
- return (
-
-
-
-
-
- );
-};
-```
-
-Now the search displays the results and highlights the part of the hit attribute
-that matches the query. This pattern is very important in search, especially with
-Algolia, so that the user knows what's going on. This way we create the search
-dialog between the user and the data.
-
-In this part, we've seen the following:
- - how to add a SearchBox to make queries into the records
- - how to highlight the matched part of the results
- - the importance of highlighting in a text-based search
-
-## Add RefinementList
-
-While the SearchBox is the way to go when it comes to textual search, you
-may also want to provide filters based on the structure of the records.
-
-Algolia provides a set of parameters for filtering by facets, numbers or geo
-location. Instantsearch packages those into a set of widgets and connectors.
-
-Since the dataset used here is an e-commerce one, let's add a [RefinementList](widgets/RefinementList.html)
-to filter the products by categories:
-
-```jsx
-// We need to add the RefinementList to our import
-import {InstantSearch, Hits, SearchBox, Highlight, RefinementList} from 'react-instantsearch/dom';
-
-// [...]
-
-function Search() {
- return (
-
-
-
-
-
- );
-}
-```
-
-The `attributeName` props specifies the faceted attribute to use in this widget. This
-attribute should be declared as a facet in the index configuration as well.
-
-The values displayed are computed by Algolia from the results.
-
-In this part, we've seen the following:
- - there are components for all types of refinements
- - the RefinementList works with facets
- - facets are computed from the results
-
-## Refine the search experience further
-
-We now miss two elements in our search interface:
- - the ability to browse beyond the first page of results
- - the ability to reset the search state
-
-Those two features are implemented respectively with the [Pagination](widgets/Pagination.html), [ClearAll](widgets/ClearAll.html)
-and [CurrentRefinements](widgets/CurrentRefinements.html) widgets. Both have nice defaults which means that
-we can use them directly without further configuration.
-
-```jsx
-// We need to add the RefinementList to our import
-import {InstantSearch, Hits, SearchBox, Highlight, RefinementList,
-Pagination, CurrentRefinements, ClearAll} from 'react-instantsearch/dom';
-
-// [...]
-
-function Search() {
- return (
-
-
-
-
-
-
-
-
- );
-}
-```
-
-Current filters will display all the filters currently selected by the user.
-This gives the user a synthetic way of understanding the current search. `ClearAll`
-displays a button to remove all the filters.
-
-In this part, we've seen the following:
- - how to clear the filters
- - how to paginate the results
-
-## Next steps
-
-At this point, you know the basics of React InstantSearch. Read the guide to know and do more with it.
-
-
diff --git a/docgen/src/connectors/index.md b/docgen/src/connectors/index.md
deleted file mode 100644
index 2216b1f889..0000000000
--- a/docgen/src/connectors/index.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: Connectors
-layout: main.pug
-category: connector
-showInNav: false
----
-
-Connectors are higher order components. They encapsulate the logic for
-a specific search concept and they provide a way to interact with
-the instantsearch context.
-
-The [connectors guide](guide/Connectors.html) explains in details what are connectors
-and when to use them.
diff --git a/docgen/src/examples/Demos.md b/docgen/src/examples/Demos.md
deleted file mode 100644
index 033b373b48..0000000000
--- a/docgen/src/examples/Demos.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-title: Demos
-mainTitle: Examples
-layout: examples.pug
-category: examples
-navWeight: 1000
-examplesCTA: 'Go to live demo'
-examples: [{
- id: 'e-commerce',
- title: 'E-commerce',
- description: 'This demos shows the usage of react-instantsearch in the context of an e-commerce website.'
- },{
- id: 'e-commerce-infinite',
- title: 'Infinite hits',
- description: 'This demos based on e-commerce demonstrates the usage of the load more UX pattern.'
- }, {
- id: 'material-ui',
- title: 'Material-UI',
- description: 'This demos based on e-commerce demonstrates the integration of the Material UI component library with react-instantsearch.'
- }, {
- id: 'media',
- title: 'Media',
- description: 'This demos shows the usage of react-instantsearch in the context of a media website'
- }, {
- id: 'tourism',
- title: 'Tourism',
- description: 'This demos shows the usage of react-instantsearch in the context of a home renting website'
- }]
-examplesEndpoint: examples
----
-
-## Demos
-
-To demonstrate the flexibility of React InstantSearch we created some demos.
-If you think about a new example or have any questions about them, [come talk to us](https://discourse.algolia.com/c/instantsearch).
diff --git a/docgen/src/examples/Recipes.md b/docgen/src/examples/Recipes.md
deleted file mode 100644
index 2410ab6a0c..0000000000
--- a/docgen/src/examples/Recipes.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-title: Recipes
-mainTitle: Examples
-layout: examples.pug
-category: examples
-navWeight: 1000
-examplesCTA: 'Read the code'
-examples: [{
- id: 'react-router',
- title: 'Usage with react-router v3.'
- }, {
- id: 'react-native',
- title: 'Usage with react-native.'
- }, {
- id: 'autocomplete',
- title: 'Autocomplete integration.'
- }, {
- id: 'multi-index',
- title: 'Requests on multiple indices at once.'
- }, {
- id: 'react-router-v4',
- title: 'Usage with react-router v4.'
- }, {
- id: 'geo-search',
- title: 'Geo search using dynamic search parameters'
- }]
-examplesEndpoint: https://github.com/algolia/instantsearch.js/tree/v2/packages/react-instantsearch/examples
----
-
-## Recipes
-
-To demonstrate more complex use cases of React InstantSearch we created some recipes.
-If you think about a new recipe or have any questions about them, [come talk to us](https://discourse.algolia.com/c/instantsearch).
diff --git a/docgen/src/examples/default-theme/App.js b/docgen/src/examples/default-theme/App.js
deleted file mode 100644
index b6b82e6f4a..0000000000
--- a/docgen/src/examples/default-theme/App.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/* eslint react/prop-types: 0 */
-import React from 'react';
-import {createConnector} from 'react-instantsearch';
-import {
- InstantSearch,
- Hits,
- HierarchicalMenu,
- RefinementList,
- SearchBox,
- SortBy,
- Stats,
- Pagination,
- ClearAll,
- StarRating,
- RangeInput,
- Highlight,
- Configure,
-} from 'react-instantsearch/dom';
-import {withUrlSync} from '../urlSync';
-import 'react-instantsearch-theme-algolia/style.scss';
-
-const App = props =>
-
-
-
-
diff --git a/docgen/src/guide/Autocomplete_menu.md b/docgen/src/guide/Autocomplete_menu.md
deleted file mode 100644
index 3b38dc3efb..0000000000
--- a/docgen/src/guide/Autocomplete_menu.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: Autocomplete menu
-mainTitle: Guide
-layout: main.pug
-category: guide
-navWeight: 20
----
-
-You can build with React InstantSearch an autocomplete menu that uses an external autocomplete component.
-
-[Read the examples](https://github.com/algolia/instantsearch.js/tree/v2/packages/react-instantsearch/examples/autocomplete)
- showing you how to build an autocomplete menu that will:
-* display hits and facet values from the same index
-* display hits from different indices
-
-Those examples use advanced concepts from React InstantSearch. If you're not familiar with
-them you can read their guide first:
-
-* [Custom connectors](guide/Custom_connectors.html)
-* [Virtual widgets](guide/Virtual_widgets.html)
-* [Multi Index](guide/Multi_index.html)
-
-
diff --git a/docgen/src/guide/Connectors.md b/docgen/src/guide/Connectors.md
deleted file mode 100644
index 9741b11940..0000000000
--- a/docgen/src/guide/Connectors.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-title: Connectors
-mainTitle: Guide
-layout: main.pug
-category: guide
-navWeight: 75
----
-
-React InstantSearch provides [widgets](guide/Widgets.html) out of the box, those are great when you want
-a default style to be applied and you do not need heavy customization of the underlying DOM or behavior of
-the widget.
-
-## When do I need to use connectors?
-
-* When you want to display our widgets using another UI library like [Material-UI](http://www.material-ui.com/)
-* When you want to have full control on the rendering without having to reimplement business logic
-* As soon as you hit a feature wall using our default widgets
-* When you are a react-native user, read our [react-native guide](guide/React_native.html)
-
-## What are connectors?
-
-Connectors are higher order components. They encapsulate the logic for
-a specific kind of widget and they provide a way to interact with
-the instantsearch context.
-
-As higher order components, they have an outer component API that we call
-**exposed props** and they will provide some other props to the wrapped
-components which are called the **provided props**.
-
-## How to use them?
-
-If you want to create your own search box, you will need to use the [`connectSearchBox()`](connectors/connectSearchBox.html) connector:
-
-```jsx
-import {connectSearchBox} from 'react-instantsearch/connectors';
-
-const MySearchBox = ({currentRefinement, refine}) =>
- refine(e.target.value)}
- />;
-
-// `ConnectedSearchBox` renders a `` widget that is connected to
-// the state, providing it with `currentRefinement` and `refine` props for
-// reading and manipulating the current query of the search.
-// Note that this `ConnectedSearchBox` widget will only work when rendered
-// as a child or a descendant of the `` component.
-const ConnectedSearchBox = connectSearchBox(MySearchBox);
-```
-
-## Exposed props
-
-Connectors expose props to configure their behavior. Like the `attributeName`
-being refined in a [`