Actual dev.libre.is examples. Formatting

This commit is contained in:
Jeff Moe 2024-09-01 07:54:22 -06:00
parent fb634cde3a
commit 4b276161dd
2 changed files with 128 additions and 78 deletions

View file

@ -19,49 +19,53 @@ Initial setup
sudo apt install python3-certbot-apache gettext make sudo apt install python3-certbot-apache gettext make
# If LaTeX builds are to be used: # If LaTeX builds are to be used:
sudo apt install texlive-full sudo apt install texlive-full
sudo certbot -d muh-domain.foobar sudo certbot -d dev.libre.is
sudo mkdir /var/www/html/muh-domain.foobar sudo mkdir /var/www/html/dev.libre.is
sudo chown -R muhuser:muhuser /var/www/html sudo chown -R jebba:jebba /var/www/html
Apache Apache
====== ======
Apache configuration.
.. code-block:: apache
.. code-block:: sh <VirtualHost 70.39.110.154:80>
ServerName dev.libre.is
<VirtualHost 192.168.1.1:80>
ServerName muh-domain.foobar
ServerAdmin webmaster@localhost ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/muh-domain.foobar DocumentRoot /var/www/html/dev-libre-is
ErrorLog ${APACHE_LOG_DIR}/error-muh-domain.foobar.log ErrorLog ${APACHE_LOG_DIR}/error-dev-libre-is.log
CustomLog ${APACHE_LOG_DIR}/access-muh-domain.foobar.log combined CustomLog ${APACHE_LOG_DIR}/access-dev-libre-is.log combined
RewriteEngine on RewriteEngine on
RewriteCond %{SERVER_NAME} =muh-domain.foobar RewriteCond %{SERVER_NAME} =dev.libre.is
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost> </VirtualHost>
<VirtualHost 192.168.1.1:443> <VirtualHost 70.39.110.154:443>
ServerName muh-domain.foobar ServerName dev.libre.is
ServerAdmin webmaster@localhost ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/muh-domain.foobar DocumentRoot /var/www/html/dev-libre-is
ErrorLog ${APACHE_LOG_DIR}/error-muh-domain.foobar.log ErrorLog ${APACHE_LOG_DIR}/error-dev-libre-is.log
CustomLog ${APACHE_LOG_DIR}/access-muh-domain.foobar.log combined CustomLog ${APACHE_LOG_DIR}/access-dev-libre-is.log combined
RewriteEngine on RewriteEngine on
ErrorDocument 404 /en/404.html ErrorDocument 404 /en/404.html
Include /etc/letsencrypt/options-ssl-apache.conf Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/muh-domain.foobar/fullchain.pem SSLCertificateFile /etc/letsencrypt/live/dev.libre.is/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/muh-domain.foobar/privkey.pem SSLCertificateKeyFile /etc/letsencrypt/live/dev.libre.is/privkey.pem
</VirtualHost> </VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Docs repo setup Docs repo setup
=============== ===============
Initial setup like below.
At the bottom is a mini-HOWTO to build the site now that the repo already
exists.
.. code-block:: sh .. code-block:: sh
mkdir muhproject mkdir dev-libre-is
cd muhproject/ cd dev-libre-is/
mkdir -p docs/_source/locale docs/_build docs/_source/_templates mkdir -p docs/_source/locale docs/_build docs/_source/_templates
mkdir -p docs/_source/_static/ mkdir -p docs/_source/_static/
python -m venv venv python -m venv venv
@ -70,7 +74,7 @@ Docs repo setup
Create poetry file `pyproject.toml`: Create poetry file `pyproject.toml`:
.. code-block:: sh .. code-block:: toml
# pyproject.toml # pyproject.toml
@ -101,6 +105,7 @@ Create poetry file `pyproject.toml`:
# packages = [ # packages = [
# { include = "foocode" }, # { include = "foocode" },
# ] # ]
package-mode = false
[tool.poetry.dependencies] [tool.poetry.dependencies]
polib = "*" polib = "*"
@ -171,7 +176,7 @@ Create poetry file `pyproject.toml`:
Perhaps a `.gitignore` like: Perhaps a `.gitignore` like:
.. code-block:: sh .. code-block:: cfg
log log
tmp tmp
@ -184,13 +189,15 @@ Perhaps a `.gitignore` like:
*.pyc *.pyc
*.pyd *.pyd
*.swp *.swp
*.pyo *.pyo
_build/ _build/
__pycache__/ __pycache__/
Makefile, etc.
.. code-block:: sh Makefile
========
.. code-block:: makefile
# Makefile # Makefile
@ -291,10 +298,10 @@ Makefile, etc.
Copy over an appropriate license file to the repo, such as `LICENSE-apache.txt`. Copy over an appropriate license file to the repo, such as `LICENSE-apache.txt`.
Set up `docs/index.html` docs/index.html
======================== ===============
.. code-block:: sh .. code-block:: html
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -324,10 +331,10 @@ Set up `docs/index.html`
</html> </html>
Set up docs/Makefile docs/Makefile
==================== =============
.. code-block:: sh .. code-block:: makefile
SPHINXOPTS ?= SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build SPHINXBUILD ?= sphinx-build
@ -343,43 +350,50 @@ Set up docs/Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Create `docs/_source/index.rst` docs/_source/index.rst
=============================== ======================
Example file.
.. code-block:: sh .. code-block:: RST
========== ==============================
muhproject Libre Developers Documentation
========== ==============================
muhproject is an fooooooo.
Libre developers documentation.
* All the things * All the things
.. toctree:: .. toctree::
about about
source libre-is
code-libre-is
dev-libre-is
docs-libre-is
forms-libre-is
mail-libre-is
license license
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
Create other `docs/_source/about.rst` or aother appropriate files. Create other `docs/_source/about.rst` or other appropriate files.
Set up `docs/_source/conf.py` docs/_source/conf.py
============================= ====================
.. code-block:: sh .. code-block:: python
import sys, os import sys, os
import sphinx.util.logging import sphinx.util.logging
sys.path.append("../../src/muhproject") sys.path.append("../../src/dev-libre-is")
logger = sphinx.util.logging.getLogger(__name__) logger = sphinx.util.logging.getLogger(__name__)
project = "muhproject: very project" project = "dev-libre-is: very project"
copyright = "2024, Muh Author Name" copyright = "2024, Muh Author Name"
author = "Muh Author Name" author = "Muh Author Name"
version = "0" version = "0"
@ -451,7 +465,7 @@ Set up templates
File `docs/_source/_templates/layout.html` File `docs/_source/_templates/layout.html`
.. code-block:: sh .. code-block:: html
{% extends "!layout.html" %} {% extends "!layout.html" %}
@ -463,7 +477,7 @@ File `docs/_source/_templates/layout.html`
If LaTex is to be used, `docs/_source/_templates/latex.tex` If LaTex is to be used, `docs/_source/_templates/latex.tex`
.. code-block:: sh .. code-block:: latex
{% extends 'article.tpl' %} {% extends 'article.tpl' %}
@ -476,7 +490,7 @@ If LaTex is to be used, `docs/_source/_templates/latex.tex`
Set up `docs/_source/_static/custom.css` Set up `docs/_source/_static/custom.css`
======================================== ========================================
.. code-block:: sh .. code-block:: css
div.footer-wrapper { div.footer-wrapper {
display: none; display: none;

View file

@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Libre Developers Documentation 0\n" "Project-Id-Version: Libre Developers Documentation 0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-31 15:16-0600\n" "POT-Creation-Date: 2024-09-01 07:53-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n" "Language: en\n"
@ -48,87 +48,123 @@ msgstr ""
msgid "Apache" msgid "Apache"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:28
msgid "Apache configuration."
msgstr ""
#: ../../../_source/dev-libre-is.rst:59 #: ../../../_source/dev-libre-is.rst:59
msgid "Docs repo setup" msgid "Docs repo setup"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:71 #: ../../../_source/dev-libre-is.rst:60
msgid "Initial setup like below."
msgstr ""
#: ../../../_source/dev-libre-is.rst:62
msgid ""
"At the bottom is a mini-HOWTO to build the site now that the repo already"
" exists."
msgstr ""
#: ../../../_source/dev-libre-is.rst:75
msgid "Create poetry file `pyproject.toml`:" msgid "Create poetry file `pyproject.toml`:"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:172 #: ../../../_source/dev-libre-is.rst:177
msgid "Perhaps a `.gitignore` like:" msgid "Perhaps a `.gitignore` like:"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:191 #: ../../../_source/dev-libre-is.rst:198
msgid "Makefile, etc." msgid "Makefile"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:291 #: ../../../_source/dev-libre-is.rst:298
msgid "" msgid ""
"Copy over an appropriate license file to the repo, such as `LICENSE-" "Copy over an appropriate license file to the repo, such as `LICENSE-"
"apache.txt`." "apache.txt`."
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:295 #: ../../../_source/dev-libre-is.rst:302
msgid "Set up `docs/index.html`" msgid "docs/index.html"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:328 #: ../../../_source/dev-libre-is.rst:335
msgid "Set up docs/Makefile" msgid "docs/Makefile"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:347 #: ../../../_source/dev-libre-is.rst:354
msgid "Create `docs/_source/index.rst`" msgid "docs/_source/index.rst"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:367 #: ../../../_source/dev-libre-is.rst:355
msgid "Create other `docs/_source/about.rst` or aother appropriate files." msgid "Example file."
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:371 #: ../../../_source/dev-libre-is.rst:381
msgid "Set up `docs/_source/conf.py`" msgid "Create other `docs/_source/about.rst` or other appropriate files."
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:450 #: ../../../_source/dev-libre-is.rst:385
msgid "Set up templates" msgid "docs/_source/conf.py"
msgstr ""
#: ../../../_source/dev-libre-is.rst:452
msgid "File `docs/_source/_templates/layout.html`"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:464 #: ../../../_source/dev-libre-is.rst:464
msgid "Set up templates"
msgstr ""
#: ../../../_source/dev-libre-is.rst:466
msgid "File `docs/_source/_templates/layout.html`"
msgstr ""
#: ../../../_source/dev-libre-is.rst:478
msgid "If LaTex is to be used, `docs/_source/_templates/latex.tex`" msgid "If LaTex is to be used, `docs/_source/_templates/latex.tex`"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:477 #: ../../../_source/dev-libre-is.rst:491
msgid "Set up `docs/_source/_static/custom.css`" msgid "Set up `docs/_source/_static/custom.css`"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:490 #: ../../../_source/dev-libre-is.rst:504
msgid "Images" msgid "Images"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:492 #: ../../../_source/dev-libre-is.rst:506
msgid "Add a `favicon.ico` and `logo.png` to `docs/_source/_static/`" msgid "Add a `favicon.ico` and `logo.png` to `docs/_source/_static/`"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:494 #: ../../../_source/dev-libre-is.rst:508
msgid "" msgid ""
"If spreadsheet is going to be used/imported, add to here " "If spreadsheet is going to be used/imported, add to here "
"`docs/_source/_static/` these files:" "`docs/_source/_static/` these files:"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:496 #: ../../../_source/dev-libre-is.rst:510
msgid "`handsontable.full.min.css` and `handsontable.full.min.js`" msgid "`handsontable.full.min.css` and `handsontable.full.min.js`"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:510 #: ../../../_source/dev-libre-is.rst:524
msgid "Build" msgid "Build"
msgstr "" msgstr ""
#: ../../../_source/dev-libre-is.rst:511 #: ../../../_source/dev-libre-is.rst:525
msgid "HOWTO build this site." msgid "HOWTO build this site."
msgstr "" msgstr ""
#~ msgid "Makefile, etc."
#~ msgstr ""
#~ msgid "Set up `docs/index.html`"
#~ msgstr ""
#~ msgid "Set up docs/Makefile"
#~ msgstr ""
#~ msgid "Create `docs/_source/index.rst`"
#~ msgstr ""
#~ msgid "Create other `docs/_source/about.rst` or aother appropriate files."
#~ msgstr ""
#~ msgid "Set up `docs/_source/conf.py`"
#~ msgstr ""