Note: This tutorial is written for those who are unfamiliar with the use of git-driven publishing operations and are looking for a stepwise process to write tutorials. This tutorial will serve as the “standard” way to work with the git-ops process and while other ways exist to perform the same steps, any troubleshooting of the process followed will not be possible by the L&C Technical Advocacy team unless these steps are followed.
~/temp
, but usually put working code in ~/dev
or ~/src
. Once the folder is created, change into that directory and type git clone
, followed by a space and then use your OS’s “paste” functionality to place the URL on the terminal. Alternatively, you could type git clone https://github.com/CiscoLearning/cisco-learning-codelabs.git
main
branch of the repository. This can be seen by looking at the lower left of the VSCode window.main
icon, which will pop out a menu at the top center of the VSCode window. Select the Create new branch from… menu itemmain
branch that resides online.main
previously seen above).create_new_lab.sh
script. To execute this, we need to invoke the script from a terminal, which can be found inside of the VSCode window. To bring up a terminal, move your mouse to the bottom of the window, just above the status bar. An arrow pointing “up” and a blue line should appear. Click and drag up, and a terminal window will appear. It may look different from the colors below, depending on your editor theme).Execute the create_new_lab.sh
script by typing ./create_new_lab.sh
in the terminal window and press <RETURN>
. Follow the prompts on screen to provide a tutorial name (ideally the same as the branch name you used in previous steps). This will perform some basic linting, and then provide the path of the new directory that you can use to begin working on your tutorial.
Navigate to your newly created directory for the tutorial in the left pane of the editor. The new directory will be created under site/content/posts/<tutorial-name>
index.md
contained within the folder for your tutorial that was created in the previous step. If you select this file to bring it into the editor, you can preview the file by clicking on the two column icon with a magnifying glass. This will bring up a split pane view allowing you to preview the file as you edit it.git
to track and commit files, they need to be added to the stage. Click the + icon next to each of the changed files to add them to “Staged Changes”. Then add in a short commit message in the box at the top of the pane. Once these two items are complete, press the Commit button.git
can function locally without any remote server). Once the changes have been committed locally, the Commit button from the previous step will change to Publish Branch. By clicking this button, you will publish your local tutorial branch to the Github server under that same branch name.main
branch.git
workflow within VSCode. If you have any questions, reach out to a member of the Learning and Certifications Technical Advocacy team.