Skip to content

Commit

Permalink
Update instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Akeda Bagus committed Mar 11, 2013
1 parent 2777dde commit 41ef87e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Preview Github README.md
========================

The preview mimics repo homepage in Github.

## Requirements ##
* PHP 5.3+
* curl enabled
Expand All @@ -9,6 +11,27 @@ Preview Github README.md
## How to use ##
You have project that need to be published onto Github and you're not
sure about how the README.md will render in your repository's homepage.

### Using CLI ###

```
$ ./preview_github_readme README.md
```

or you can pipe it to browser:

```
$ ./preview_github_readme README.md | browser
````

In daily use, it's worth to alias this long script's name:

```
alias gmd='/path/to/cloned-repo/preview_github_readme'
```

### Using webserver ####

Assuming your local development is accessible via `http://localhost/`
and you're cloning this preview scripts into the docroot of your localhost.
Now you can preview your local README.md:
Expand All @@ -25,7 +48,9 @@ php -S localhost:8080

and open above url with specified port.

`preview_github_readme.php` looks for passed arg `?file=/path/to/readme.md` and
## How it Works

`preview_github_readme.php` looks for readme file and
if the file exists, send it to Github Markdown's API, otherwise lookup README.md,
Readme.md, or readme.md file in root directory.

Expand Down

0 comments on commit 41ef87e

Please sign in to comment.