mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
🚧 WIP asciidoc
This commit is contained in:
0
core/management/__init__.py
Normal file
0
core/management/__init__.py
Normal file
0
core/management/commands/__init__.py
Normal file
0
core/management/commands/__init__.py
Normal file
12
core/management/commands/test_asciidoctor.py
Normal file
12
core/management/commands/test_asciidoctor.py
Normal 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}!")
|
||||
@@ -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
28
sample.adoc
Normal 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[]
|
||||
Reference in New Issue
Block a user