dotnet / dotnet/docfx

[Bug] Template bug: Searchbar cannot render if the page is built from yaml file.

Open
#8,779 0 comments 0 reactions 0 assignees View on GitHub
template
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Describe the bug**
When I use default/modern template, the search bar only renders if the page is built from `.md`. If the page is built from `.yaml` file, this page cannot render the search bar.

**To Reproduce**
Steps to reproduce the behavior:
1. unzip the attachment [TestZip.zip](https://github.com/dotnet/docfx/files/11485230/TestZip.zip)
2. build and run docfx v2
3. You can find all the home pages (built from markdown file) works perfectly, there are both toc filter and search bar
4. But for content page, there is no search bar. (I have enable the searchbar in docfx.json)

**Expected behavior**
There is search bar on docfx
**Screenshots**
There is a searchbar for home page (built from markdown)
![image](https://github.com/dotnet/docfx/assets/31087545/1b8a88d1-f269-47c3-829f-76d45e2bd717)
There is no searchbar for content page (built from yaml)
![image](https://github.com/dotnet/docfx/assets/31087545/669b59f4-e258-49d2-9658-70fe70a7f1e1)

**Context (please complete the following information):**

- Browser: [Chrome, Edge]
- Form factor: [Desktop]
- Docfx version: [2.66.2+95d113dca43efe17044f80b056b40789bd6a65db]
- Template: [default]

**Additional context**
[TestZip.zip](https://github.com/dotnet/docfx/files/11485230/TestZip.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.