initial template

This commit is contained in:
Troy Dawson 2021-07-21 08:48:28 -07:00
commit 5136d9e607
17 changed files with 186 additions and 0 deletions

10
LICENSE Normal file
View file

@ -0,0 +1,10 @@
The text of and illustrations in this document are licensed by Red Hat
under a Creative Commons AttributionShare Alike 3.0 Unported license
("CC-BY-SA"). An explanation of CC-BY-SA is available at
http://creativecommons.org/licenses/by-sa/3.0/. In accordance with
CC-BY-SA, if you distribute this document or an adaptation of it, you
must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to
enforce, and agrees not to assert, Section 4d of CC-BY-SA to the
fullest extent permitted by applicable law.

16
antora.yml Normal file
View file

@ -0,0 +1,16 @@
# Name will be mostly visible in the URL. Treat it as an identifier.
# Tip: If you want to use the local preview scripts that come with this repository, please change this value in the site.yml file as well. (under site/start_page)
name: pizza-factory # <---- PLEASE MODIFY
# Title will be visible on the page.
title: Pizza Factory # <---- PLEASE MODIFY
# If you don't plan to have multiple versions of the docs (for example, to document multiple versions of some software), you can ignore this field. Otherwise, change "master" to a specific version.
version: master
# We encourage you to name the index page as "index.adoc". If you absolutely have to use a different name, please reflect it here. You can ignore this field otherwise.
start_page: ROOT:index
# This lists all the menu definitions of your component.
nav:
- modules/ROOT/nav.adoc

46
build.sh Executable file
View file

@ -0,0 +1,46 @@
#!/bin/sh
image="docker.io/antora/antora"
cmd="--html-url-extension-style=indexify site.yml"
if [ "$(uname)" = "Darwin" ]; then
# Running on macOS.
# Let's assume that the user has the Docker CE installed
# which doesn't require a root password.
echo ""
echo "This build script is using Docker container runtime to run the build in an isolated environment."
echo ""
docker run --rm -it -v "$(pwd):/antora" $image $cmd
elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then
# Running on Linux.
# Check whether podman is available, else fall back to docker
# which requires root.
if [ -f /usr/bin/podman ]; then
echo ""
echo "This build script is using Podman to run the build in an isolated environment."
echo ""
podman run --rm -it -v "$(pwd):/antora:z" $image $cmd
elif [ -f /usr/bin/docker ]; then
echo ""
echo "This build script is using Docker to run the build in an isolated environment."
echo ""
if groups | grep -wq "docker"; then
docker run --rm -it -v "$(pwd):/antora:z" $image $cmd
else
echo ""
echo "This build script is using $runtime to run the build in an isolated environment. You might be asked for your password."
echo "You can avoid this by adding your user to the 'docker' group, but be aware of the security implications. See https://docs.docker.com/install/linux/linux-postinstall/."
echo ""
sudo docker run --rm -it -v "$(pwd):/antora:z" $image $cmd
fi
else
echo ""
echo "Error: Container runtime haven't been found on your system. Fix it by:"
echo "$ sudo dnf install podman"
exit 1
fi
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

View file

@ -0,0 +1,9 @@
This is an example of a example file. Unlike files in `pages/`, files in this directory are not built as standalone pages, but only if they are included in a file within `pages/`. Also unlike examples,
A file in this directory can be included within any file in the `pages/` directory.
Most common use cases for examples is using output from an external script (for example, translation string statistics) in docs. You can use an external script to update the example, and when the site is rebuilt, it will show updated output.
If you want to include this particular example somewhere, you can use the following syntax: `include::example$example-example.adoc[]`.
Note the use of `example$` instead of an actual file location.
See link:https://docs.antora.org/antora/3.0/examples-directory/[Antora docs on examples] for more information about partials.

5
modules/ROOT/nav.adoc Normal file
View file

@ -0,0 +1,5 @@
* xref:architecture.adoc[Architecture]
** xref:pizza-oven.adoc[Pizza Oven]
** xref:pizza-dough.adoc[Pizza Dough]
* xref:community.adoc[Community]
* xref:faq.adoc[FAQ]

View file

@ -0,0 +1,3 @@
= Pizza Factory Architecture
The architecture of our pizza factory is quite simple. We bake our very expensive xref:pizza-dough.adoc[pizza dough] in a very cheap xref:pizza-oven.adoc[pizza oven]. This way, we can achieve a mediocre result for a high price and a reasonable number of failures.

View file

@ -0,0 +1,3 @@
= Pizza Factory Community
Our community is basically the same as the community of Fedora Docs. That's mostly because this is a template for new pieces of the Fedora Docs.

View file

@ -0,0 +1,7 @@
= Frequently Asked Questions (FAQ)
[qanda]
Can I see a built preview of this template to get a better idea about the result?::
Of course you can! Just look at the README of the repository — it should tell you everything.
Is writing documentation hard and dreadful?::
Absolutely not. Writing documentation in asciidoc is very simple and straightforward. And in fact, writing documentation makes you very happy. Just try and see for yourself!

View file

@ -0,0 +1,13 @@
include::partial$attributes.adoc[]
= The Pizza Project
John Doe; Jane Doe
:page-authors: {author}, {author_2}
The Pizza Project is a useful project with a very bad name — it helps you with writing some new documentation for Fedora.
In fact, this is just a source template for a new piece of the Fedora Docs.
image::pizza.png[Pizza]
Last updated in {year}.

View file

@ -0,0 +1,3 @@
= Pizza Dough Architecture
I would never thought that a pizza dough can have an architecture. Yet here we are.

View file

@ -0,0 +1,3 @@
= Pizza Oven Architecture
Pizza oven architecture would be described on this page. Since this is just a template, I choose to disappoint you and not describe the pizza oven architecture.

View file

@ -0,0 +1 @@
:year: 2021

View file

@ -0,0 +1,15 @@
This is an example of a partial file. Unlike files in `pages/`, files in this directory are not built as standalone pages, but only if they are included in a file within `pages/`. This stops fragments of pages being built and discovered by search engines.
A file in this directory can be included within any file in the `pages/` directory.
Most common use cases for partials are:
. Reusing attributes such as the current year or a release version throughout the entire module while being able to change it easily (such as changing "Fedora 33" to "Fedora 34" when a new release comes out).
. Reusing content such a banner or an infobox (`[NOTE]`, etc.) that appears on multiple pages and needs to have consistent content everywhere (such as a message on some of the quick-docs that warns the reader about their unreviewed status).
In these cases, you can use a partial to include the same content in multiple places, and you only need to change it once to get the change to appear in every spot it's included in. You can see the first example used in `pages/index.adoc` in this repository; note the include statement on top.
If you want to include this particular example somewhere, you can use the following syntax: `include::partial$partial-example.adoc[]`.
Note the use of `partial$` instead of an actual file location.
See link:https://docs.antora.org/antora/3.0/partials-directory/[Antora docs on partials] for more information about partials.

14
nginx.conf Normal file
View file

@ -0,0 +1,14 @@
server {
listen 80;
server_name localhost;
location / {
root /antora/public;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

18
preview.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
if [ "$(uname)" = "Darwin" ]; then
# Running on macOS.
# Let's assume that the user has the Docker CE installed
# which doesn't require a root password.
echo "The preview will be available at http://localhost:8080/"
docker run --rm -v "$(pwd):/antora:ro" -v "$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro" -p 8080:80 nginx
elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then
# Running on Linux.
# Fedora Workstation has python3 installed as a default, so using that
echo ""
echo "The preview is available at http://localhost:8080"
echo ""
cd ./public
python3 -m http.server 8080
fi

20
site.yml Normal file
View file

@ -0,0 +1,20 @@
site:
title: Local Preview
start_page: pizza-factory::index
content:
sources:
- url: .
branches: HEAD
ui:
bundle:
url: https://asamalik.fedorapeople.org/ui-bundle.zip
snapshot: true
default_layout: with_menu
output:
clean: true
dir: ./public
destinations:
- provider: archive
runtime:
pull: true
cache_dir: ./cache