|
1 |
| -# Red Hat OpenShift Data Science Quick Course |
| 1 | +## Getting started with a new training content repository |
2 | 2 |
|
3 |
| -This is the starter template for creating a new quick course in the **RedHatQuickCourses** GitHub organization. |
| 3 | +- Open the [course-starter-template](https://github.com/RedHatQuickCourses/course-starter-template) |
4 | 4 |
|
5 |
| -After you create a new repository based on this template, you need to edit and change several files and replace placeholder text and links in them. |
| 5 | +- Click on `Use This template` button and select `Create a new repository` option. |
6 | 6 |
|
7 |
| -1. Add a _README_ at the root of your repository and leave instructions for people contributing to your quick course. Make sure you provide the link to the GitHub issues page for your course so that contributors and users can report issues and provide feedback about your course. |
| 7 | +- On `Create a new repository` page, Select the options as highlighted in the below image and then click `Create repository` button at the bottom of the page. |
8 | 8 |
|
9 |
| -1. Edit the **antora.yml** file in the repository root. |
10 |
| - * Change the _name_, _title_ and _version_ attributes |
11 |
| - * Edit the list of items under the _nav_ attribute to add or remove new chapters/modules to the course. |
| 9 | +- Clone this repository on your local system: |
| 10 | +``` |
| 11 | +git clone git@github.com:RedHatQuickCourses/my-training-repository.git |
| 12 | +``` |
| 13 | +NOTE: Use your repository url in the above command. |
12 | 14 |
|
13 |
| -1. Edit the antora-playbook.yml file in the repository root. |
14 |
| - * Edit only the _title_ and _start_page_ attributes in this file. You may not be required to change the other attributes unless the need arises. |
| 15 | +- Go in to the course repository directory and initialize the course. |
| 16 | +``` |
| 17 | +cd my-training-repository/ |
| 18 | +sh course-init.sh |
| 19 | +``` |
15 | 20 |
|
16 |
| -1. Edit the _supplemental-ui/partials/header-content.hbs_ file and change the link in the _navbar-item_ div to point to the GitHub issues page for your repository. |
| 21 | +Sample output: |
| 22 | +``` |
| 23 | +Initializing my-training-repository . . . done |
17 | 24 |
|
18 |
| -1. Edit the files and folders under the _modules_ folder to structure your course content into chapters/modules and sections. |
| 25 | +Please replace the specified strings in the files below and commit the changes before proceeding with the course development. |
| 26 | +antora.yml:title: REPLACE Course Title |
| 27 | +``` |
19 | 28 |
|
20 |
| -1. Take a brief look at the GitHub actions configuration in the _.github_ folder. It contains basic configuration to auto-generate HTML from the asciidoc source and render it using GitHub pages. Unless you know what you are doing with this, and have prior experience with GitHub actions workflows, do not change these files. |
| 29 | +- Edit the files prompted by course initialization script. |
21 | 30 |
|
22 |
| -## Problems and Feedback |
23 |
| -If you run into any issues, report bugs/suggestions/improvements about this template here - https://github.com/RedHatQuickCourses/course-starter/issues |
| 31 | +- Commit the changes done by course initialization script and your manual edits. |
| 32 | +``` |
| 33 | + git status |
| 34 | + git add -A; git commit -m "course initialization" |
| 35 | + git push origin main |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | +## Development using devspace |
| 40 | + |
| 41 | +- Make sure you have configured your `quay.io` credentials on the OpenShift Dev Spaces portal. |
| 42 | + |
| 43 | +- Click on `Log in with OpenShift` button. |
| 44 | + |
| 45 | +- Click on `my_htpasswd_provider` option. |
| 46 | + |
| 47 | +- On the next screen, provide your Username and Password for login. |
| 48 | + |
| 49 | +- On the `Authorize Access` page, under `Requested permissions`, mae sure `user:full` option is selected (ticked) and click on `Allow selected permissions` button. |
| 50 | + |
| 51 | +- Click your username on top right and click on `User Preferences` option. |
| 52 | + |
| 53 | +- On the `User Preferences` screen under `Container Registries` tab, click on `Add Container Registry` option. |
| 54 | + |
| 55 | +- On the Add Container Registry pop-up provide details as below and the click on `Add` Button. |
| 56 | + |
| 57 | +**Registry:** *quay.io* <br> |
| 58 | +**Username:** *your quay.io login* <br> |
| 59 | +**Password:** *your quai.io login* password <br> |
| 60 | + |
| 61 | + |
| 62 | +- Click on `Create Workspace` option on left pane. |
| 63 | +Under `Import from Git section, provide the Git repo URL for your training and click on `Create & Open` button. |
| 64 | + |
| 65 | +NOTE: Make sure you have initialized your training content repository and committed the changes before using it in the devspace. |
| 66 | + |
| 67 | +- Click on the search bar for Workspace on top and click on `Run Task` option, then click `devfile`. |
| 68 | + |
| 69 | +- Click on `0-install` option and wait for it to finish. |
| 70 | + |
| 71 | +- Repeat the earlier step to select devfile and click on `1-watch` option this time. |
| 72 | + |
| 73 | +- Repeat the same steps and select `2-serve` option now. |
| 74 | + |
| 75 | +- Pop-up will be displayed at the bottom of the screen. |
| 76 | + |
| 77 | +- Create `Open In New Tab` button. |
| 78 | + |
| 79 | +- On the next pop-up message: `Do you want VS Code - Open Source to open the external website?` click on `Open` button. |
| 80 | + |
| 81 | +- Rendered content will now be displayed in another tab. |
| 82 | + |
| 83 | +- You may continue with your content development in the `vscode` interface provided by devspace. |
| 84 | + |
| 85 | +- When you save your changes in the content files in devspace interface, the changes will be reflected in the rendered content url as soon as you refresh the url. |
| 86 | + |
| 87 | +## Guideline for editing your content |
| 88 | + |
| 89 | +- Browse in to the `modules` directory and edit `adoc` files under `pages` directory to add for your content. |
| 90 | + |
| 91 | +### Add new section in existing chapter |
| 92 | + |
| 93 | +- To create an additional section page, create an `adoc` file for your section page, in the chapter director. |
| 94 | +- Add new `xref` line for information about this new section page in `nav.adoc` file under the same chapter directory. |
| 95 | + |
| 96 | + |
| 97 | +### Add new chapter |
| 98 | + |
| 99 | +- For additional chapter, create a copy of an existing chapter directory. |
| 100 | +- Change `index.adoc` file with the heading for the new chapter. |
| 101 | + |
| 102 | +Note: You need to modify `antora.yml` file for the new chapter to reflect in your rendered content. |
0 commit comments