@@ -39,78 +39,91 @@ cd www.ruby-lang.org/
39
39
bundle install
40
40
```
41
41
42
- To generate the site and start a local web server, you can use
42
+ ## Make Changes
43
43
44
- ``` sh
45
- bundle exec rake serve
46
- ```
44
+ Making changes is easy:
45
+ just locate the Markdown source of the page you want to improve,
46
+ then make your changes or add content.
47
47
48
- Then open [ http://localhost:9292/ ] ( http://localhost:9292/ )
49
- in your local browser to access the preview.
48
+ If you plan to submit a pull request or want to preview your changes
49
+ on Heroku, you need to
50
50
51
- ** Note:** The build of the site will take several minutes.
51
+ * create a topic branch,
52
+ * commit your changes to this branch.
52
53
53
- If you created the site previously and the ` _site ` directory
54
- already exists, the web server will start instantly.
55
- It will serve the content as it was at the time of the last
56
- site generation, though.
54
+ See the [ project's wiki] [ wiki ] for some guidelines on how
55
+ your commits and PRs should look like.
57
56
58
- To force regeneration of the site or
59
- to only get feedback on the success of the build you might want
60
- to create the website * without starting a local server* instead:
57
+ ## Preview Your Changes
58
+
59
+ ### Preview Locally
60
+
61
+ Generate the website with
61
62
62
63
``` sh
63
64
bundle exec rake generate
64
65
```
65
66
66
- ## Preview on Heroku
67
+ Then start a local web server with
68
+
69
+ ``` sh
70
+ bundle exec rake serve
71
+ ```
72
+
73
+ Open [ http://localhost:9292/ ] ( http://localhost:9292/ )
74
+ in your browser to access the preview.
75
+
76
+ ** Note:** The build of the site will take several minutes.
77
+
78
+ ### Preview on Heroku
67
79
68
80
In case a build is not possible on your local machine
81
+ or you want to test your changes under production conditions
69
82
you can also create a preview on Heroku.
70
83
71
- * Sign up for [ Heroku] ( http://www.heroku.com ) if you don't have an account yet.
72
- * Install [ Heroku Toolbelt] ( https://toolbelt.heroku.com ) .
73
- * Clone repository.
84
+ * Sign up for [ Heroku] ( http://www.heroku.com ) if you do not have
85
+ an account yet.
74
86
75
- ```
76
- git clone https://github.com/ruby/www.ruby-lang.org.git
77
- cd www.ruby-lang.org
78
- ```
87
+ * Install the [ Heroku Toolbelt] ( https://toolbelt.heroku.com ) .
79
88
80
- * Create a feature branch.
81
- * Make changes or add content and commit.
82
- * Create preview app on Heroku using custom buildpack.
89
+ * Unless you already have, ` cd ` into your local working copy of this repo.
83
90
84
- ```
85
- heroku login
86
- heroku create --buildpack https://github.com/ruby/heroku-buildpack-www-ruby-lang.git
87
- ```
91
+ * Create a preview app on Heroku using the custom buildpack:
88
92
89
- * Push your site.
93
+ ``` sh
94
+ heroku login
95
+ heroku create --buildpack https://github.com/ruby/heroku-buildpack-www-ruby-lang.git
96
+ ```
90
97
91
- ```
92
- git push heroku feature_branch:master
93
- heroku open
94
- ```
98
+ * Push your feature branch:
95
99
96
- To create a preview of the master branch:
100
+ ` ` ` sh
101
+ git push heroku feature_branch:master
102
+ ` ` `
103
+
104
+ To create a preview of the master branch:
105
+
106
+ ` ` ` sh
107
+ git push heroku master
108
+ ` ` `
109
+
110
+ Open the preview in your browser with ` heroku open` or
111
+ retrieve the preview URL using ` heroku info` and open it in your browser.
97
112
98
- ```
99
- git push heroku master
100
- heroku open
101
- ```
102
113
103
114
# # Testing
104
115
105
116
Besides generating and previewing the site
106
117
you can perform additional tests with these tasks:
107
118
108
- ```
119
+ ` ` ` sh
109
120
bundle exec rake check # perform various tests on the source files
110
121
bundle exec rake check:markup # check markup for all generated pages
111
122
bundle exec rake check:links # check for 404's (needs a running local server)
112
123
` ` `
113
124
114
125
# # More Information
115
126
116
- For more information see the [ wiki] ( https://github.com/ruby/www.ruby-lang.org/wiki ) .
127
+ For more information see the [wiki][wiki].
128
+
129
+ [wiki]: https://github.com/ruby/www.ruby-lang.org/wiki
0 commit comments