Static site hosting/create: Difference between revisions
Content added Content deleted
imported>Paulproteus No edit summary |
imported>Shauna No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
* Building the website |
* Building the website |
||
** Create an organization for the school, for example: oh-hogwarts. Make sure the hello@ email address is used for account name. |
|||
** Fork [https://github.com/openhatch/oh-campus-template the template repository] (as Github limits the number of forks an individual can make of a single repo, you may need to fork a different oh-campus site or email Github to request your previous forks be made free-standing repositories.) |
|||
** Fork [https://github.com/openhatch/oh-campus-template the template repository] into the organization account and rename to be a github.io page, for example: oh-hogwarts.github.io |
|||
** Edit the CNAME record in the template to redirect to the appropriate domain name, for example: hogwarts.openhatch.org |
|||
** Customize |
** Customize |
||
*** Change repository name to reflect event |
*** Change repository name to reflect event |
||
Line 11: | Line 13: | ||
*** Create a new sign up form for the event (may just duplicate previous ones) and change the link on the website. |
*** Create a new sign up form for the event (may just duplicate previous ones) and change the link on the website. |
||
** Add, commit, and push changes back to Github. |
** Add, commit, and push changes back to Github. |
||
⚫ | |||
* Set up NearlyFreeSpeech.net site |
|||
⚫ | |||
** Visit https://www.nearlyfreespeech.net/ |
|||
*** Go to "DNS Settings" (it's an option in the drop-down in the right-most column) |
|||
** Log in as Asheesh (paulproteus) by clicking "Member Login", etc. (sadly I think only Asheesh can do this due to nfs.net permissions) |
|||
*** Scroll to bottom of page to add two new records: |
|||
** Click "Accounts" in top nav |
|||
**** Type: CNAME |
|||
** Click "OpenHatch" account |
|||
⚫ | |||
** Click "Create a new site" |
|||
⚫ | |||
** Type oh-''university_name'' in the site name field |
|||
** Enter ''university_name''.openhatch.org in the "User another name" form |
|||
** Choose "Static content, stochastic" as site type |
|||
** Click "Create now" |
|||
** Visit the site's admin panel in NFS.net, and then "Add a new alias" |
|||
** Add www.''university_name''.openhatchorg as an alias |
|||
⚫ | |||
⚫ | |||
*** Go to DNS manager and click 'Create new CNAME record' |
|||
⚫ | |||
⚫ | |||
* SSH into linode |
|||
** cp -a old_dir new_dir |
|||
** cd new_dir |
|||
** rm -rf data |
|||
** git clone git://github.com/openhatch/oh-whatever-it-is.git data |
|||
** edit and run ./update_and_push |
|||
*** '''NOTE''' that it must not refer to "$HOME/" but instead to "~/". This was a problem for the Princeton site auto-updating, and at some point we can remove this remark to ourselves, when all the scripts use ~/ rather than $HOME. |
|||
*** row 6: change url |
|||
*** row 15: change ssh command |
|||
If you want auto-updating: |
|||
* on ''staticsites@linode.openhatch.org'', edit ~/public_html/index.cgi to add a new repo_url2directory based on the templates you see. |
|||
* on GitHub, configure http://linode.openhatch.org/~staticsites/ as a web hooks URL. |
|||
** To do that, first visit your repo, e.g. http://github.com/openhatch/oh-campus-foss |
|||
** Click '''settings''' to go to e.g. https://github.com/openhatch/oh-campus-foss/settings |
|||
** Click '''Service hooks to go to e.g. https://github.com/openhatch/oh-campus-foss/settings/hooks |
|||
** Click '''WebHook URLs''' |
|||
** Add http://linode.openhatch.org/~staticsites/ into the form, and click '''Update settings'''. Ta-da! |
|||
* Visit http://linode.openhatch.org/~staticsites/ to make sure it prints "You probably want to POST." rather than "Error 500". |
|||
* That should be it. |
Latest revision as of 18:27, 17 April 2014
Note: This guideline is written by Shauna, for Shauna. You will likely have to adapt it to your needs/permissions - please do contact us if you need help!
To create an event webpage in the style of this one:
- Building the website
- Create an organization for the school, for example: oh-hogwarts. Make sure the hello@ email address is used for account name.
- Fork the template repository into the organization account and rename to be a github.io page, for example: oh-hogwarts.github.io
- Edit the CNAME record in the template to redirect to the appropriate domain name, for example: hogwarts.openhatch.org
- Customize
- Change repository name to reflect event
- Change colors if needed (I like to use school colors)
- Change text: date, time, location, name of hosts
- Create a new sign up form for the event (may just duplicate previous ones) and change the link on the website.
- Add, commit, and push changes back to Github.
- Set up domain name with cloudflare.com
- Log into cloudflare.com (username openhatch) and create a new CNAME record
- Go to "DNS Settings" (it's an option in the drop-down in the right-most column)
- Scroll to bottom of page to add two new records:
- Type: CNAME
- Alias <campusname>.openhatch.org to oh-<campusname>.github.io
- Also alias www.<campusname> to <campusname>
- Log into cloudflare.com (username openhatch) and create a new CNAME record