tomjoht / documentation-theme-jekyll

A Jekyll-based theme designed for documentation and help systems. See the link for detailed instructions on setting up and configuring everything.
http://idratherbewriting.com/documentation-theme-jekyll/
Other
1.17k stars 1.19k forks source link

Error in the searcher due to an extra comma in search.json #221

Closed ivaann2706 closed 2 years ago

ivaann2706 commented 2 years ago

I'm getting an error in the internal search engine. This seems to be related to the closed issue #46.

The following image shows the error that appears in the browser console. image

I have detected that this happens when there are no posts, then the json that is generated has an extra comma, so it is not in a correct format:

[
  .
  .
  .
  {
  "title": "Sample 9 Topic",
  "tags": "",
  "keywords": "sample",
  "url": "p2_sample9.html",
  "summary": "This is just a sample topic..."
  }
  ,
]

I am going to create a pull request with a possible solution.