Git Product home page Git Product logo

elixir-mix-task-asciidoc's Introduction

Asciidoc Mix Task

I've always really liked using Asciidoctor to generate internal documentation. While ex_doc is really great, I like the portability and available plugins for Asciidoctor. This is definitely not meant to replace ex_doc as it has it's place.

I'm also a big fan of PlantUML, so I've set the tasks to generate any included PlantUML files.

Mix tasks to clean, generate, and copy asciidoc generated documents.

This project is meant to be a starting point, so just copy it, and tweak for your own needs!

Requirements

  1. Docker
  2. An elixir project using Mix.
  3. rsync

Setup

  1. Copy asciidoc.ex to lib/mix/tasks
  2. Create a folder named asciidoc in the root of your project.
  3. Create asciidoc/index.adoc, and add some asciidoc markdown to it.

mix asciidoc.generate

This task will use the asciidoctor/docker-asciidoctor docker container to generate the output, so you don't need to install any asciidoctor libraries locally. It also has the ability to use many different plugins out of the box.

Output by default is HTML, but this can easily be modified to other output formants, just read up on Asciidoctor.

Output is sent to asciidoc/generated, so be sure to add this to your .gitignore file.

mix asciidoc.copy

This task will rsync generated output from asciidoc/generated/ to priv/static/asciidoc. If you're using a web framework like Phoenix, you'll need to add or configure a Plug.Static plug to serve the files.

mix asciidoc.clean

This task will remove asciidoc/generated and asciidoc/static/asciidoc

elixir-mix-task-asciidoc's People

Contributors

aglassman avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.