-
Notifications
You must be signed in to change notification settings - Fork 0
Editing The Wiki
This Wiki is the primary source of user documentation for Backup.
If you find any errors relating to the currently released version of Backup, please feel free to edit it.
If you wish to submit changes to the wiki that are only relevant for changes in the master branch, or for changes you have submitted in a pull request, please use the following procedure:
-
Create a local clone of the wiki
git clone git://github.com/meskyanichi/backup.wiki.git -
Checkout the develop branch.
git checkout develop -
Make your changes and commit them locally
git commit -am 'my changes' -
Create a patch for your changes
-
Make sure you still have the latest version
git pull --rebase -
Create your patch
git diff origin/develop > my_changes.patch
-
-
Submit your changes
The best way to do this is to paste the contents of
my_changes.patchas a Gist and submit the link in your pull request or issue.
When working on the wiki locally, the following information should be helpful.
The wiki may be edited locally and previewed using Gollum.
When you clone the wiki, you will notice the wiki repository has a Gemfile.
Simply run bundle install to set this up.
When previewing your changes locally with Gollum, your changes will only be visible once you commit your changes.
When viewing changes committed to the master branch, simply run gollum. If you are working on the develop
branch, you must use gollum --ref develop.
Note that the links on the Home page for the wiki link directly to the pages on github. Use the All link in the navigation bar if you wish to click to other pages locally.
The styling on github is different than what you will see locally. You can improve this by saving the .css files used
by the live wiki and storing them in custom.css. Then, use gollum --ref develop --css, which will then use
custom.css. Note that custom.css must be checked in and committed. You may also wish to use the edit feature on
one of the live wiki pages. You can paste your changes and use preview to see exactly what your changes will look like.
If you're using VIM, you can use the following to make this easy. Other editors should provide similar capabilities.
-
Create a
workingcommit.Make a simple change to the file you wish to work on, like adding an extra blank line. Then, add and commit this change using
git -am 'working'. -
Setup
VIM(or other editor) to automatically amend the previous commit when saving files.:autocmd BufWritePost *.md :execute ':silent !git commit --amend -C HEAD <afile>' | :normal <C-L>Now, each time you save a
*.mdfile inVIM, yourworkingcommit will be amended and you can simplyrefreshyour browser to view your changes.To see if this autocmd is set, you can use
:autocmd BufWritePost *.md, which will show you all matching autocmds in effect. If you want to remove the autocmd, use:autocmd! BufWritePost *.md.