From c7bf0b96007514d97636c40f2eba840c659ad720 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Fri, 3 Dec 2021 13:57:59 -0800 Subject: [PATCH] Just the code I used for #9 Meta: I used pygmentize to generate the pygmentized html output. % pygmentize -o test-rtd-yaml.html test-rtd.yaml --- examples/mockups/command-rtd.sh | 3 + examples/mockups/css/emacs.css | 62 +++++ examples/mockups/product-dev.html | 343 ++++++++++++++++++++++++++++ examples/mockups/test-1.html | 4 + examples/mockups/test-rtd-yaml.html | 29 +++ examples/mockups/test-rtd.yaml | 28 +++ 6 files changed, 469 insertions(+) create mode 100644 examples/mockups/command-rtd.sh create mode 100644 examples/mockups/css/emacs.css create mode 100644 examples/mockups/product-dev.html create mode 100644 examples/mockups/test-1.html create mode 100644 examples/mockups/test-rtd-yaml.html create mode 100644 examples/mockups/test-rtd.yaml diff --git a/examples/mockups/command-rtd.sh b/examples/mockups/command-rtd.sh new file mode 100644 index 00000000..09a6e1d4 --- /dev/null +++ b/examples/mockups/command-rtd.sh @@ -0,0 +1,3 @@ +% pygmentize .readthedocs.yml + +[pygmentize rtd.yml output] diff --git a/examples/mockups/css/emacs.css b/examples/mockups/css/emacs.css new file mode 100644 index 00000000..d30e8e49 --- /dev/null +++ b/examples/mockups/css/emacs.css @@ -0,0 +1,62 @@ +.codehilite .hll { background-color: #ffffcc } +.codehilite .c { color: #7e7e7e; font-style: italic } /* Comment */ +.codehilite .err { border: 1px solid #FF0000 } /* Error */ +.codehilite .k { color: #AA22FF; font-weight: bold } /* Keyword */ +.codehilite .o { color: #666666 } /* Operator */ +.codehilite .cm { color: #7e7e7e; font-style: italic } /* Comment.Multiline */ +.codehilite .cp { color: #7e7e7e } /* Comment.Preproc */ +.codehilite .c1 { color: #7e7e7e; font-style: italic } /* Comment.Single */ +.codehilite .cs { color: #7e7e7e; font-weight: bold } /* Comment.Special */ +.codehilite .gd { color: #A00000 } /* Generic.Deleted */ +.codehilite .ge { font-style: italic } /* Generic.Emph */ +.codehilite .gr { color: #FF0000 } /* Generic.Error */ +.codehilite .gh { color: #aaf; font-weight: bold } /* Generic.Heading */ +.codehilite .gi { color: #00A000 } /* Generic.Inserted */ +.codehilite .go { color: #808080 } /* Generic.Output */ +.codehilite .gp { color: #aaf; font-weight: bold } /* Generic.Prompt */ +.codehilite .gs { font-weight: bold } /* Generic.Strong */ +.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.codehilite .gt { color: #0040D0 } /* Generic.Traceback */ +.codehilite .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */ +.codehilite .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */ +.codehilite .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */ +.codehilite .kp { color: #AA22FF } /* Keyword.Pseudo */ +.codehilite .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */ +.codehilite .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */ +.codehilite .m { color: #666666 } /* Literal.Number */ +.codehilite .s, .codehilite .s a, .codehilite .s a:link, .codehilite .s a:visited , .codehilite .s a:hover, .codehilite .s a:active { color: #F99070; text-decoration: none; } /* Literal.String */ +.codehilite .s a { border-bottom: 1px dashed #f99070; } +.codehilite .na { color: #F99070 } /* Name.Attribute */ +.codehilite .nb { color: #AA22FF } /* Name.Builtin */ +.codehilite .nc { color: #0000FF } /* Name.Class */ +.codehilite .no { color: #880000 } /* Name.Constant */ +.codehilite .nd { color: #AA22FF } /* Name.Decorator */ +.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.codehilite .nf { color: #00A000 } /* Name.Function */ +.codehilite .nl { color: #A0A000 } /* Name.Label */ +.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.codehilite .nv { color: #B8860B } /* Name.Variable */ +.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.codehilite .w { color: #bbbbbb } /* Text.Whitespace */ +.codehilite .mf { color: #666666 } /* Literal.Number.Float */ +.codehilite .mh { color: #666666 } /* Literal.Number.Hex */ +.codehilite .mi { color: #666666 } /* Literal.Number.Integer */ +.codehilite .mo { color: #666666 } /* Literal.Number.Oct */ +.codehilite .sb { color: #F99070 } /* Literal.String.Backtick */ +.codehilite .sc { color: #F99070 } /* Literal.String.Char */ +.codehilite .sd { color: #F99070; font-style: italic } /* Literal.String.Doc */ +.codehilite .s2 { color: #F99070 } /* Literal.String.Double */ +.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.codehilite .sh { color: #F99070 } /* Literal.String.Heredoc */ +.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.codehilite .sx { color: #008000 } /* Literal.String.Other */ +.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */ +.codehilite .s1 { color: #F99070 } /* Literal.String.Single */ +.codehilite .ss { color: #B8860B } /* Literal.String.Symbol */ +.codehilite .bp { color: #AA22FF } /* Name.Builtin.Pseudo */ +.codehilite .vc { color: #B8860B } /* Name.Variable.Class */ +.codehilite .vg { color: #B8860B } /* Name.Variable.Global */ +.codehilite .vi { color: #B8860B } /* Name.Variable.Instance */ +.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/examples/mockups/product-dev.html b/examples/mockups/product-dev.html new file mode 100644 index 00000000..91cab66e --- /dev/null +++ b/examples/mockups/product-dev.html @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + +
+ +
+ +
+
+

Developer driven documentation

+
+
+ +
+
+ +
+
+ + +
Welcome!
+
+% cd project/docs/
+
+~/project/docs % pygmentize README.rst
+
+ + + +
Getting Started
+===============
+
+Welcome! To start contributing documentation, you will need the following:
+
+Sphinx
+    Sphinx is a documentation engine that support writing documentation in
+    reStructuredText and Markdown. Sphinx is `easy to install`_, just run:
+
+    .. code:: console
+
+        % pip install '.[docs]'
+
+Using Read the Docs
+-------------------
+
+Read the Docs is configured to automatically enable new hosted versions on each
+release we tag, you shouldn't need to change anything. Read the Docs is
+configured using the ``.readthedocs.yaml`` file, which is configured to install
+all of our standard dependencies used to generate our `api docs`_.
+
+Building docs
+-------------
+
+To test the documentation locally, just run Sphinx:
+
+.. code:: console
+
+    % sphinx-build -t html . build/
+
+And the documentation output should be available at `/build/html/index.html`_.
+
+Viewing on Read the Docs
+------------------------
+
+Our production documentation is hosted at https://docs.example.com/en/1.0,
+however you can also see the docs for the upcoming release at
+https://docs.example.com/en/dev (ask for access to RTD if you can't view this
+version).
+
+If you have an account with RTD, you can also view builds on `each pull
+request`_.  You notice the build checks on each pull request. Click the status
+for Read the Docs to see the build output from the pull request.
+
+ + + +
% pygmentize .readthedocs.yml
+
+ + +
# This is the Read the Docs configuration file. This file support per-version configuration
+# of our project. This file is required in each active branch, to configure the build process
+# and all of our dependencies
+#
+# For more information on the RTD configuration file, see:
+# https://docs.readthedocs.io/en/stable/config/v3/
+version: 2
+
+# We need PDF and ePUB output for several customers
+formats:
+  - epub
+  - pdf
+
+# We're using the latest Python for our project, and so also require this for
+# our documentation. All of our dependencies are installed to build our API
+# documentation.
+# You can read more here:
+# https://docs.readthedocs.io/en/stable/something/something/
+build:
+  os: ubuntu-20.04
+  tools:
+    python: "3.10"
+
+python:
+  install:
+    - pip: '.'
+
+search:
+  ranking:
+    # Our tutorials are our most helpful content, make sure users find this
+    # first when searching
+    tutorials/*: +5
+
+ + + +
+~/project/docs % git tag -a 2.0.0
+~/project/docs % git push --tags
+
+ +
+
+ + + + + + + + + diff --git a/examples/mockups/test-1.html b/examples/mockups/test-1.html new file mode 100644 index 00000000..4d7ef4fd --- /dev/null +++ b/examples/mockups/test-1.html @@ -0,0 +1,4 @@ +
% pygmentize .readthedocs.yml
+
+[pygmentize rtd.yml output]
+
diff --git a/examples/mockups/test-rtd-yaml.html b/examples/mockups/test-rtd-yaml.html new file mode 100644 index 00000000..0d5be45b --- /dev/null +++ b/examples/mockups/test-rtd-yaml.html @@ -0,0 +1,29 @@ +
# This is the Read the Docs configuration file. This file support per-version configuration
+# of our project. This file is required in each active branch, to configure the build process
+# and all of our dependencies
+#
+version: 2
+
+# We need PDF and ePUB output for several customers
+formats:
+  - epub
+  - pdf
+
+# We're using the latest Python for our project, and so also require this for
+# our documentation. All of our dependencies are installed to build our API
+# documentation.
+build:
+  os: ubuntu-20.04
+  tools:
+    python: "3.10"
+
+python:
+  install:
+    - pip: '.'
+
+search:
+  ranking:
+    # Our tutorials are our most helpful content, make sure users find this
+    # first when searching
+    tutorials/*: +5
+
diff --git a/examples/mockups/test-rtd.yaml b/examples/mockups/test-rtd.yaml new file mode 100644 index 00000000..18699265 --- /dev/null +++ b/examples/mockups/test-rtd.yaml @@ -0,0 +1,28 @@ +# This is the Read the Docs configuration file. This file support per-version configuration +# of our project. This file is required in each active branch, to configure the build process +# and all of our dependencies +# +version: 2 + +# We need PDF and ePUB output for several customers +formats: + - epub + - pdf + +# We're using the latest Python for our project, and so also require this for +# our documentation. All of our dependencies are installed to build our API +# documentation. +build: + os: ubuntu-20.04 + tools: + python: "3.10" + +python: + install: + - pip: '.' + +search: + ranking: + # Our tutorials are our most helpful content, make sure users find this + # first when searching + tutorials/*: +5