Gem Version License Build Status

Purpose

Ceradoc is a parser, model, and serializer for AsciiDoc documents.

It provides a complete toolchain for working with AsciiDoc:

  • Parsing - Convert AsciiDoc text into a structured document model

  • Manipulation - Modify document content through Ruby objects

  • Serialization - Generate AsciiDoc output from document models

  • Round-tripping - Parse and serialize while preserving semantic meaning

Ceradoc uses Parslet for parsing and lutaml-model for model definition, providing a robust foundation for AsciiDoc document processing.

Quick Start

# Parse AsciiDoc input
doc = Ceradoc.parse("== Hello World\n\nThis is a paragraph.")

# Access document structure
doc.header.title                    # => "Hello World"
doc.sections.first.title.level_int  # => 2

# Serialize back to AsciiDoc
output = doc.to_adoc

Documentation Collections

This documentation is organized into four collections to help you find what you need:

Core Pages (Conceptual Documentation)

Foundational documentation about Ceradoc’s architecture and features:

Tutorials (Step-by-Step Learning)

Learn Ceradoc through hands-on tutorials:

Guides (Task-Oriented Guides)

Solve specific problems with focused guides:

References (Technical Specifications)

Detailed technical specifications:

Key Features

Installation

Add this line to your application’s Gemfile:

gem 'ceradoc'

And then execute:

bundle install

Or install it yourself as:

gem install ceradoc

This site uses Just the Docs, a documentation theme for Jekyll.