Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @wh1tney wh1tney renamed this gist Aug 9, 2014. 1 changed file with 0 additions and 0 deletions.
  2. @wh1tney wh1tney revised this gist Aug 9, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## Gist

    This is a quick tutorial explaining how to deploy a single-page website to Heroku.
    This is a quick tutorial explaining how to get a static website hosted on Heroku.

    **Why do this?**

  3. @wh1tney wh1tney revised this gist Aug 9, 2014. 1 changed file with 2 additions and 8 deletions.
    10 changes: 2 additions & 8 deletions deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -19,14 +19,8 @@ Heroku hosts *apps* on the internet, not static websites. To get it to run your
    1. Add a file called *composer.json* to the root directory by running `touch composer.json`
    2. Add a file called *index.php* to the root directory by running `touch index.php`
    3. Rename the homepage (e.g. index.html) to *home.html*
    4. In *index.php*, add the following line
    ```php
    <?php include_once("home.html"); ?>
    ```
    5. In *composer.json*, add the following line
    ```
    {}
    ```
    4. In *index.php*, add the following line: `<?php include_once("home.html"); ?>`
    5. In *composer.json*, add the following line: `{}`
    6. Run `git push heroku master`

    Done! Visit your deployed single-page website, hosted by Heroku (as a fake PHP app ☺).
  4. @wh1tney wh1tney revised this gist Aug 9, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ Heroku hosts *apps* on the internet, not static websites. To get it to run your
    - A [Heroku app](https://devcenter.heroku.com/articles/quickstart) and remote are set up and ready to go


    Steps:
    ## Steps

    1. Add a file called *composer.json* to the root directory by running `touch composer.json`
    2. Add a file called *index.php* to the root directory by running `touch index.php`
  5. @wh1tney wh1tney revised this gist Aug 9, 2014. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    ## Gist

    This is a quick tutorial explaining how to deploy a single-page website to Heroku.

    **Why do this?**

    Heroku hosts *apps* on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

    ## Basic Assumptions

    - You want to deploy some straight-up HTML, CSS, JS, maybe a few images. Nothing fancy here.
  6. @wh1tney wh1tney revised this gist Aug 9, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -21,4 +21,4 @@ Steps:
    ```
    6. Run `git push heroku master`

    Done! Visit your deployed single-page website, hosted by Heroku.
    Done! Visit your deployed single-page website, hosted by Heroku (as a fake PHP app ☺).
  7. @wh1tney wh1tney revised this gist Aug 9, 2014. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -8,17 +8,17 @@

    Steps:

    1 - Add a file called *composer.json* to the root directory by running `touch composer.json`
    2 - Add a file called *index.php* to the root directory by running `touch index.php`
    3 - Rename the homepage (e.g. index.html) to *home.html*
    4 - In *index.php*, add the following line
    1. Add a file called *composer.json* to the root directory by running `touch composer.json`
    2. Add a file called *index.php* to the root directory by running `touch index.php`
    3. Rename the homepage (e.g. index.html) to *home.html*
    4. In *index.php*, add the following line
    ```php
    <?php include_once("home.html"); ?>
    ```
    5 - In *composer.json*, add the following line
    5. In *composer.json*, add the following line
    ```
    {}
    ```
    6 - Run `git push heroku master`
    6. Run `git push heroku master`

    Done! Visit your deployed single-page website, hosted by Heroku.
  8. @wh1tney wh1tney created this gist Aug 9, 2014.
    24 changes: 24 additions & 0 deletions deploy-single-page-site.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    ## Basic Assumptions

    - You want to deploy some straight-up HTML, CSS, JS, maybe a few images. Nothing fancy here.
    - You are in the root directory of your site (i.e. the directory that contains all subdirectories and files for the site)
    - The root directory contains a main HTML page, e.g. index.html
    - A [Heroku app](https://devcenter.heroku.com/articles/quickstart) and remote are set up and ready to go


    Steps:

    1 - Add a file called *composer.json* to the root directory by running `touch composer.json`
    2 - Add a file called *index.php* to the root directory by running `touch index.php`
    3 - Rename the homepage (e.g. index.html) to *home.html*
    4 - In *index.php*, add the following line
    ```php
    <?php include_once("home.html"); ?>
    ```
    5 - In *composer.json*, add the following line
    ```
    {}
    ```
    6 - Run `git push heroku master`

    Done! Visit your deployed single-page website, hosted by Heroku.