/utahjs.com

Utah JavaScript User Group Website

Primary LanguageJavaScriptOtherNOASSERTION

UtahJS.com

This is the repository for the utahjs.com website. All are welcome to contribute.

How to Contribute

Visit #utahjs on freenode for help any time. At the very least, Ryan Florence is there most of the day.

Contributing is easy. The website is built on nanoc, a static site compiler. Contributing is as easy as adding a member profile yaml file, and then writing an article in markdown.

Prerequisite Setup (Ruby)

  1. Fork the repository

    UTAHJS_HOME=~/Code
    cd ${UTAHJS_HOME}
    git clone git://github.com/UtahJS/utahjs.com.git
    
  2. Install rvm, ruby, and bundler (Ubuntu / OS X)

    cd ${UTAHJS_HOME}/utahjs.com
    bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
    exit
    

    Now open a new terminal

    cd ${UTAHJS_HOME}
    rvm install ruby-1.9.2
    echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
    rvm use 1.9.2@utahjs --create
    # that's just a shortcut for:
    #   rvm use ruby-1.9.2
    #   rvm gemset create utahjs
    #   rvm gemset use utahjs
    rvm gemset list
    gem install bundler
    
  3. Now, with bundler, install the gem dependencies

    bundle install
    

    All of the required ruby gems, including nanoc, should be installed locally for this project now.

Contributing

  1. Fork the repository and check out a new branch off of master.

    cd ~
    
    git clone git@github.com:YOUR_GITHUB_ACCOUNT/utahjs.com.git
    
    cd utahjs.com
    
    git remote add upstream git://github.com/UtahJS/utahjs.com
    
  2. Every time you edit content, create a new branch (based off of master) for your work:

     git checkout master
     git pull upstream master
    
     git checkout -b my-articles
    
  3. Add your member profile to content/members. It should look something like content/members/Ryan Florence.yml:

    open content/members/First\ Last.yml
    
    name: Ryan Florence
    email: your.email@ddress.com
    location: West Jordan, UT
    github: rpflorence
    twitter: ryanflorence
    website: http://ryanflorence.com
    about: Yadda yadda yadda
    

    This information will display on your articles and on the members page. The name of your yaml file is a unique identifier for articles you write. More on that in a minute.

  4. Create your article in content/articles (you can use example as a template)

    cd utahjs.com
    
    git checkout master
    git pull upstream master
    
    git checkout -b my-articles
    
    cd content/articles
    mkdir my-article
    rsync -a example/index.md my-article/
    

    And season to taste:

    open my-article/index.md
    

    In particular you'll need to change the YAML meta-data

    ---
    title: Sample article title
    author: Ryan Florence
    date: 2011-08-17
    ---
    

    Note: If you need to do something that markdown doesn't support (such as a table), you can use inline html.

    Note: You can also use index.haml. You can also put html (such as a table) inside of your markdown.

  5. Preview your changes

    To compile and view the site:

     bundle exec nanoc compile
     bundle exec nanoc view
    
     open "http://localhost:3000"
    

    Alternatively, you can launch nanoc in autocompile-compile mode so that the site is compiled each visit:

     bundle exec nanoc autocompile
    
  6. Push to the repository (and perhaps send a pull request).

    git add content/members/First\ Last.yml
    git commit -m 'added "First Last" as member'
    
    git add content/articles/my-article.md
    git commit -m 'added "My Article"'
    
    git pull upstream master
    git push origin my-article
    
  7. Submit a Pull Request

    • Go to your Fork on Github (click "Your Fork" from the mainline UtahJS/utahjs.com repo)
    • Select the my-article branch (mid/upper right)
    • Click Pull Request (upper right)
    • Wait for Acceptance and or Feedback
  8. Accept feedback gracefully and refine your article, or merge everything back together

     cd utahjs.com
     
     git checkout master
     git merge my-article
     
     git push origin master
    

License

The code examples and content on this site are licensed under the following licenses unless otherwise stated:

  • The MIT License
  • Apache License 2