Skip to content

Making Changes to the Repository

Jerrett Longworth edited this page Mar 27, 2024 · 15 revisions

Hello! This repository is public and open-source, as free as can be! While you can view to your heart's content, editing is restricted to members of Wiki Knights, a student organization at the University of Central Florida. If you are such a member and want to make changes, let one of the club officers know and you will be added to the list of contributors.

Anyone, regardless of being a member, can also submit pull requests for new additions or changes! Anyone is also free to make forks or redistribute!

Please see the project board here for areas on where to contribute: https://github.com/orgs/wikiknights/projects/1/


Repository Setup

This repository is set up with a submodule for pandoc templates. This can make development difficult and confusing, especially for users new to git, so the "Details" section below shows the commands to run for various common situations that you may experience.

To make working in submodules automatic, use the following command to set this: git config --global submodule.recurse true

The only other step needed to work with the repository is to initially clone with --recurse-submodules. (See the first paragraph in "Details".) git clone is the only command that the previous setting does not apply to.

Post-Checkout Hook

You may also want to add a post-checkout hook in order to auto-checkout any submodules. This hook is recommended for contributors that do not intend to make any modifications to templates. Since there are sometimes differences in the submodules between branches of the supermodule, this can cause some editors and git clients to believe there are changes to the submodule. This may not necessarily be true, but is instead a byproduct of switching branches.

Post-checkout hook (.git/hooks/post-checkout):

#!/bin/sh
#
# Hook to automatically checkout any submodules once checking out a branch.

git submodule foreach 'git checkout $sha1'

This is not added to the repository because it may create unwanted behavior if any work is being done to a submodule.

Details

To clone this repository, use git clone --recurse-submodules so that the pandoc-templates submodule is included. These templates are used for style and formatting when pandoc is converting to (primarily) HTML.

If there are changes to the pandoc-templates submodule not yet reflected in the main repository, these can be merged in with git submodule update --remote.

If this repository has already been cloned without submodules, or changes have been (remotely) made to submodules that are not yet reflected on your local instance, use git submodule update --init --recursive to initialize (if necessary) and update your local instance of the submodules. You can also use git pull --recurse-submodules.

To make changes to the pandoc-templates submodule, enter into the ./templates directory and checkout the default branch with git checkout master. You can then make changes in this directory as if it were a separate project. (If starting a pull request, you could checkout to a different branch.) Pushing changes is done as normal with git push.

(See https://git-scm.com/book/en/v2/Git-Tools-Submodules for more details when using submodules.)

Clone this wiki locally