mirror of
https://github.com/hugomods/docker.git
synced 2025-04-25 20:51:18 +03:00
feat: add AsciiDoc and Pandoc support for exts
tags [build] (#73)
This commit is contained in:
parent
e1eba0073d
commit
81720c1549
8 changed files with 71 additions and 17 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -205,6 +205,14 @@ jobs:
|
|||
env:
|
||||
IMAGE_PREFIX: ${{ matrix.prefix }}
|
||||
|
||||
- name: Test Extra Markdown Handlers
|
||||
if: steps.check.outputs.exists == 'false' &&
|
||||
contains(fromJson('["exts-"]'), matrix.prefix)
|
||||
run: |
|
||||
docker run --rm -v $PWD/site:/src hugomods/hugo:test hugo --config config.yaml,config-markdown-handlers.yaml
|
||||
env:
|
||||
IMAGE_PREFIX: ${{ matrix.prefix }}
|
||||
|
||||
- name: Check Git installation
|
||||
if: |
|
||||
steps.check.outputs.exists == 'false' &&
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
# syntax = edrevo/dockerfile-plus
|
||||
INCLUDE+ ./Dockerfile-builder
|
||||
|
||||
FROM node:alpine as node
|
||||
|
||||
FROM alpine:edge
|
||||
|
||||
COPY --from=node /usr/lib /usr/lib
|
||||
COPY --from=node /usr/local/lib /usr/local/lib
|
||||
COPY --from=node /usr/local/include /usr/local/include
|
||||
COPY --from=node /usr/local/bin /usr/local/bin
|
||||
INCLUDE+ ./snippets/exts
|
||||
|
||||
INCLUDE+ ./snippets/go
|
||||
|
||||
INCLUDE+ ./snippets/git
|
||||
|
||||
INCLUDE+ ./snippets/exts
|
||||
|
||||
INCLUDE+ ./snippets/common
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
FROM node:alpine as node
|
||||
|
||||
FROM alpine:edge
|
||||
|
||||
COPY --from=node /usr/lib /usr/lib
|
||||
COPY --from=node /usr/local/lib /usr/local/lib
|
||||
COPY --from=node /usr/local/include /usr/local/include
|
||||
COPY --from=node /usr/local/bin /usr/local/bin
|
||||
|
||||
# install Embedded Dart SASS.
|
||||
RUN apk add dart-sass --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
|
||||
RUN apk add --no-cache dart-sass
|
||||
|
||||
# install packages.
|
||||
# install extra Markdown handlers
|
||||
RUN apk add --no-cache \
|
||||
asciidoctor \
|
||||
pandoc-cli
|
||||
|
||||
# install Node.js packages.
|
||||
RUN npm i -g postcss-cli autoprefixer @fullhuman/postcss-purgecss rtlcss
|
||||
|
|
1
site/config-markdown-handlers.yaml
Normal file
1
site/config-markdown-handlers.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
cascade:
|
|
@ -1,6 +0,0 @@
|
|||
baseURL = 'http://example.org/'
|
||||
languageCode = 'en-us'
|
||||
title = 'Hugo Example Site'
|
||||
|
||||
[security.funcs]
|
||||
getenv = ['^HUGO_', '^CI$', '^IMAGE_PREFIX$']
|
23
site/config.yaml
Normal file
23
site/config.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
baseURL: 'http://example.org/'
|
||||
languageCode: en-us
|
||||
title: Hugo Example Site
|
||||
cascade:
|
||||
- _target:
|
||||
path: /{adoc,pandoc}
|
||||
build:
|
||||
list: never
|
||||
render: never
|
||||
security:
|
||||
funcs:
|
||||
getenv:
|
||||
- ^HUGO_
|
||||
- ^CI$
|
||||
- ^IMAGE_PREFIX$
|
||||
exec:
|
||||
allow:
|
||||
- ^(dart-)?sass(-embedded)?$
|
||||
- ^go$
|
||||
- ^npx$
|
||||
- ^postcss$
|
||||
- ^asciidoctor$
|
||||
- ^pandoc$
|
18
site/content/adoc/index.adoc
Normal file
18
site/content/adoc/index.adoc
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: AsciiDoc
|
||||
---
|
||||
|
||||
= Hello, AsciiDoc!
|
||||
|
||||
This is an interactive editor.
|
||||
Use it to try https://asciidoc.org[AsciiDoc].
|
||||
|
||||
== Section Title
|
||||
|
||||
* A list item
|
||||
* Another list item
|
||||
|
||||
[,ruby]
|
||||
----
|
||||
puts 'Hello, World!'
|
||||
----
|
5
site/content/pandoc/index.pandoc
Normal file
5
site/content/pandoc/index.pandoc
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Pandoc
|
||||
---
|
||||
|
||||
*Hello* world!
|
Loading…
Add table
Add a link
Reference in a new issue