development.md (1155B)
1 # Developing hugo-theme-readable 2 3 ## Adding your fork as an additional Git remote to a hugo-theme-readable Git submodule 4 5 The easiest way to test your changes is with an existing Hugo website that already uses this theme. You can use your own or checkout the [starter template](https://github.com/cjtheham/hugo-starter-readable). 6 7 The following steps show you how to add your fork as an additional Git remote to the checked out Git submodule. 8 9 This way you can work with the hugo-theme-readable code directly, rather than experimenting in your own 'layouts' directory and copying code pieces around. 10 11 ```bash 12 # If you haven't done so: init and update the submodule. This will populate themes/readable. 13 git submodule init 14 git submodule update 15 16 cd themes/readable/ 17 18 # Add your fork as the remote 'fork'. 19 git remote add fork git@github.com:<your-username>/hugo-theme-readable.git 20 21 # Create a new branch. 22 git checkout -b my-change 23 24 # Make your changes directly to files in themes/readable. 25 26 # Anytime you want to push, replace the default 'origin' with 'fork', e.g. 27 # push your work on 'my-change' as a new branch to your fork. 28 git push -u fork my-change 29 ```