diff --git a/README.md b/README.md index 1ec028f..3fe3038 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,13 @@ summaryLength = 70 # number of words for article summaries # useful if deploying in gitlab pages with custom domain and don't want # the username.gitlab.io/website url to persist forceRedirect = false + + infiniteScrolling = false # activates infinite scrolling instead of regular pagination + +# this section is necessary if you want infinite scrolling +# it allows to output the article list as paged JSON so that "pages" can be retrieved via javascript +[outputs] + home = ["HTML", "JSON"] ``` ## Inject custom content diff --git a/layouts/_default/baseof.json b/layouts/_default/baseof.json new file mode 100644 index 0000000..49d010f --- /dev/null +++ b/layouts/_default/baseof.json @@ -0,0 +1 @@ +{{- block "main" . }}{{- end }} diff --git a/layouts/index.html b/layouts/index.html index a4bb3a0..eba1899 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,7 +5,7 @@ {{ $postsList := where .Site.RegularPages "Section" "in" $postsDir }} {{/* pagination */}} -