mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-18 00:57:51 +02:00
ESLintify Part 2 (#841)
* ESLintify Part 2 * Fix * Fix tests * Fix tests * Fix tests
This commit is contained in:
parent
4267337fb0
commit
5ac2cee658
42 changed files with 188 additions and 190 deletions
|
@ -13,14 +13,14 @@ class Head extends React.Component {
|
|||
const links = this.props.config.headerLinks;
|
||||
const hasBlog = links.some(link => link.blog);
|
||||
|
||||
let highlight = {
|
||||
const highlight = {
|
||||
version: '9.12.0',
|
||||
theme: 'default',
|
||||
...this.props.config.highlight,
|
||||
};
|
||||
|
||||
// Use user-provided themeUrl if it exists, else construct one from version and theme.
|
||||
let highlightThemeURL = highlight.themeUrl
|
||||
const highlightThemeURL = highlight.themeUrl
|
||||
? highlight.themeUrl
|
||||
: `//cdnjs.cloudflare.com/ajax/libs/highlight.js/${
|
||||
highlight.version
|
||||
|
@ -143,17 +143,13 @@ class Head extends React.Component {
|
|||
))}
|
||||
|
||||
{this.props.config.scrollToTop && (
|
||||
<script
|
||||
src={
|
||||
'https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js'
|
||||
}
|
||||
/>
|
||||
<script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js" />
|
||||
)}
|
||||
{this.props.config.scrollToTop && (
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
${JSON.stringify(
|
||||
Object.assign(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue