WasmEdge / docs

https://wasmedge.org/docs/
Apache License 2.0
17 stars 57 forks source link

fixed->issue:147 search bar missing, reason:themes:[ Array ] in confi… #151

Closed masterghost2002 closed 1 year ago

masterghost2002 commented 1 year ago

fixed->issue:147 search bar missing, reason:themes:[ Array ] in config consisting of localsearch is over written by themes [Array] in extendedConfig

Explanation

All the changes are done in docusaurus.config.js

The reason for the search bar is not visible the, themes array [line no 62] in the config object which again consist a array of "@easyops-cn/docusaurus-search-local" the extension which is responsible for the search bar, is being overwritten by the array in extendedConfig object.

Related issue

fixes#147

What type of PR is this

/fixes /feature-required

Proposed Changes

Merge the themes array present in the extendedConfig object which overwrites the themes array present in config object.

Live link for testing

Live Testing Link

ScreenShot

Screenshot from 2023-08-18 09-58-41

alabulei1 commented 1 year ago

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Commit 98e068a473f43added2315205fbced0682e442f8

Key changes:

Potential problems:

alabulei1 commented 1 year ago

Hi @masterghost2002 ,

Thank you for your contributions. Did the themes cause this problem?

masterghost2002 commented 1 year ago

not actually the theme, in docusaurus.config.js, there is a config object which consist of themes array the place where code for @easyops-cn/docusaurus-search-local is defined, which result in the visibility of search box.

But, when we come down, to the extendedConfig object, it consist of three things, spread config object, the place where our themes (which consist the code for search) array is defined. a markdown key, and again a themes array which consist of @docusaurus/theme-mermaid, as we are using spread operator on your config object, it placed the themes array in the extendedConfig object, which is later being replaced by the themes array which consist of docusaurus themes