local-workflow-update #58

Merged
pbokoc merged 10 commits from egret/team-docs:local-docscontrib into main 2026-05-30 10:52:13 +00:00
2 changed files with 16 additions and 9 deletions
Showing only changes of commit f0942dd442 - Show all commits

change-requests1

Eli Ridge 2026-05-29 23:53:10 +12:00

View file

@ -1,7 +1,7 @@
= Edit Documentation Using a Local Workflow
egret marked this conversation as resolved

The title is really clunky. How about "Edit documentation locally"?

The title is really clunky. How about "Edit documentation locally"?
:revdate: 2026-04-01
:page-pagination:
Jocelyn G and Eli R
Jocelyn Gould (korora) and Eli Ridge (egret)
This guide will show you how to set up a local documentation editing environment on your computer, using a local clone.
@ -25,6 +25,7 @@ For explanations and references on the Fedora Docs tooling, please visit the xre
+
In Fedora Linux, you can check that _git_ is installed by running the following command:
+
[source,console]
----
$ dnf install git
----
@ -37,7 +38,7 @@ It is beneficial, but not essential, if your text editor has integrated file nav
1. *Create a local subdirectory* where your local clone will be stored.
The example uses the name "fedora-docs" but you can use any name.
+
[source,]
[source,console]
----
mkdir ~/fedora-docs
cd ~/fedora-docs
@ -49,7 +50,8 @@ Click the Fork button on the top-right corner of the project page:
+
image::fork-button.png[]
+
egret marked this conversation as resolved
https://asciidoctor.org/docs/asciidoc-recommended-practices/#one-sentence-per-line
If prompted, enter the details to create your new fork. The default values are suitable in most cases.
If prompted, enter the details to create your new fork.
The default values are suitable in most cases.
3. Configure your Forge access token and clone your remote fork to your computer.
Follow the xref:forge-documentation::using_http_auth.adoc[How to clone a Forge repo using the HTTPS] guide to complete this.
@ -58,11 +60,12 @@ Follow the xref:forge-documentation::using_http_auth.adoc[How to clone a Forge r
You will need this to fetch updates from the upstream main docs repo.
+
----
git remote add upstream https://forge.fedoraproject.org/docs/team-docs.git
git remote add upstream https://forge.fedoraproject.org/docs/<name-of-upstream-repo>.git
----
+
Verify it with:
+
[source,console]
----
git remote -v
----
@ -123,7 +126,8 @@ The above layout allows you to quickly select files, make edits, and issue git a
The _docsbuilder_ script uses Podman to build a preview of your docs pages in an isolated container.
. In the terminal, navigate to your project folder. Run the _docsbuilder_ script by entering this command:
. In the terminal, navigate to your project folder.
Run the _docsbuilder_ script by entering this command:
+
----
./docsbuilder.sh
@ -144,7 +148,8 @@ Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...
.. Save the .adoc file you have been editing and observe the script complete again.
.. Refresh the browser window.
NOTE: On MacOS, the _docsbuilder_ script uses Docker instead of Podman. You can install Docker from the official https://www.docker.com/[Docker Website].
NOTE: On MacOS, the _docsbuilder_ script uses Docker instead of Podman.
You can install Docker from the official https://www.docker.com/[Docker Website].
See xref:contributing-docs/tools-edit-local-clone.adoc#_the_docsbuilder_script_and_podman[here] for further information on the docsbuilder script.
@ -184,7 +189,7 @@ You are now ready to open a pull request (PR).
* [ ] Metadata and author tags entered.
* [ ] Tested and previewed using the ./docsbuilder script.
* [ ] Tested and previewed using the s/docsbuilder/docsbuilder.sh/ script.
== Opening a pull request
@ -200,4 +205,5 @@ There is no requirement to install Antora or any other web development tools on
Podman is an open source container tool similar to Docker.
When you run the docsbuilder.sh script, Podman will download the Antora parser to your local machine as a container.
Once you are done with the container, if you wish to remove it, simply run ``podman image rm antora``.
There is no harm in leaving the container on your system if you are working on a lot of docs. This will allow you to save some bandwidth on the hosting server for the image.
There is no harm in leaving the container on your system if you are working on a lot of docs.
This will allow you to save some bandwidth on the hosting server for the image.

View file

@ -3,7 +3,8 @@ Fedora Documentation Team <https://discussion.fedoraproject.org/tag/docs-team>
:revdate: 2024-08-30
:page-pagination:
IMPORTANT: Many of the repositories have now been migrated to https://forge.fedoraproject.org[Fedora Forge]. See the updated xref:contributing-docs/tools-file-edit-forge.adoc[Edit from a local clone] guide.
IMPORTANT: Many of the repositories have now been migrated to https://forge.fedoraproject.org[Fedora Forge].
egret marked this conversation as resolved

Missed this one :P

Missed this one :P
See the updated xref:contributing-docs/tools-file-edit-forge.adoc[Edit from a local clone] guide.
[abstract]
In a local environment, you can create or edit your documents offline. You use a local git repository that contains a complete set of documents and tools to edit. After editing is complete, preview them in a local build of Docs pages. It is by far the most flexible way of working with Docs repositories, enabled by the extensive adaptation to individual work routines and work equipment. A local writing environment allows full access to all the resources you routinely use on your workstation and is therefore perfectly adaptable to your style of working. It is particularly suitable for the creation of a completely new set of documentation on a topic or for revision of an existing set of documentation. This article takes an example of the Fedora project repositories in GitLab, but the overall process can be translated for Pagure and GitHub projects.