Skip to content

Simplify

Jun Matsushita requested to merge simplify into master

Hi @SteveWyshy

This contains more changes related to activist-apprentice#3 (closed) which help completely get rid of the metadata frontmatter by identifying titles automatically. I also have partially completed the transformation into kebab-case and with headings that make sense (always follow # with ## and so on).

Please review the changes and approve them. I've setup this repo to use a merge request approval workflow that would be similar to a recomended workflow for a content repo with editorial approval.

For the below, make sure you have a recent version of git. I use version 2.10.1

Note that since we switched to gitlab instead of github you need to make sure you've initialised your workspace.

  • Save any ongoing work on the course template if you have any.
  • Remove ~/.content
  • Make sure you have the latest version of everything:
    • npm i -g docsmith@beta
    • npm i -g activist-apprentice
  • Create a new workspace folder where you'd like to work on content. mkdir workspace and cd workspace
  • Initialise your workspace : apprentice init
  • Now go to the default course template repo: cd @apprentice/preview
  • Then test that it works correctly by checking if there are changes on the master (default) branch: git pull.
  • You can now open your favorite editor and start working on files from here.
  • To preview your work just run apprentice start within somewhere in the workspace folder.

Now you have 2 options:

  1. Wait until this merge request is merged. Then the changes will be available on the master branch and you can git pull again to get them.
  2. Work in the merge request so that all the changes are tracked (think of it as working on the next version under a different name until they're all applied together). This can help get your feet wet to help understand what a git based workflow looks like (without the wrapping that will come later with docsmith), you can:
  • git fetch which will make sure you have all the branches available on your computer.
  • git checkout simplify switches your local files so that you can see the ones in the simplify branch which is used in this merge request (i.e. that contains the changes that have not yet been approved).
  • Now you can work on the files, and preview them in your browser with apprentice start as usual.
  • When you're ready to push some more work in this branch so it can be reviewed, then simply git push and the Merge Request (and list of changes here) will be automatically updated.

Note that to submit futher changes, it's not possible to push to the master branch directly to ensure all changes are reviewed (master is a protected branch requiring approvals on merge requests). This means that if you want to push a new series of changes to the course template, then you have to create a branch first (git checkout -b my_new_branch_name), then push it to gitlab (git push - to save it online) and when you're ready use it to submit a merge request (gitlab gives you the link to do this when you push a branch).

Let me know if you have questions (with error messages if you encounter any) in the discussion below. I know git is a bit daunting at first, but een with docsmith wrapping things neatly for our users, it's good if you start getting a handle on some of these basic concepts which are what makes open source the successful large scale collaborative endeavour that it is.

Cheers,

Jun

Edited by Jun Matsushita

Merge request reports