Skip to content

Commit ca51e3b

Browse files
committed
Restructure and improve README
1 parent 76aab10 commit ca51e3b

File tree

1 file changed

+54
-41
lines changed

1 file changed

+54
-41
lines changed

README.md

Lines changed: 54 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -39,78 +39,91 @@ cd www.ruby-lang.org/
3939
bundle install
4040
```
4141

42-
To generate the site and start a local web server, you can use
42+
## Make Changes
4343

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.
4747

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
5050

51-
**Note:** The build of the site will take several minutes.
51+
* create a topic branch,
52+
* commit your changes to this branch.
5253

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.
5756

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
6162

6263
``` sh
6364
bundle exec rake generate
6465
```
6566

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
6779

6880
In case a build is not possible on your local machine
81+
or you want to test your changes under production conditions
6982
you can also create a preview on Heroku.
7083

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.
7486

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).
7988

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.
8390

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:
8892

89-
* Push your site.
93+
``` sh
94+
heroku login
95+
heroku create --buildpack https://github.com/ruby/heroku-buildpack-www-ruby-lang.git
96+
```
9097

91-
```
92-
git push heroku feature_branch:master
93-
heroku open
94-
```
98+
* Push your feature branch:
9599

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.
97112

98-
```
99-
git push heroku master
100-
heroku open
101-
```
102113

103114
## Testing
104115

105116
Besides generating and previewing the site
106117
you can perform additional tests with these tasks:
107118

108-
```
119+
``` sh
109120
bundle exec rake check # perform various tests on the source files
110121
bundle exec rake check:markup # check markup for all generated pages
111122
bundle exec rake check:links # check for 404's (needs a running local server)
112123
```
113124

114125
## More Information
115126

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

Comments
 (0)