User Tools

Site Tools


evergreen-docs:how-to-contribute-documentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
evergreen-docs:how-to-contribute-documentation [2017/03/10 14:52] rjs7evergreen-docs:how-to-contribute-documentation [2022/04/04 15:22] – [Intermediate workflow] aneiman
Line 1: Line 1:
 ===== How to Contribute Documentation to the Repository ===== ===== How to Contribute Documentation to the Repository =====
  
-First of all, you are welcome to email the Documentation Listserv ([[open-ils-documentation@list.georgialibraries.org]]) with problems you find in the documentation.  However, we welcome you to participate in the process of improving things.  Below are various ways you can contribute your time and skills.+First of all, you are welcome to email the Documentation Listserv ([[evergreen-documentation@list.evergreen-ils.org]]) with problems you find in the documentation.  However, we welcome you to participate in the process of improving things.  Below are various ways you can contribute your time and skills.
  
-We use [[http://git-scm.com/|Git]] for version control on documentation. The official repository is housed on the Evergreen git server [[http://git.evergreen-ils.org/|git.evergreen-ils.org]].+We use [[http://git-scm.com/|Git]] for version control on documentation. The official repository is housed on the Evergreen git server [[http://git.evergreen-ils.org/?p=Evergreen.git;a=tree;f=docs;hb=HEAD|git.evergreen-ils.org]].
  
-**Note**: Changes to the official repository are processed into HTML, PDF and ePub nightly at 11pm. (see http://docs.evergreen-ils.org/)+**Note**: Changes to the official repository are processed into HTML daily at 1am. (see http://docs.evergreen-ils.org/)
  
-**Note**: **The documentation is now hosted in the main Evergreen git repository:** +==== Beginner workflow ====
-  * [[http://git.evergreen-ils.org/?p=working/Evergreen.git;a=tree;f=docs;hb=HEAD|http://git.evergreen-ils.org/?p=working/Evergreen.git;a=tree;f=docs;hb=HEAD]]+
  
-==== Quick Start for New Contributors ==== +  * Send your documentation changes in any format to the Documentation Interest Group (DIG) email list: <evergreen-documentation@list.evergreen-ils.org> 
-=== Beginner === +  * **Valuable contributions include:** 
- +    * Telling us about anything that seems wrong 
-  * Send your documentation changes in any format to the Documentation Interest Group (DIG) email list: <open-ils-documentation@list.georgialibraries.org> +    * Corrections of typos 
-  * Valuable contributions include: corrections of typos, corrected step-by-step instructions, updated screenshots, telling us of missing sections, etc+    * Corrected step-by-step instructions 
-  * Please include the following information in your email:+    * Updated screenshots 
 +    * Telling us of missing sections 
 +    * Etc
 +  * **Please include the following information in your email:**
     * URL of the documentation web page that needs to be updated     * URL of the documentation web page that needs to be updated
     * The part of the web page you are referring to (e.g. section heading, paragraph number, a nearby phrase, etc.)     * The part of the web page you are referring to (e.g. section heading, paragraph number, a nearby phrase, etc.)
  
-=== Intermediate ===+==== Beginner workflow with Launchpad ==== 
 +  * You may use Launchpad to report any errors or missing items you find in the documentation.  
 +    * Go to https://bugs.launchpad.net/evergreen/+filebug to sign up for a Launchpad account and report the problem. 
 +    * Add the tag "documentation" to your report.
  
-  * Login to GitHub (or create a free account) + 
-  Find the relevant file in the [[https://github.com/evergreen-library-system/Evergreen/tree/master/docs|GitHub repository]]+ 
 +==== Intermediate workflow ==== 
 + 
 +  - Login to GitHub (or create a free account) 
 +  Find the relevant file in the [[https://github.com/evergreen-library-system/Evergreen/tree/master/docs|GitHub repository]]
     * Look around until you find the content (note: the directories are mostly logically similar to the online docs table of contents sections, but may require some searching around)     * Look around until you find the content (note: the directories are mostly logically similar to the online docs table of contents sections, but may require some searching around)
-  Click the pencil ("Edit this file") icon to edit the file in your browser +  Click the pencil ("Edit this file") icon to edit the file in your browser **OR** If you are creating a new file, click the Add File button. Type in the file name. Make sure you are in the correct directory
-  * If you are creating a new file, click the //plus// symbol that displays to the right of file path.Type in the file name. {{:evergreen-docs:github-create.png}} +  Make your changes, using [[http://powerman.name/doc/asciidoc|correct AsciiDoc format]]. 
-  Make your changes, using [[http://powerman.name/doc/asciidoc|correct AsciiDoc format]]. +  **Test that your AsciiDoc syntax is correct.** This is not required for simple typo corrections. 
-  **Test that your AsciiDoc syntax is correct.** This is not required for simple typo corrections. +       PREVIEW as HTMLAny file on GitHub with the extension of ".adoc" should auto-display the HTML version of the file when previewed or saved. Then you can proofread your document and look for anything strange
-       Test by [[http://asciidoctor.org/docs/asciidoc-writers-guide/#where-else-is-asciidoc-rendered|creating a Gist]] and naming it ''filename.adoc''. This will display the HTML version of your file. Then you can proofread your document and look for anything strange. +       * Note that there is now an automatic checker in github that will build a test copy of your docs. Instructions on that are below
-  Type a message describing your change +  Type a message describing your change 
-  Click the "Propose file change" button +  Click the "Propose file change" button 
-  One of the developers will [[evergreen-docs:github-workflow|review your change]] and send you feedback+  - Click the green "Create pull request" button 
 +  - One of the developers will [[evergreen-docs:github-workflow|review your change]] and send you feedback
  
-<html><!-- THIS IS THE OLD STUFF, KEPT FOR REFERENCE ONLY+A variation of this workflow is described [[https://youtu.be/XiVjO_S0Y-s|in this YouTube video]]. 
 +An alternative of the above workflow using GitHub Desktop is [[https://docs.evergreen-ils.org/eg/docs/latest/shared/how_to_contribute_docs.html|here]]
  
-==== Getting started ==== +=== Automatic build checker ===
-  - Set up a [[https://github.com/signup/free|free github account]] +
-  - Send an email to the repository maintainer (<ysuarez@berklee.edu>) to request being added as a contributor+
  
-==== For minor changes (typos): Editing on github ==== +As of 2021, Evergreen'github repository contains a tool that will build a full Antora-ized copy of the docs whenever someone opens a github pulllrequest that includes documentation changes. You can download this copy and view it in your browser to make sure things like image files and internal links are operating correctly.
  
-//Editing files directly in github using the following procedures is not recommended for larger changes, but is useful for quick typo corrections and other minor edits. **Please be extra-careful to keep the XML formatting valid, as a mistake can prevent the chapter from updating** (don't touch any tags)! If you need to make major changes, either install git on your own machine (directions follow), or send changes to the DIG list.//+To access the test build file:
  
-  - Go to the github repository at [[https://github.com/evergreen-library-system/Evergreen]] +  - Click on an existing pull request 
-  - Choose the ''docs'' folder +  - Select the tab labelled "Checks" 
-  - Navigate to the file you would like to edit and click ''Edit this file''   +  - In the upper left, select the dropdown labelled "Artifacts" 
-  - Make changes, enter your change notes in the ''Commit'' message box and click ''Commit Changes'' +  - Click the file built-docs to download a zipped copy of the docs build 
-  Submit "pull request" to the Evergreen bug tracker on [[https://bugs.launchpad.net/evergreen|Launchpad]] +  - Unzip the file and double-click on index.html in the extracted folder. This will open preview version of the Antora docs pages in your browser. 
-    * Include your GitHub commit URL in the message +    * On Windows, the address bar will read <code>file:///C:/Users/<username>/Downloads/built-docs/docs/latest/shared/about_this_documentation.html</code> 
-    * Add "documentation" in the tags+    * You can search and navigate around the docs but note that the version dropdown doesn't currently work. 
 +  - Search for the file(s) you've added or changed, and click around them to make sure everything looks and works as expected.
  
 +Click on the image below to see a screencast of this process (credit: Jane Sandberg)
  
-==== Installing Git and registering SSH keys ====+{{:evergreen-docs:built-docs_1_.gif?direct&200|}}
  
-  * [[http://help.github.com/linux-set-up-git/|On Linux]] 
-  * [[http://help.github.com/win-set-up-git/|On Windows]] 
-  * [[http://help.github.com/mac-set-up-git|On Mac (OSX)]] 
  
---></html> +==== Advanced workflow ====
-==== Clone the repository ====+
  
-**Command line** (Linux, or GitBash on Windows):  +This workflow is primarily for the few DIG members with permission to push to the master repositoryIf you do not have permission yet, you can start the request process by contacting the Git Admins group <gitadmin@evergreen-ils.org>You can also push to another public repository, such as the Evergreen working repository or another host such as GitHub.  Then email the DIG email list <evergreen-documentation@list.evergreen-ils.org> with the location of your repository so they can pull your changes into master.
-  * Type ''git clone git:%%//%%git.evergreen-ils.org/Evergreen.git'' to create an initial copy of the repository on your machine. This will clone the whole Evergreen repository, which contains the **docs** directory where all the documentation lives.+
  
-**Graphical tool** (recommended if you are not comfortable with the command line+=== Command line version ===
-  * Install one of these recommended programs: http://git-scm.com/downloads/guis +
-  * Start the program. Look for something like "Clone Existing Repository". In "Source", put ''git:%%//%%git.evergreen-ils.org/Evergreen.git''; leave "Target" blank to use the default path, or enter something else (it creates a new directory, so don't use one that exists already). Click Clone.+
  
-==== Make and contribute changes (command line) ====+Use these procedures on Linux, Mac OS X, or GitBash on Windows. 
 + 
 +**First time only** 
 +  - Type ''git clone git:%%//%%git.evergreen-ils.org/Evergreen.git'' to create an initial copy of the repository on your machine. This will clone the whole Evergreen repository, which contains the **docs** directory where all the documentation lives. 
 +  - ''cd Evergreen/docs'' - Moves to the new directory you just cloned. 
 + 
 +If you aren't able to push to the documentation folder, try these troubleshooting steps: 
 +  - Open the ../.git/config file. 
 +  - Check the url listed for remote named //origin// It should be ''git@git.evergreen-ils.org:Evergreen.git'' Specifically, make sure that: 
 +    * The first occurrence of the word ''git'' is followed by the ''@'' symbol, not '':%%//%%'' 
 +    * Evergreen is preceded by a '':'', not a ''/'' 
 +    * The url ends with the ''.git'' file extension 
 + 
 + 
 +**Every time** 
 +  - ''%%git fetch --all%%'' 
 +  - ''git checkout master''
   - ''git pull'' - Pulls the most recent changes into your cloned version. This avoids merging issues and errors when "pushing" your changes to the remote repository.   - ''git pull'' - Pulls the most recent changes into your cloned version. This avoids merging issues and errors when "pushing" your changes to the remote repository.
   - Make changes to files, remove files, add new files   - Make changes to files, remove files, add new files
-  - ''a2x FILENAME -f=epub'' - Converts AsciiDoc text files to other file formats (such as ePub). This will give you errors if the AsciiDoc format is incorrect. Once it succeeds, delete the output files (e.g. ''rm *.epub'') to prevent them from being committed along with your AsciiDoc files.+ 
 +After you've made your changes, make sure that your documentation is included in the appropriate module(s).  To do this, make sure that there is a cross reference statement like ''%%**%% xref:acquisitions:acquisitions_search.adoc[Acquisitions Search]'' in the appropriate ''nav.adoc'' file (e.g. ''docs/modules/acquisitions/nav.adoc'' for the Acquisitions module). 
 + 
 +Then **test building the various output formats**.  The following examples use the Circulation manual, but you will want the filename ''root_circulation.adoc'' to match the manual you are trying to test. 
 + 
 +  ''asciidoc root_circulation.adoc'' - Converts AsciiDoc text files to HTML format This will give you errors if the AsciiDoc format is incorrect.  Once it succeeds, verify that the HTML appears as you expect.  Finally, delete the output files (e.g. ''rm *.html'') to prevent them from being committed along with your AsciiDoc files. 
 +  - ''%%a2x --fop root_circulation.adoc%%'' - Converts AsciiDoc text files to PDF format. Verify that the PDF appears as you expect.  Finally, delete the output files (e.g. ''rm *.pdf'') to prevent them from being committed along with your AsciiDoc files. 
 +  - ''%%a2x --format=epub root_circulation.adoc%%'' - Converts AsciiDoc text files to ePub format. Once it succeeds, delete the output files (e.g. ''rm *.epub'') to prevent them from being committed along with your AsciiDoc files. 
 + 
 +=== Build the Evergreen Documentation site locally === 
 + 
 +**This allows you to "see" your changes as presented/integrated into the full site with Evergreen's look and feel** 
 + 
 +  * More details located in the Evergreen code repository: docs/README.adoc 
 +  * Be sure and have Node installed. see [[https://github.com/nvm-sh/nvm#installation-and-update|Installing Node]] 
 +  * Once Node is installed, follow the Antora prereqs. Summarized from [[https://docs.antora.org/antora/2.3/install/linux-requirements/|Antora pre-reqs]] 
 +  * Now run generate_docs.pl 
 + 
 + 
 +^           generate_docs.pl options          ^^ 
 +| base-url | URL where html output is expected to be available eg: http://localhost | 
 +| tmp-space | Writable path for staging the antora UI repo and build files, defaults to ./build | 
 +| html-output | Path for the generated HTML files, defaults to ./output | 
 +| antora-ui-repo | Antora-UI repository for the built UI | 
 +| antora-version | Version of antora to use for build, defaults to 2.3 | 
 + 
 +  * Example: 
 +<code> 
 +$ cd Evergreen/docs 
 +$ ./generate_docs.pl 
 +--base-url http://localhost/prod \ 
 +--tmp-space ../../tmp \ 
 +--html-output /var/www/html/prod \ 
 +--antora-ui-repo git://git.evergreen-ils.org/eg-antora.git \ 
 +--antora-version 2.3 
 +</code> 
 + 
 +  * To view the site perfectly, you will need to have a web server running on your computer. 
 + 
 + 
 + 
 +When you are satisfied with your changes, commit the files. 
   - ''git add'' - Tells git that you have added or edited files on your local machine and want to add them into the repository. The changes are not committed yet.   - ''git add'' - Tells git that you have added or edited files on your local machine and want to add them into the repository. The changes are not committed yet.
-  - ''git commit path/FILENAME'' **OR** ''git commit path/FILENAME -"[what you changed]"'' - Commits changes to the repository. **note on what you changed is mandatory.** If you use the shorter form, a text editor will open (usually [[http://www.vim.org/|vim]]) where you will write your change note. (Using the -m switch is a time-saver if your note is short) //To commit all changes, use ''git commit .''//+  - ''git status'' - Check to make sure that you are committing the correct files. 
-   - ''git push''If you are one of the few DIG members with permission to push to the master repositorydo so using your SSL passphrase. After pushing your changes you should see them show up at the [[http://git.evergreen-ils.org/?p=Evergreen.git;a=tree;h=refs/heads/master;hb=refs/heads/master|master repository]]. If you do not have permission yetyou can start the request process by contacting the Git Admins group <gitadmin@evergreen-ils.org>You can also push to another public repositorysuch as the Evergreen working repository or another host such as GitHub.  Then email the DIG email list <open-ils-documentation@list.georgialibraries.orgwith the location of your repository so they can pull your changes into master+  - ''git commit -s'' **OR** ''git commit -sm "Docs: [what you changed]"'' - Commits changes to the repository. **You must provide a note on what you changed, beginning with the phrase "Docs: ".** If you use the shorter form, a text editor will open (usually [[http://www.vim.org/|vim]]) where you will write your change note. (Using the -m switch is a time-saver if your note is short) //To commit all changes, use ''git commit .''//
-  +   - ''git push'' 
 +   ''git log -3'' - Shows the 3 most recent commits.  Check to make sure that your commit: 
 +      * has a clear message that describes your change 
 +      * has a signoff 
 + 
 +After you have committed to master 
 +  - ''git checkout [BRANCH]'' - you will probably also want to add your change to the documentation for all relevant versions.  For example, if you are documenting a feature that was added to version 3.2, you will want to add it to the 3.2 documentation.  Release branches are in the form ''rel_3_2'', so for our example, you would type ''git checkout rel_3_2''
 +  - ''git pull'' - if this branch has changed since the last time you ran this command. 
 +  - ''git cherry-pick [NUMBER OF COMMIT]'' - if you didn't note the number of the commit, run ''git checkout master; git log -3'' to find it Then be sure to return to this branch with ''git checkout [BRANCH]''. 
 +  - ''git push'' 
 + 
 +If you are committing change that somebody else made: 
 +  - ''%%git commit -s --author="Firstname Lastname <email@domain.com>"%%'' 
 +  - Add a commit message that begins with "Docs:" 
 + 
 +If you try to push your changebut somebody has changed the Evergreen in the repo in the meantime, you will get this error: 
 + 
 +<code> 
 +error: failed to push some refs to 'https://git.evergreen-ils.org/REPOSITORY.git' 
 +To prevent you from losing historynon-fast-forward updates were rejected 
 +Merge the remote changes (e.g. 'git pull') before pushing again.  See the 
 +'Note about fast-forwards' section of 'git push --help' for details. 
 +</code> 
 + 
 +If this happens, you just have to run ''git pull --rebase'', which should bring in the latest changes and put your commit on top.  After this, you can just repeat your ''git push'' command
 + 
 + 
 +=== Graphical tool version === 
 + 
 +These procedures are recommended if you are not comfortable with the command line.   
 + 
 +**First time only** 
 +  - Install one of these recommended programs: http://git-scm.com/downloads/guis 
 +  - Start the program. Look for something like "Clone Existing Repository". In "Source", put ''git:%%//%%git.evergreen-ils.org/Evergreen.git''; leave "Target" blank to use the default path, or enter something else (it creates a new directory, so don't use one that exists already). Click Clone.
  
-==== Make and contribute changes (Graphical tool of your choice) ====+**Every time**
   - Start your graphical git tool. Open the Evergreen repository you cloned earlier.   - Start your graphical git tool. Open the Evergreen repository you cloned earlier.
   - Select: Remote -> Fetch From -> origin   - Select: Remote -> Fetch From -> origin
Line 86: Line 181:
   - With your changed files highlighted, click "Stage Changed" to tell Git you want to add the changes to the repository. The changes are not committed yet. Files will display under the green "Staged Changes" section.   - With your changed files highlighted, click "Stage Changed" to tell Git you want to add the changes to the repository. The changes are not committed yet. Files will display under the green "Staged Changes" section.
   - To commit (a step that confirms your intention to make changes to the public repository), first type a note on what you changed in the "Commit Message" box. **A note is mandatory.** Then click the "Commit" button.   - To commit (a step that confirms your intention to make changes to the public repository), first type a note on what you changed in the "Commit Message" box. **A note is mandatory.** Then click the "Commit" button.
-  - Finally, push your changes to the remote repository by clicking "Push." A dialog box will open with the default settings (source branch master, remote origin). Click "Push". If you are one of the few DIG members with permission to push to the master repository, you will need to enter your SSL passphrase. If you do not have permission yet, you can start the request process by contacting the Git Admins group <gitadmin@evergreen-ils.org>. You can also push to another public repository, such as the Evergreen working repository or another host such as GitHub.  Then email the DIG email list <open-ils-documentation@list.georgialibraries.org> with the location of your repository so they can pull your changes into master.+  - Finally, push your changes to the remote repository by clicking "Push." A dialog box will open with the default settings (source branch master, remote origin). Click "Push". If you are one of the few DIG members with permission to push to the master repository, you will need to enter your SSL passphrase. If you do not have permission yet, you can start the request process by contacting the Git Admins group <gitadmin@evergreen-ils.org>. You can also push to another public repository, such as the Evergreen working repository or another host such as GitHub.  Then email the DIG email list <evergreen-documentation@list.evergreen-ils.org> with the location of your repository so they can pull your changes into master.
   - If you get "Error: Command Failed," changes may have been made by someone else since you last pulled a copy of the master file. The text in the box will say that "non-fast-forward updates were rejected." Click Close, do a fetch and merge (or a pull, which does both), and push again.   - If you get "Error: Command Failed," changes may have been made by someone else since you last pulled a copy of the master file. The text in the box will say that "non-fast-forward updates were rejected." Click Close, do a fetch and merge (or a pull, which does both), and push again.
   - Once your changes are pushed to master, you should see them show up in the [[http://git.evergreen-ils.org/?p=Evergreen.git;a=tree;h=refs/heads/master;hb=refs/heads/master|master repository]].   - Once your changes are pushed to master, you should see them show up in the [[http://git.evergreen-ils.org/?p=Evergreen.git;a=tree;h=refs/heads/master;hb=refs/heads/master|master repository]].
  
  
evergreen-docs/how-to-contribute-documentation.txt · Last modified: 2023/06/01 12:13 by gmcharlton

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.