Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using cloudposse-specific repo to install hugo and htmltest #517

Merged
merged 8 commits into from
Feb 12, 2021
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
FROM cloudposse/packages:0.93.0 as packages

ENV INSTALL_PATH=/dist
RUN mkdir -p ${INSTALL_PATH}
RUN make -C /packages/install hugo HUGO_VERSION=0.42.1
RUN make -C /packages/install htmltest HTMLTEST_VERSION=0.9.1

FROM node:11.2-stretch

COPY --from=packages /dist/ /usr/local/bin/
RUN curl -1sLf 'https://dl.cloudsmith.io/public/cloudposse/packages/setup.deb.sh' | bash
RUN apt-get install hugo htmltest

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ notAlternative = true

[mediaTypes]
[mediaTypes."application/algolia"]
suffix = "algolia.json"
suffixes = ["algolia.json"]

[outputFormats.algolia]
isPlainText = true
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.algolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{- $section := $.Site.GetPage "section" .Section }}
{{- range .Site.AllPages -}}
{{- if or (and (.IsDescendant $section) (and (not .Draft) (not .Params.private))) $section.IsHome -}}
{{- $.Scratch.Add "index" (dict "objectID" .UniqueID "date" .Date.UTC.Unix "description" (.Description | markdownify | plainify) "dir" .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 | markdownify | plainify) "title" .Title "type" .Type "url" .URL "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 | markdownify | plainify) "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 | markdownify | plainify) "title" .Title "type" .Type "url" .URL "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "categories" .Params.Categories "authors" .Params.Authors)}}
{{- end -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
2 changes: 1 addition & 1 deletion layouts/partials/flex/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="refresh" content="0;url={{ .Page.Params.redirect | absURL }}" />
{{- end -}}

{{ .Hugo.Generator }}
{{ hugo.Generator }}
<title>{{ .Title }}&nbsp;&mdash;&nbsp;{{ .Site.Title }}</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,900" rel="stylesheet">
<link rel="shortcut icon" href="{{"images/favicon.png" | relURL}}" type="image/x-icon" />
Expand Down
3 changes: 1 addition & 2 deletions tasks/Makefile.hugo
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ hugo/run: components/build
hugo/build: components/build
@[ "$(HUGO_PUBLISH_DIR)" != "/" ] || (echo "Invalid HUGO_PUBLISH_DIR=$(HUGO_PUBLISH_DIR)"; exit 1)
rm -rf $(HUGO_PUBLISH_DIR)
$(DOCKER_RUN) hugo --templateMetrics --stepAnalysis --config $(HUGO_CONFIG)

$(DOCKER_RUN) hugo --templateMetrics --config $(HUGO_CONFIG)