# Generate JSON output for my blog page only

**URL:** <https://discourse.gohugo.io/t/generate-json-output-for-my-blog-page-only/40493>\
**Category:** support\
**Created:** [September 12, 2022, 10:15am UTC](https://discourse.gohugo.io/t/generate-json-output-for-my-blog-page-only/40493 "2022-09-12T10:15:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sohil](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@sohil](https://discourse.gohugo.io/u/sohil)\
**Post date:** [September 12, 2022, 10:15am UTC](https://discourse.gohugo.io/t/generate-json-output-for-my-blog-page-only/40493/1 "2022-09-12T10:15:16Z")

</div>

> **Algolia Implementation in HUGO site**

Here I am trying to generate JSON output data for my blog page only for the algolia implementation.  
I followed this article [https://www.bennet.org/blog/site-search-jamstack-hugo-algolia/](https://www.bennet.org/blog/site-search-jamstack-hugo-algolia/) for algolia implementation. which generates output for all pages of my site. And i want to make searchable my blogs only.  
Here i am writing my code for generate output.

```auto
{{- $index := slice -}}
{{- range $page := $.Site.RegularPages -}}
  {{- $page := . -}}
  {{- $chunked := slice -}}
  {{- $post_len := len .PlainWords -}}
  {{- range $i := (seq 0 100000000000 $post_len) -}}
    {{- $chunked = $chunked | append (delimit (first 100000000 (after $i $page.PlainWords) ) " " ) -}}
  {{- end -}}
  {{- range $i, $c := $chunked -}}
    {{- $index = $index | append (dict "objectID" (print $page.File.UniqueID "_" $i) "content" $c "order" $i "title" $page.Title "summary" $page.Summary "categories" $page.Params.categories "types" $page.Params.types "image" $page.Params.image "date" $page.Date "href" $page.Permalink "tags" $page.Params.tags ) -}}
  {{- end -}}
{{- end -}}
{{- $index | jsonify -}}

```

Please help me out !!!

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [September 12, 2022, 10:31am UTC](https://discourse.gohugo.io/t/generate-json-output-for-my-blog-page-only/40493/2 "2022-09-12T10:31:43Z")

</div>

HI,

you can look in my collected sample …

> **[GitHub - gj52/HugoSample: Hugo Sample](https://github.com/gj52/HugoSample)**
>
> Hugo Sample. Contribute to gj52/HugoSample development by creating an account on GitHub.

There is a JSON feed and under search a local search solution.  
Hope this can help

check config /theme …/config directories for defining this output
