This template is offered to help create new repositories and kickstart your documentation process. It includes boilerplate text for a well-structured README. As a convenience, it also includes a placeholder README for what visitors to your repository will see while work is still in progess. See the placeholder screenshot below.
Why? Why another README template when so many README templates already exist? This README is written in AsciiDoc markup, instead of Markdown. The syntax is very similar to markdown and easy to learn. Documents written in AsciiDoc markup are more easily converted to HTML5, PDF, EPUB, and other formats.
Asciidoc is a more powerful markup language designed for more complex content. Asciidoc uses a more extensive syntax than Markdown, allowing you to create more advanced formatting elements such as tables, footnotes, and cross-references. All without the headaches of inconsistent implementations frequently found with Markdown. For writing high-quality documentation, it just works.
AsciiDoc is simply plain-text. You can author documents in your favorite text editor of choice, such as Visual Studio Code with a proper extension, or any derivative of VIM (Neovim, VimR). If you’re just getting started with AsciiDoc, you may want to try AsciidocFX, until the markup syntax becomes second nature to you. The choice is yours.
-
Asciidoctor - a fast text processor and publishing toolchain for converting AsciiDoc content to other formats.
-
AsciidocFX - a book / document editor to build PDF, Epub, Mobi and HTML books, documents, and slides.
Follow these procedures to set up a local repository for your project.
These procedures utilize the GitHub CLI and assume you are hosting your repository on GitHub. Select the procedure which matches your operating system.
ℹ️
|
This assumes the Homebrew package manager is already installed. |
Copy & paste the following into the terminal window and press Return
.
brew install gh
You may now proceed to Clone This Repository.
You may open either a Command Prompt, PowerShell, or Windows Terminal.
Copy & paste the following into the PowerShell window and press Return
.
winget install --id GitHub.cli
You may now proceed to Clone This Repository.
The GitHub CLI is available for a variety of Linux distributions.
===== Debian, Ubuntu Linux, Raspberry Pi OS (APT)
Open a terminal window. Copy & paste the following into the terminal window and press Return
. You may be prompted to enter your password.
sudo apt update
sudo apt install gh -y
Open a terminal. Copy & paste the following into the terminal window and hit Return
. You may be prompted to enter your password.
sudo dnf install gh
You may now proceed to Clone This Repository.
This repository is available on GitHub as a template repository. As a convenience, the branches within this repository include a boilerplate README, as well as a placeholder README. To ensure your repository includes these branches, you’ll need to create your repository using the GitHub CLI. The following procedure will clone and create a local copy of this repository.
-
Launch your terminal.
-
Change Working Directory:
Change your working directory to the location where you want to create the local repository. Use thecd
command and replaceWORKING_DIRECTORY
with the path to the directory of your choice:cd WORKING_DIRECTORY
-
Authenticate with GitHub:
If you haven’t already authenticated with GitHub CLI, run the following command and follow the prompts:gh auth login
-
Create a Local Clone from a Template Repository:
Use thegh rep create
command with the--template
option to create a clone of a template repository. Use the--clone
option to create a local clone. Use the--public
option to make the new repostory public, or use the--internal
or--private
options instead. Use the--include-all-branches
option to include all branches from the template repository. ReplaceNEW_REPO_NAME
with a name of your choice. ReplaceTEMPLATE_OWNER
with the template repository owner’s username or organization, andTEMPLATE_REPO
with the template repository name:gh repo create --clone --public --include-all-branches MY_NEW_REPO --template TEMPLATE_OWNER/TEMPLATE_REPO
For example:
gh repo create --clone --public --include-all-branches my-new-repo --template JoeArauzo/AsciiDoc-README-Template
You should see output similar to the following:
Created repository YOUR_USERNAME/my-new-repo on GitHub Cloning into 'my-new-repo'
-
Navigate to the Local Repository:
Change your working directory to the newly created local repository:cd NEW_REPO_NAME
The following instructions are provided as a way to get started with setting up your new repository.
ℹ️
|
This assumes git is already installed and configured on your system. |
Your new repository includes the boilerplate text you’re reading here. Create a branch so you can use this text as a starting point for authoring your own README.
-
Create a Branch:
Continuing from your local repository, use thegit checkout
command with the-b
option to create and switch to the new branch in one step. ReplaceNEW_BRANCH_NAME
with the name of your choice:git checkout -b NEW_BRANCH_NAME
For example:
git checkout -b docs/readme-draft
-
Push the New Branch to Remote:
Push the new branch to the remote repository (e.g., GitHub), using the following command:git push origin docs/readme-draft
Now you can proceed to personalize this README for your own needs. Additional instructions will be provided below to get your personalized README to show up on GitHub. Unitl ready, a placeholder README can be used.
A README placehholder can be displayed on GitHub until your own README is ready. The use of a placholder is a good practice, by providing visitors with a hint of what’s in store. This template includes a branch with a placholder you can personalize for your own needs.
-
Checkout the README Placeholder branch:
Use thegit checkout
command to switch to the branch with the placholder README.git checkout docs/readme-placeholder
-
Personalize the README Placeholder:
Modify the README placeholder by editing the file and with your preferred metadata, title, description and optional link.= <Enter the Project Title> :doctype: article :description: <Enter a short description of the project> :license-type: <enter license type> :author: Author Name :email: [email protected] :revnumber: v0.1 :revdate: 2021-01-01
💡The example listed above is only a starting point for personalizing the README. Take a close look at the lines within to ensure you replace all the placeholder values. For example, don’t forget to modify the HTML code near the top of the README which is used to work around a display issue on GitHub. -
Commit Changes:
You now have changes in the README placeholder that you must commit before proceeding.git commit -am "docs(readme): personalize placeholder"
-
Push the Placeholder Branch to Remote:
Push the changes to the remote repository (e.g., GitHub), using:git push origin docs/readme-placeholder
-
Merge Placeholder into Main Branch:
To display the README placeholder on GitHub, you must merge the placeholder branch into the main branch. Use the the following commands:git checkout main rm readme.adoc git rm readme.adoc git commit -am "docs(readme): purge readme" git merge docs/readme-placeholder -m "docs(readme): merge branch 'docs/readme-placeholder'" --allow-unrelated-histories
-
Push the Changes:
Push the changes so they show up in GitHub.git push
Your personalized README placeholder is now displayed on GitHub.
After you’ve displayed the README placeholder on GitHub, you can resume work on your README on the docs/readme-draft
branch. Follow these steps.
-
Checkout the README Draft branch:
Use thegit checkout
command to switch to the branch with the README draft.git checkout docs/readme-draft
-
Personalize your README Draft:
Make whatever changes you want to the readme.adoc file, then commit those changes.git commit -am "docs(readme): personalize draft"
-
Merge README Draft into Main Branch:
Use the following commands:git checkout main rm readme.adoc git rm readme.adoc git commit -am "docs(readme): purge readme" git merge docs/readme-draft -m "docs(readme): merge branch 'docs/readme-draft'" --allow-unrelated-histories
-
Push the Changes:
Push the changes so they show up in GitHub.git push
Your README draft is now merged into the main branch and displayed on GitHub.
For more AsciiDoc examples, please refer to the Documentation.
See the open issues for a list of proposed features (and known issues).
-
Clone repo and create a new branch:
$ git checkout https://github.com/JoeArauzo/AsciiDoc-README-Template -b name_for_new_branch
. -
Make changes and test.
-
Submit Pull Request with comprehensive description of changes.
See CHANGELOG.
Author Name - [email protected]
Project Link: https://github.com/JoeArauzo/AsciiDoc-README-Template