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

patch PR #1440 #1441

Merged
merged 5 commits into from
May 8, 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
4 changes: 2 additions & 2 deletions packages/docusaurus-preset-classic/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module.exports = function preset(context, opts = {}) {
return {
themes: [
{
name: '@docusaurus/theme-search-algolia',
name: '@docusaurus/theme-classic',
},
{
name: '@docusaurus/theme-classic',
name: '@docusaurus/theme-search-algolia',
},
],
plugins: [
Expand Down
10 changes: 0 additions & 10 deletions packages/docusaurus-theme-classic/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ class DocusaurusThemeClassic {
getThemePath() {
return path.resolve(__dirname, './theme');
}

configureWebpack() {
return {
resolve: {
alias: {
'@theme/SearchAlgolia': path.resolve(__dirname, './noopModule.js'),
},
},
};
}
}

module.exports = DocusaurusThemeClassic;
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-classic/src/theme/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

import SearchAlgolia from '@theme/SearchAlgolia';
import SearchBar from '@theme/SearchBar';

function Navbar() {
const context = useDocusaurusContext();
Expand Down Expand Up @@ -75,7 +75,7 @@ function Navbar() {
<div className="navbar__items navbar__items--right">
{algolia && (
<div className="navbar__search" key="search-box">
<SearchAlgolia />
<SearchBar />
</div>
)}
</div>
Expand Down
8 changes: 8 additions & 0 deletions packages/docusaurus-theme-classic/src/theme/SearchBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

export {default} from '@docusaurus/Noop';
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class Search extends React.Component {

componentDidMount() {
const {siteConfig = {}, metadata = {}} = this.context;
console.log(siteConfig);
const {version: thisVersion, language: thisLanguage} = metadata;
const {
themeConfig: {algolia},
Expand Down
4 changes: 0 additions & 4 deletions packages/docusaurus/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ headerLinks: [
{ url: "help", label: "Help" },
// Links to href destination/ external page
{ href: "https://github.com/", label: "GitHub" },
// Determines search bar position among links
{ search: true },
// Determines language drop down position among links
{ languages: true }
],
```

Expand Down