forked from coreos/fedora-coreos-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize Fedora CoreOS documentation.
- Loading branch information
sanja
committed
Feb 19, 2019
0 parents
commit 9663940
Showing
14 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build | ||
cache | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Fedora Docs Template | ||
|
||
This repository contains the Fedora CoreOS documentation. | ||
|
||
## Structure | ||
|
||
``` | ||
|-- README.md | ||
|-- antora.yml ....................... 1. | ||
|-- build.sh ......................... 2. | ||
|-- preview.sh ....................... 3. | ||
|-- site.yml ......................... 4. | ||
`-- modules | ||
`-- ROOT ......................... 5. | ||
|-- assets | ||
| `-- images ............... 6. | ||
| `-- * | ||
|-- nav.adoc ................. 7. | ||
`-- pages .................... 8. | ||
|-- * | ||
``` | ||
|
||
1. Metadata definition. | ||
2. A script that does a local build. Uses docker. | ||
3. A script that shows a preview of the site in a web browser by running a local web server. Uses docker. | ||
4. A definition file for the build script. | ||
5. A "root module of this documentation component". Please read below for an explanation. | ||
6. **Images** to be used on any page. | ||
7. **Menu definition.** Also defines the hierarchy of all the pages. | ||
8. **Pages with the actual content.** They can be also organised into subdirectories if desired. | ||
|
||
## Components and Modules | ||
|
||
Antora introduces two new terms: | ||
|
||
* **Component** — Simply put, a component is a part of the documentation website with its own menu. Components can also be versioned. In the Fedora Docs, we use separate components for user documentation, the Fedora Poject, Fedora council, Mindshare, FESCO, but also subprojects such as CommOps or Modulartity. | ||
* **Module** — A component can be broken down into multiple modules. Modules still share a single menu on the site, but their sources can be stored in different git repositories, even owned by different groups. The default module is called "ROOT" (that's what is in this example). If you don't want to use multiple modules, only use "ROOT". But to define more modules, simply duplicate the "ROOT" directory and name it anything you want. You can store modules in one or more git repositories. | ||
|
||
## Local preview | ||
|
||
This repo includes scripts to build and preview the contents of this repository. | ||
|
||
**NOTE**: Please note that if you reference pages from other repositories, such links will be broken in this local preview as it only builds this repository. If you want to rebuild the whole Fedora Docs site, please see [the Fedora Docs build repository](https://pagure.io/fedora-docs/docs-fp-o/) for instructions. | ||
|
||
Both scripts use docker, so please make sure you have it installed on your system. | ||
|
||
To build and preview the site, run: | ||
|
||
``` | ||
$ ./build.sh && ./preview.sh | ||
``` | ||
|
||
The result will be available at http://localhost:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Name will be mostly visible in the URL. Treat it as an indentifier. | ||
# 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: fedora-coreos # <---- PLEASE MODIFY | ||
|
||
# Title will be visible on the page. | ||
title: Fedora CoreOS # <---- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/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. | ||
docker run --rm -it -v $(pwd):/antora antora/antora --html-url-extension-style=indexify site.yml | ||
|
||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
# Running on Linux. | ||
# Let's assume that it's running the Docker deamon | ||
# which requires root. | ||
echo "" | ||
echo "This build script is using Docker to run the build in an isolated environment. You might be asked for a root password in order to start it." | ||
sudo docker run --rm -it -v $(pwd):/antora:z antora/antora --html-url-extension-style=indexify site.yml | ||
fi |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* xref:architecture.adoc[Architecture] | ||
** xref:community.adoc[Community] | ||
** xref:faq.adoc[FAQ] | ||
* xref:installation-guide.adoc[Installation Guide] | ||
* xref:introduction.adoc[Introduction] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= Fedora CoreOS Architecture | ||
|
||
* xref:introduction.adoc[Introduction] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
= Community |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= Frequently Asked Questions (FAQ) | ||
|
||
Incoming. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= Fedora CoreOS Documentation | ||
|
||
Welcome to the Fedora CoreOS documentation! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
= Installation Guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= Introduction | ||
|
||
== What is Fedora CoreOS? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)/public:/usr/share/nginx/html:ro -p 8080:80 nginx | ||
|
||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
# Running on Linux. | ||
# Let's assume that it's running the Docker deamon | ||
# which requires root. | ||
echo "" | ||
echo "This build script is using Docker to run the build in an isolated environment. You might be asked for a root password in order to start it." | ||
echo "The preview will be available at http://localhost:8080/" | ||
sudo docker run --rm -v $(pwd)/public:/usr/share/nginx/html:ro -p 8080:80 nginx | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
site: | ||
title: Local Preview | ||
start_page: fedora-coreos::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 |