Skip to content

Search index file not found when turn on hash-files flag #2741

@tuyen-at-work

Description

@tuyen-at-work

Problem

Search index not being found when turn on hash-files flag:

Image

When I list the files in the build step, I see the file has different hash:

Image

Steps

  1. Add this to book.toml:

    [output.html]
    hash-files = true
  2. Build the book:

    bin/mdbook build --dest-dir ./docs
    echo "Files:"
    ls -l docs
  3. Notice the index file has different hash compared to the one used in the searcher.js:

    Image

Possible Solution(s)

Maybe ensure that the generation of index file must be finished before the searcher file.

Notes

Live example:

https://cli.eshn.dev/epi-deployment-start-command.html

Version

mdbook v0.4.51

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-SearchArea: SearchC-bugCategory: A bug, incorrect or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions