mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2025-02-28 16:31:44 -05:00
updated docs on updating :)
This commit is contained in:
parent
0c888bbb9e
commit
367ba644af
@ -8,6 +8,20 @@ footer: false
|
||||
|
||||
[« Previous, Theming & Customization](/docs/theme/)
|
||||
|
||||
## How to Update
|
||||
|
||||
``` sh
|
||||
git pull octopress master # Get the latest Octopress
|
||||
bundle install # Keep gems updated
|
||||
rake update_source # update the template's source
|
||||
rake update_style # update the template's style
|
||||
```
|
||||
|
||||
This will update your plugins, theme, gemfiles, rakefile and configs, preserving your changes as explained in [Theming & Customization](http://octopress.dev/docs/theme).
|
||||
Read on for an explanation of how all this works.
|
||||
|
||||
### How Updating Works
|
||||
|
||||
In the open source world, version control generally takes care of staying current with the latest releases, but once you've begun to customize your code,
|
||||
merging in updates isn't always what you want. As a result I've come up with the following pattern for Octopress:
|
||||
|
||||
@ -18,9 +32,9 @@ files under `source` or `sass` are in any repository except your own. This way y
|
||||
updates and screwing up your changes.
|
||||
|
||||
When you pull down changes from the Octopress repository, the latest layouts, pages, javascripts and styles are merged into your `.themes` directory.
|
||||
To update your site, you must manually merge in the new files. Before you do a spit-take, I came up with something to help out with this.
|
||||
To update your site, you must manually merge in the new files. Before you do a spit-take, I written some Rake tasks to help out with this.
|
||||
|
||||
## Updating Sass
|
||||
### Updating the Template's Style
|
||||
If you've pulled in changes and you want to update your `/sass` directory, run this.
|
||||
|
||||
rake update_style
|
||||
@ -34,7 +48,7 @@ This task will:
|
||||
This way if you keep your theme changes in `/sass/custom` you'll be able to upgrade your stylesheets without losing any of your work. If you made changes elsewhere, you can copy them back them from `/sass.old`.
|
||||
After you have the update in place, you can remove the `/sass.old` directory.
|
||||
|
||||
## Updating Source
|
||||
### Updating the Template's Source
|
||||
If you've pulled in changes and you want to update your `/source` directory, run this.
|
||||
|
||||
rake update_source
|
||||
@ -44,14 +58,14 @@ This task will:
|
||||
1. Move `/source` to `/source.old`
|
||||
2. Copy `.themes/classic/source` to `/source`
|
||||
3. Copy back everything in `/source.old` (`cp -rn` - without replacing )
|
||||
4. Replace `/source/_includes/navigation.html` with `/source.old/_includes/navigation.html` (because it commonly has changes).
|
||||
4. Replace everything in `/source/_includes/custom/` with `/source.old/_includes/custom/` which includes head, header, navigation, footer and custom asides.
|
||||
|
||||
This way all of the files you've added, eg. `_posts`, `about.html` etc. will be preserved while all files tracked by Octopress (except for the navigation partial) will be updated.
|
||||
If you made changes elsewhere, you can copy them back them from `/source.old`. After you have the update in place, you can remove the `/source.old` directory.
|
||||
This way all of the files you've added, eg. `_posts`, `about.html` etc. and all the customizations in `source/_includes/custom` will be preserved while all files tracked by Octopress will be updated.
|
||||
If you made changes elsewhere, you can copy them back them from `/source.old` or check them out from your git repository. After you have the update in place, you can remove the `/source.old` directory.
|
||||
|
||||
## That's It?
|
||||
|
||||
Yep. I figured this is the simplest thing that could possibly work. I don't like the idea of having blog files change if someone wants to update their plugins,
|
||||
and I haven't yet figured out a better way. If you have a better idea, I'd love some [help](http://convore.com/octopress/ideas) improving this.
|
||||
and I haven't yet figured out a better way. If you have a better idea, [post an issue](https://github.com/imathis/octopress/issues) with your idea for improving this.
|
||||
|
||||
[Next, Blogging With Octopress »](/docs/blogging)
|
||||
See also [Blogging With Octopress »](/docs/blogging) and [Theming & Customization](/docs/theme)
|
||||
|
Loading…
x
Reference in New Issue
Block a user