🚧 WIP asciidoc

This commit is contained in:
Lacey Williams Henschel
2023-05-30 13:58:43 -07:00
parent 3e6ae221b4
commit 97505d6f85
5 changed files with 47 additions and 1 deletions

View File

View File

View File

@@ -0,0 +1,12 @@
import djclick as click
import subprocess
@click.command()
@click.argument("source_file", type=click.Path(exists=True))
@click.argument("destination_file", type=click.Path())
def command(source_file, destination_file):
"""Runs Asciidoctor to convert an AsciiDoc file to HTML"""
click.echo(f"Running Asciidoctor on {source_file}...")
subprocess.run(["asciidoctor", "-o", destination_file, source_file], check=True)
click.echo(f"Converted {source_file} to HTML at {destination_file}!")

View File

@@ -2,7 +2,10 @@
FROM python:3.11-slim AS builder-py
RUN apt update && apt install -y build-essential gcc python-dev libpq-dev postgresql-client && rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y build-essential gcc python-dev libpq-dev postgresql-client ruby ruby-dev && rm -rf /var/lib/apt/lists/*
# Install Asciidoctor
RUN gem install asciidoctor
RUN pip install -U pip
@@ -19,6 +22,9 @@ FROM python:3.11-slim AS release
RUN apt update && apt install -y git libpq-dev && rm -rf /var/lib/apt/lists/*
# Copy Asciidoctor binary from builder stage
COPY --from=builder-py /usr/local/bin/asciidoctor /usr/local/bin/
ENV PATH /venv/bin:/bin:/usr/bin:/usr/local/bin
ENV PYTHONDONTWRITEBYTECODE=true
ENV PYTHONPATH /code

28
sample.adoc Normal file
View File

@@ -0,0 +1,28 @@
= Boost Style Guide
This document outlines the style guidelines for the site-docs. Adhering to these
guidelines will help ensure consistency and cohesion across all pages of the website.
== UI Controls
[disc]
* Boost Mustard
** only use for one or two key top level headings.
** never on inactive UI controls
** OK to use for hover state
** never use large areas of this color in illustrations
** never used as an endpoint of a color blend
* The word "Boost" should occur no more than one time on the page
** Not counting the logo in the top nav
** And never twice on the same line
** User-generated content is excepted of course
* The word "C++" should occur no more than once on a page
Except user-generated content
* Per-library links (e.g. GitHub or docs) show a schemeless URL:
image::url-style-guide-image.png[]