add: Dockerfile + update baseUrl
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

* also enhance footer partial that cries when a ref goes missing (such
  as when a branch is merged)
This commit is contained in:
surtur 2020-10-03 16:40:36 +02:00
parent 112e77ce67
commit 62095aa378
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
3 changed files with 17 additions and 2 deletions

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM immawanderer/fedora-hugo:latest
RUN mkdir -pv /homepage
COPY . /homepage
WORKDIR /homepage
RUN git submodule init \
&& git submodule update --recursive \
&& hugo version
RUN hugo --minify --gc=true
WORKDIR /
FROM nginx
COPY --from=0 /homepage/public/ /usr/share/nginx/html

View File

@ -1,4 +1,4 @@
baseurl = "https://dotya.ml"
baseurl = "/"
languageCode = "en-us"
defaultContentLanguage = "en"
theme = "hermit"

View File

@ -1,3 +1,3 @@
<footer id="site-footer" class="section-inner thin animated fadeIn faster">
<p>&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }} &#183 <a href="https://git.dotya.ml/dotya.ml/homepage" title="source code" target="_blank" rel="noopener">source</a> &#183 <a href="https://status.dotya.ml" title="service status" target="_blank" rel="noopener">status</a><br/><a href="https://git.dotya.ml/dotya.ml/homepage/commit/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">commit {{ .GitInfo.AbbreviatedHash }}</a></p>
<p>&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }} &#183 <a href="https://git.dotya.ml/dotya.ml/homepage" title="source code" target="_blank" rel="noopener">source</a> &#183 <a href="https://status.dotya.ml" title="service status" target="_blank" rel="noopener">status</a>{{if .Site.Params.enableGitInfo}}<br/><a href="https://git.dotya.ml/dotya.ml/homepage/commit/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">commit {{ .GitInfo.AbbreviatedHash }}</a>{{end}}</p>
</footer>