From 2b31b07bbdc4e602b19b09e8f1aeb1d33761fb47 Mon Sep 17 00:00:00 2001 From: Lacey Williams Henschel Date: Tue, 30 May 2023 13:58:43 -0700 Subject: [PATCH] :construction: WIP asciidoc --- core/management/commands/test_asciidoctor.py | 12 +++++++++ docker/Dockerfile | 3 +++ sample.adoc | 28 ++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 core/management/commands/test_asciidoctor.py create mode 100644 sample.adoc diff --git a/core/management/commands/test_asciidoctor.py b/core/management/commands/test_asciidoctor.py new file mode 100644 index 00000000..a2345080 --- /dev/null +++ b/core/management/commands/test_asciidoctor.py @@ -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}!") diff --git a/docker/Dockerfile b/docker/Dockerfile index 1bfff582..13ef2a63 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,6 +25,9 @@ RUN apt update && apt install -y git libpq-dev ruby ruby-dev && rm -rf /var/lib/ # Install Asciidoctor RUN gem install asciidoctor +# 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 diff --git a/sample.adoc b/sample.adoc new file mode 100644 index 00000000..dea2c0f5 --- /dev/null +++ b/sample.adoc @@ -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[]