Skip to content

Commit

Permalink
feat!: add Asciidoctor and remove Markdown support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this update brings major refactoring related to
support of Asciidoctor toolchain:
- updated converter functions to support Asciidoctor
- removed Markdown from parsers, functions and unit tests
- updated payloads of the directory traversal and file content functions
- updated validation schemas
- updated build and serve scripts
- refactored unit tests for Asciidoctor
- updated css styles
- updated Dockerfile
- removed action to push repo README to Docker hub
- updated package.json description
- removed unused dependencies

Closes (#42) (#46)
  • Loading branch information
bandantonio committed Aug 13, 2022
1 parent 70b1065 commit bf38496
Show file tree
Hide file tree
Showing 35 changed files with 1,174 additions and 1,287 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/antmarky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,3 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

- name: 🐋 📝 DockerHub description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_ALT_TOKEN }}
repository: bandantonio/antmarky
short-description: ${{ github.event.repository.description }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:17.4.0-alpine3.14 as build
LABEL VERSION="1.0.0"
LABEL VERSION="1.1.0"
LABEL MAINTAINER="Anton Zolotukhin"
LABEL NAME="Antmarky is a static-site generator for Markdown"
LABEL NAME="Antmarky is a static-site generator for Asciidoctor"

WORKDIR /antmarky
COPY package.json server.js README.md ./
COPY package.json server.js README.adoc ./
RUN npm i
COPY . .

Expand Down
64 changes: 64 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
== Antmarky

Antmarky is a static-site generator for https://docs.asciidoctor.org/asciidoc/latest[`Asciidoctor`^] based on Node.js and EJS.

https://github.com/bandantonio/antmarky/actions/workflows/antmarky.yml[image:https://github.com/bandantonio/antmarky/actions/workflows/antmarky.yml/badge.svg?branch=main[antmarky]^]
https://coveralls.io/github/bandantonio/antmarky?branch=main[image:https://coveralls.io/repos/github/bandantonio/antmarky/badge.svg?branch=main[Coverage
Status]^]
image:https://img.shields.io/docker/pulls/bandantonio/antmarky[Docker
Pulls]
https://github.com/standard/semistandard[image:https://img.shields.io/badge/code%20style-semistandard-f7df1e.svg[js-semistandard-style]^]

The main idea behind creating Antmarky was to have a generator with _zero configuration_ that can serve your Asciidoctor files
in the documentation directory.

Consider Antmarky as a lightweight alternative to https://docs.antora.org/antora/latest/[Antora^].

Currently, Antmarky flattens out the directory structure and displays all the files at the root level under the
corresponding directory.

=== Features

* Zero configuration
* Fully responsive layout
* Fully static (doesn't require a web server to work)
* No language frameworks included
* Support of major Asciidoctor features:
** https://docs.asciidoctor.org/asciidoc/latest/directives/include/[Includes^]
** https://docs.asciidoctor.org/asciidoc/latest/directives/conditionals/[Conditionals^]
** https://docs.asciidoctor.org/asciidoc/latest/tables/build-a-basic-table/[Tables^]
** https://docs.asciidoctor.org/asciidoc/latest/blocks/admonitions/[Admonitions^]
* xref:features.adoc#fontawesome[FontAwesome]
* Copy code block

=== Quickstart

==== Prerequisites

* https://docs.docker.com/get-docker/[Docker^]

==== Serve content

[source,sh]
----
docker run --rm \
--name antmarky-ssg \
-v ${PWD}/docs:/antmarky/docs \
-p 8000:8000 \
bandantonio/antmarky
----

Local server will be launched at http://localhost:8000[^]

==== Build content

[source,sh]
----
docker run --rm \
--name antmarky-ssg \
-v ${PWD}/docs:/antmarky/docs \
-v ${PWD}/public:/antmarky/public \
bandantonio/antmarky build
----

Website static files will be generated in the `public` directory.
63 changes: 0 additions & 63 deletions README.md

This file was deleted.

58 changes: 58 additions & 0 deletions docs/features.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
== Features

=== Admonitions

Supported admonitions: `NOTE`, `TIP`, `IMPORTANT`, `CAUTION`, `WARNING`.

[NOTE]
====
[source, md]
----
NOTE: Note admonition body
----
====

[TIP]
====
[source, md]
----
TIP: Tip admonition body
----
====

[IMPORTANT]
====
[source, md]
----
IMPORTANT: Important admonition body
----
====

[CAUTION]
====
[source, md]
----
CAUTION: Caution admonition body
----
====

[WARNING]
====
[source, md]
----
WARNING: Warning admonition body
----
====

=== FontAwesome

Antmarky supports https://fontawesome.com/v4/cheatsheet/[FontAwesome v4.7^] for compatibility reasons.

To use icons in the document, use the following syntax:

[source, plaintext]
----
icon:bicycle[] is good for your icon:heart[]
----

This will be rendered as: icon:bicycle[] is good for your icon:heart[]
160 changes: 0 additions & 160 deletions docs/features.md

This file was deleted.

Loading

0 comments on commit bf38496

Please sign in to comment.