[go: up one dir, main page]

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 japanese search #9605

Merged
merged 4 commits into from
Jan 11, 2024
Merged

Fix japanese search #9605

merged 4 commits into from
Jan 11, 2024

Conversation

Egliss
Copy link
Contributor
@Egliss Egliss commented Jan 10, 2024
Original(Japanese)

概要

このPRでは #9601 を修正します。

変更概要

  • modern テンプレートにおいて、lunrLanguages に ja が存在する場合はtinysegを適応する

確認手順

  1. cd templates/ && npm i && npm run build && cd ../
  2. samples/seed/template/public/main.js の lunrLanguagesjaを追加する
  3. samples/seed/articles に後述の内容を含むjapanese.mdファイルを作成する
  4. toc.ymlにjapanese.mdを追加する
  5. dotnet run --framework net8.0 --project ./src/docfx/docfx.csproj -- ./samples/seed/docfx.json --serve
  6. http://localhost:8080 に飛び、概要と検索し、検索結果が表示される
    • indexの質が良くないのか、日本語ドキュメント等では引っかかりませんが、別の問題であるためこのPRでは無視します。

japanese.md

## 概要
これは、日本語のテストドキュメントです。
  • 検索が実行できる -> スクリーンショット 2024-01-10 210932

Overview.

This PR fixes #9601.

Change summary.

  • In modern templates, adapt tinyseg if ja is present in lunrLanguages.

Check procedure.

  1. cd templates/ && npm i && npm run build && cd . /
  2. Add ja to lunrLanguages in samples/seed/template/public/main.js
  3. Create a japanese.md file in samples/seed/articles with the contents described below.
  4. Add japanese.md to toc.yml 1.
  5. dotnet run --framework net8.0 --project . /src/docfx/docfx.csproj -- . /samples/seed/docfx.json --serve.
  6. jump to http://localhost:8080, search for 概要 and you will see.
    • The quality of the index may not be good, it does not catch 日本語, ドキュメント, etc., but this is a different problem and will be ignored in this PR.

japanese.md

## 概要
これは、日本語のテストドキュメントです。
  • searches can be performed ->
    スクリーンショット 2024-01-10 210932

@yufeih yufeih added the bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note label Jan 11, 2024
Copy link
Contributor
@yufeih yufeih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Egliss !

@yufeih yufeih merged commit 8851faa into dotnet:main Jan 11, 2024
8 checks passed
@Egliss Egliss deleted the feature/fix-japanease-search branch April 22, 2024 04:32
p-kostov pushed a commit to ErpNetDocs/docfx that referenced this pull request Jun 28, 2024
* Fix japanease tinyseg deps

* Refactor import target suffix

* lint

---------

Co-authored-by: Yufei Huang <yufeih@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Initialization fails if ja is specified in lunrLanguages
2 participants