Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix make doc command fails in development #4143

Merged
merged 1 commit into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ esm
es6
docs/_site/
docs/.jekyll-metadata
docs/.jekyll-cache
packages/react-admin/docs
examples/**/static
examples/**/dist
Expand Down
118 changes: 118 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<!DOCTYPE HTML>
<html lang="en-US">

<head>
<title>React-admin - {{ page.title }}</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="{{ page.description }}">
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="{{ '/css/materialize.min.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/style-v3.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/syntax.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/prism.css' | relative_url }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- You won't find analytics tags in this page. React-admin protects your privacy! -->
</head>

<body>

<header>
<nav>
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<div class="nav-wrapper" style="background: linear-gradient(145deg,#027be3 11%,#1a237e 75%)">
<div class="left">
<form action="#" onsubmit="return false;">
<div class="input-field" style="position:absolute">
<input type="search" name="q" id="query" size="31" maxlength="255" value=""
style="vertical-align:inherit!important" />
<label class="label-icon" for="test"><i class="material-icons">search</i></label>
<i class="material-icons">close</i>
</div>
<span id="search"></span>
</form>
</div>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li class="active"><a href="https://marmelab.com/react-admin/Readme.html">Documentation</a></li>
<li><a href="https://marmelab.com/react-admin-demo">Demo</a></li>
<li><a href="https://marmelab.com/en/blog/#react-admin">Blog</a></li>
<li><a href="https://github.com/marmelab/react-admin">GitHub</a></li>
</ul>
</div>
</nav>
<ul id="slide-out" class="sidenav sidenav-fixed">
<li class="logo">
<a href="{{ site.url }}"><img src="{{ site.url }}/assets/logo_white.png" /></a>
</li>
{% include_relative navigation.html %}
</ul>

</header>

<main>
<div class="container">
<div class="row">
<div class="col s12 m8 offset-m1 xl7 offset-xl1 markdown-section DocSearch-content">
{{ content }}
</div>
<div class="col hide-on-small-only m3 xl3 offset-xl1">
<div class="toc-wrapper">
<div style="height: 1px;">
<ul class="section table-of-contents pushpin">
</ul>
</div>
</div>
</div>
</div>
</div>
</main>

<script src="{{ '/js/materialize.min.js' | relative_url }}"></script>
<script src="{{ 'js/prism.js' | relative_url }}"></script>
<script>
function slugify(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
document.addEventListener('DOMContentLoaded', function () {
/* Generate table of contents */
document.querySelectorAll('.markdown-section h2').forEach(element => {
element.classList.add('scrollspy');
var a = document.createElement('a');
a.href = "#" + slugify(element.innerText);
a.innerText = element.innerText;
var li = document.createElement('li');
li.appendChild(a);
document.querySelector('.table-of-contents').appendChild(li)
})
M.Sidenav.init(document.querySelectorAll('.sidenav'));
M.Pushpin.init(document.querySelector('.pushpin'), { offset: 75, top: 75 });
M.ScrollSpy.init(document.querySelectorAll('.scrollspy'));
M.Dropdown.init(document.querySelectorAll('.dropdown-trigger'));
});
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript">
docsearch({
apiKey: '32f254b1de6a25a96665d1229b6eb8f7',
indexName: 'marmelab-react-admin',
inputSelector: '#query',
debug: false, // Set debug to true if you want to inspect the dropdown
autocompleteOptions: {
appendTo: '#search',
hint: false,
}
});
</script>
</body>

</html>
Binary file added docs/assets/logo_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/css/materialize.min.css

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions docs/css/prism.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+jsx */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/

code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;

-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;

-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}

@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}

/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0 1.275em 0;
overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}

.token.punctuation {
color: #999;
}

.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0, 0%, 100%, .5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}

.token.function {
color: #DD4A68;
}

.token.regex,
.token.important,
.token.variable {
color: #e90;
}

.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}

Loading