Update the website

From GNU MediaGoblin Wiki
(Difference between revisions)
Jump to: navigation, search
(First time)
(new simpler setup.)
Line 19: Line 19:
  
 
Okay, Make sure you have virtualenv installed (is it on your path?  If not you might need to install it via your package manager.)
 
Okay, Make sure you have virtualenv installed (is it on your path?  If not you might need to install it via your package manager.)
 +
Set up the virtualenv
  
Mac OS X Lion 10.7
+
  make virtualenv
  
  curl -O <nowiki>http://python-distribute.org/distribute_setup.py</nowiki>
+
Next, to build the site and test it in your browser, run:
  sudo python distribute_setup.py
+
  sudo easy_install virtualenv
+
  
Next you need to make a virtualenv. 
+
  make
  
  virtualenv .
+
That's itIf all is successful, it should give you a url like http://localhost:5000/
 
+
Install pyblosxom, pastsescript, and jinjablosxom
+
 
+
  ./bin/pip install pyblosxom PasteScript
+
  ./bin/pip install -e git+git://gitorious.org/pyblosxom-jinja2-plugin/jinjablosxom.git#egg=jinjablosxom
+
 
+
Activate the virtualenv and see if it starts up:
+
 
+
  ./bin/paster serve site/blog.ini --reload
+
 
+
If all is successful, it should give you a url like http://localhost:5000/
+
  
 
If that works, you should be able to visit that URL in your browser and it'll look like http://mediagoblin.org/
 
If that works, you should be able to visit that URL in your browser and it'll look like http://mediagoblin.org/

Revision as of 18:44, 3 October 2013

Okay, updating mediagoblin.org! Well, obviously not everyone has permission to do this, so depending on whether or not you have commit access affects whether or not you'll send a branch for review, pretty much the same as how you do with normal git contributions.

Contents

First time

First, do a git checkout:

https://gitorious.org/mediagoblin/mediagoblin-website

Don't have commit access? Then you should probably make a clone and put it up somewhere.

  git clone git://gitorious.org/mediagoblin/mediagoblin-website.git

Next, switch to the "draft" branch, or make a local clone of that if you haven't already.

 git branch draft origin/draft
 git checkout draft
 # merge in any stray commits from master
 git merge origin/master

Okay, Make sure you have virtualenv installed (is it on your path? If not you might need to install it via your package manager.) Set up the virtualenv

 make virtualenv

Next, to build the site and test it in your browser, run:

 make

That's it! If all is successful, it should give you a url like http://localhost:5000/

If that works, you should be able to visit that URL in your browser and it'll look like http://mediagoblin.org/

Layout of the repository

  • site/entries/news/ -- new blogposts go here. Usually we use restructured text. Copy an old file and mime it.
  • site/pages/ -- various non-blog pages of the site. Join page, about us, etc.
  • site/static/ -- images and stuff goes in here. Look around and you'll see.
  • site/flavors/ -- site's template "look and feel" described here.

Making and committing changes

Make sure you're in the draft branch:

 git checkout draft
 git pull

Add files, make changes. To test them, activate the virtualenv, recompile, start the server... you'll then be able to visit http://localhost:8000/ in your browser.

 source bin/activate
 ./compile.sh && ./testhttpserver.py 

Commit to the draft branch when things look good. (This might be more complex if you don't have commit access.. if you're a guest contributor, ask for help in the channel if you get stuck.)

 # See what files need to be committed here
 git status
 # Stage changes that you intend to commit
 git add file1.txt file2.txt  # replace with real filepaths here
 # Commit!  You'll be prompted by your text editor
 git commit -m "Describe your changes here"
 # Push live
 git push

Going live

Are you ready to go live? Are you sure? It's probably a good idea to run by Will or Chris in the channel before doing this.

If you're ready, commit and push to the master branch. Changes to the master branch are periodically auto-updated on the server.

 git checkout master
 git pull
 git merge draft
 git push
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox