update docs config + base pages (#1343)

This commit is contained in:
Rikin Kachhia 2019-01-08 22:39:05 +05:30 committed by GitHub
parent a9e2326ea8
commit 5820e5e41d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 11 deletions

View File

@ -1,4 +1 @@
{% extends "basic/genindex.html" %}
{% block bodyclass %}{% endblock %}
{% block sidebarwrapper %}{% endblock %}
{% extends "basic/genindex.html" %}

View File

@ -62,7 +62,7 @@
</div>
<div class="inline-block" id="input_search_box">
<span class="fa fa-search search_icon"></span>
<input type="text" class="search_element" placeholder="Search docs..." />
<input type="text" id="search_element" placeholder="Search docs..." />
</div>
<div class="inline-block header_links">
<div class="social_icons_wrapper">
@ -261,7 +261,7 @@
docsearch({
apiKey: 'c59018461c19e20fe11459136e57900c',
indexName: 'hasura',
inputSelector: '.search_element',
inputSelector: '#search_element',
transformData: function(suggestions) {
if (window.location.origin !== 'https://docs.hasura.io') {
suggestions.forEach(suggestion => {
@ -501,4 +501,5 @@
});
</script>
{%- block extrafooter %} {% endblock %}
{% endblock %}

View File

@ -1,3 +1 @@
{% extends "basic/modindex.html" %}
{% block bodyclass %}{% endblock %}
{% block sidebarwrapper %}{% endblock %}

View File

@ -1 +1,28 @@
{% extends "layout.html" %}
{% block extrafooter %}
<!-- handle search query -->
<script>
const handleQueryParams = function() {
const re = /query=(.*)$/;
const match = re.exec(window.location.search);
let searchTerm = '';
if ( match ) {
searchTerm = decodeURIComponent(match[1]);
if (searchTerm) {
const searchInput = document.getElementById('search_element');
searchInput.value = searchTerm;
searchInput.dispatchEvent(new Event('input'));
}
}
};
if (window.location.search.length > 0) {
handleQueryParams();
}
</script>
{% endblock %}

View File

@ -36,7 +36,7 @@ CURRENT_ENV = os.getenv("ENV") if os.getenv("ENV") else "development"
BASE_DOMAIN = os.getenv("BASE_DOMAIN", "development")
# GraphiQL defaults
GRAPHIQL_DEFAULT_ENDPOINT = "https://data.accouterments35.hasura-app.io/v1alpha1/graphql"
GRAPHIQL_DEFAULT_ENDPOINT = "https://localhost:8080/v1alpha1/graphql"
# Get from env if set
if os.getenv("GRAPHIQL_DEFAULT_ENDPOINT"):
GRAPHIQL_DEFAULT_ENDPOINT = os.getenv("GRAPHIQL_DEFAULT_ENDPOINT")

View File

@ -1,5 +1,3 @@
.. _graphql_manual:
.. title:: Hasura GraphQL Engine Documentation
Hasura GraphQL Engine documentation