Skip to content

Searchdata file is referencing "page.content" instead of "post.content" #117

@razvii22

Description

@razvii22

Describe the bug
Commit 4d8c224 replaced post.content with page.content, which causes the "content" field of posts to reference the searchdata page.
This notably causes posts to appear when keywords from the searchdata template file are used to search.

To reproduce
Steps to reproduce the behavior:

  1. Use the built in Javascript search engine
  2. Upload any posts to the _posts directory
  3. Check the generated searchdata.js file in _site if local OR
  4. Attempt a search in any page that uses symbols or keywords from the searchdata.js file, the example below is directly from https://www.drassil.org/git-wiki/main_page

Image

Expected behavior
Search should match the actual content of posts, not the code of the template file.

Screenshots

Image
Image

Image
Image

I am not aware if there are any issues that stem from "post" being used, but it looks like a mistake while implementing using jsonify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions