Please don't make any changes!
- micro:bit Playground website is at https://microbit-playground.co.uk
- All micro:bit programs can be downloaded as a zip file.
- the project for the mu microbit python editor is here on github.
micro:bit Playground publishes python code for kids to hack and mash (and hopefully learn something about python!)
This repo contains the code used to generate the website. It uses Jekyll---a ruby program---to turn markdown into beautiful pages.
Please (please! please!) send me your python code and a brief overview of how your program works. My email is jez@geekteacher.co.uk.
- Document your code with
/templates/program-template.md
[download link] - Take photographs of your code or project.
- Email them to me at jez@geekteacher.co.uk.
- Optional: Send through your name, photograph, website/twitter and a brief bio. These will be used to make you very cool author bio box!
git clone git@github.com:microbit-playground/microbit-playground.github.io.git
- Document your code with
/templates/program-template.md
or/templates/program-template-bare.md
. - Copy your
.py
and.md
files to/code/easy/_posts/
or../medium/...
or.../ninja/...
depending on difficulty. Naming scheme is2016-02-24-my-program.*
. - Edit
/templates/code-template-header.svg
, add your project name with a text editor and save to/images/
. It's just anxml
file. - Copy any images to
/images/
with the same file name as your program, eg.2016-02-24-my-code-1.jpg
and2016-02-24-my-code-2.png
- Edit
authors.yml
in the_data
directory with your personal information. - Pull request
- clone this repo
- install bundler:
gem install bundler
- install required gems:
bundler install
- serve the website locally with installed gems:
bundle exec jekyll serve
- visit
http://localhost:4000
The website loads the font Andika with inlined CSS from a CDN. This helps the page load quickly (300 - 600ms!) but means the website looks... retro without an internet connection.
Although Andika is a big font to load--it's over 20k--it is beautiful. Do read more about this typeface here.
There's no need to run gulp
it's very messy!
The website uses gulp
to complete tasks for production. gulp
requires node.js
to be installed.
- in main directory run
npm install
gulp scripts
to minify & combine javascriptgulp zip
creates a zip file of all the programs.gulp svg2png
to convert svgs to pngs. This is used to make PNGs for opengraph (pretty Twitter cards).
gulp images
smushes images but do not use until a build/source directory for images is implemented.
\_config.yml
loads variables for the production environment (eg.url: https://github...
)\_plugins\set_development_environment.rb
loads variables for development environment (eg.url: http://localhost
)
Running the website on localhost loads the development variables from a plugin.
Running the website on Github use _config.yml
production values since plugins are not used on github.
- More programs
- Use gulp to build images from src/
build pretty header images for opengraph (twitter cards/facebook etc)- Fix jshint error messages when running
gulp scripts
- Remove numerals from zip download of python script.
- Add txt explainer about the programs
- Style guide & fix typos
- micro:bit / Microbit / microbit
- python / Python
- licence / license
- practice / practise
- noun / verb
- etc
There are other collections of code on the internet. Here's an incomplete list of awesomeness:
- mavhc's gists - A collection of ninja python programs
- Whaleygeek's github - A collection of games -- microbit Connect 4!
- cpina's github - Games & apps
Guidance on how to contribute is above or on the developers page. Changes to code can be made by cloning the repo and pushing back or through the Github web interface. (or email!)
Programs for beginners are especially welcome.
Drop me an email if you have any ideas or want to get involved.
Carry on being amazing!