ContributorsGuide
Step-by-step guide for third-party developers to contribute to html5rocks.com. Before you draft the article, read the writing tips. Before you startHTML5Rocks runs on Google App Engine (Python). Before you check out the code, download the App Engine Python SDK. The SDK is not required, but highly recommended. You'll want to run a local development server and preview your changes before submitting a tutorial, sample, or patch. Our code repository is Git. If you do not have it, download and install it. Getting the codeThe entirety of HTML5Rocks (www, studio, slides, playground, updates) is located here. Each sub-domain points to a separate Google App Engine (Python) application with a corresponding sub-directory in the src tree:
To checkout the src, run the following command: git clone https://code.google.com/p/html5rocks/ Contributing: submitting patches and tutorialsSubmitting a code patch, studio/playground sampleContributor License AgreementsThis section only applies if you are submitting a patch for us. The CLA mentioned below does not apply if you are giving us a brand new article or tutorial. We'd love to accept your code patches! However, before we can take them, we have to jump a couple of legal hurdles. Please fill out either the individual or corporate Contributor License Agreement.
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll add you to the official list of contributors and be able to accept your patches.
Writing a tutorial / case study
Now choose your adventure: Semi-automated processThe main project folder contains a script, www.html5rocks.com/scripts/generate_tutorial.py to automate the creation of new tutorials/case studies. It does this by:
To create a new tutorial run: cd www.html5rocks.com/ python scripts/generate_tutorial.py --output /file/filesystem/index.html where the --output parameter is of the form: /<api_name>/<tutorial_name>/index.html To create a new case study run: cd www.html5rocks.com/scripts python generate_tutorial.py --output /casestudies/company_articlename.html To create a mobile article: cd www.html5rocks.com/scripts python generate_tutorial.py --output /mobile/articlename.html If you have an existing .txt file containing article content (or a Google Doc exported to .txt), the script can take an --input parameter that will populate the empty article with your content: cd www.html5rocks.com/scripts python generate_tutorial.py --output /casestudies/company_articlename.html --input ~/path/to/content.txt Note: You'll need to still clean up the generated HTML in company_articlename.html. This script tries to mimic the manual process (below) but isn't perfect. Some HTML clean up/formatting will be necessary. For example, you still need to replace the ___COMPAT_TEST___ in your generated article with an appropriate Modernizr (or raw JS) test that makes sense for your article, add a summary description in `/tutorials/index.html', and other other loose ends. If you are a new author, add yourself to www.html5rocks.com/profiles.yaml. We'll also need a .png photo of you for the profiles page. Manual process
Modify a previous entry to match the details of your tutorial. When possible, try to use existent tags. If you're writing a case study, be sure to tag the article with the type:casestudy tag. Writing/Augmenting a feature page
Submitting: When you are ready to submit, attach a diff of your patch (by running git diff /path/to/file) to the issue. i18nA few things to note about internationalization:
| ||||||||||||||||||
Can you please explain how we runt he site? I've got it checked out. I've got an Apache Virtual Host set up for it. But hitting any of the files with template tokens shows the tokens not being processed.
In order to get this running, I had to go to the folder where I cloned the site, and do this at the command line dev_appserver.py www.html5rocks.com.
I believe section 5 is obsolete. There does not appear to be <article> blocks anymore.
After running - I still am not able to test. Hitting the main tutorials page shows no tutorials - just a basic layout. Hitting the actual page I made creates a page load of errors.
How to participate for translation? I want to help with Indonesian version
Hi yauriedogawa! If you'd like to help translate the site, take a look at the LocalizationGuide. That should give you the detail you need to get started.
Hi Guys,
I am having the same problem of @raymondc. Per some reason the yaml files are not being parsed. Is this something related with the dependencies?
Thanks
@juliano: I hit this URL http://localhost:8080/database/load_all and log in as admin. It populates a temp database based on whats in the yaml.
Proszę powiedzcie drodzy naukowcy co porabiał Klamm w Zamku Franza Kafki? Za friko, za naukę nie kasuję.
Na marginesie wiki nie unie pisać i nie ma tym samym składni. To zlepki wstrząśnięte nie zmieszane.
what is the command for cloning html5rocks?