Skip to content

Commit

Permalink
started refactoring of algolia file
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Dec 8, 2024
1 parent 4e26583 commit 196a688
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ defaultContentLanguage = "en"
googleAnalytics = "UA-97001849-2"
enableGitInfo = true
preserveTaxonomyNames = true
nextSummerYear = 2022
#disableKinds = ["taxonomy"]
nextSummerYear = 2025
#disableKinds = ["taxonomy"]
pluralizelisttitles = false
ignoreLogs = ['warning-goldmark-raw-html']

# Define the number of posts per page
paginate = 10
Expand Down
25 changes: 24 additions & 1 deletion layouts/_default/list.algolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,30 @@
{{- range .Site.AllPages -}}
{{- if or (and (.IsDescendant $section) (and (not .Draft) (not .Params.private))) $section.IsHome -}}
{{- if .File -}}
{{- $.Scratch.Add "index" (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "description" .Description "dir" .File.Dir "expirydate" .ExpiryDate.UTC.Unix "fuzzywordcount" .FuzzyWordCount "keywords" .Keywords "kind" .Kind "lang" .Lang "lastmod" .Lastmod.UTC.Unix "permalink" .Permalink "publishdate" .PublishDate "readingtime" .ReadingTime "relpermalink" .RelPermalink "summary" .Summary "title" .Title "type" .Type "url" .RelPermalink "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "categories" .Params.Categories "authors" .Params.Authors)}}
{{- $.Scratch.Add "index" (dict "objectID" .File.UniqueID
"date" .Date.UTC.Unix
"description" .Description
"dir" .File.Dir
"expirydate" .ExpiryDate.UTC.Unix
"fuzzywordcount" .FuzzyWordCount
"keywords" .Keywords
"kind" .Kind
"lang" .Lang
"lastmod" .Lastmod.UTC.Unix
"permalink" .Permalink
"publishdate" .PublishDate
"readingtime" .ReadingTime
"relpermalink" .RelPermalink
"summary" .Summary
"title" .Title
"type" .Type
"url" .RelPermalink
"weight" .Weight
"wordcount" .WordCount
"section" .Section
"tags" .Params.Tags
"categories" .Params.Categories
"authors" .Params.Authors)}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 196a688

Please sign in to comment.