Giter VIP home page Giter VIP logo

dartlang.org's Introduction

Dart Website (dartlang.org)

Build Status

The www.dartlang.org site. Built with Jekyll and hosted on App Engine.

To give us feedback, please file issues with the Dart project.

Contributions welcome! (Just sign our CLA.) Details on processes, formatting, and style are in Writing for dartlang.org. You can fork and submit patches at https://github.com/dart-lang/dartlang.org.

Orientation

./src
Contains all the working files.
./src/appengine
Contains app engine configuration files.
./src/site
Documents, HTML files, images, etc. You will work out of here normally.
./build
Generated by Jekyll, to be deployed to server. This directory is transient, can be deleted.

Configuring your system

  • Ensure you have Ruby 1.9.3. (Version 2.0.0p247 worked for me.)
  • Ensure you have Python 2.7.
  • Open a new Terminal.
  • Run sudo gem install fast-stemmer -v '1.0.2'.
  • Run sudo gem install bundler.
  • Run sudo bundle install from the root of your dartlang project.
    • This gives you liquid, jekyll, and more.
  • If you see errors similar to library X (at master) is not checked out. Please run 'bundle install', you should run bundle install (without the sudo).
  • Download and install the App Engine launcher: https://developers.google.com/appengine/downloads
    • Tell App Engine to use Python 2.7 if it's not.
      • It will say, in the log "you're using 2.6".
      • On a Mac?
    • Ask an admin to invite you to modify the Dart project on the Google App Engine.

Tips for Windows

  • Install Python and Ruby using Windows installers.
  • Install ruby dev kit for Windows.
  • Run gem install bundler.
  • Run bundle install from the root of your dartlang project.

GitHub setup

  • Create a GitHub login login if you don't already have one.
  • Ask an admin to invite you to the dart-lang project on GitHub.

Contributing via Chromium Code Review

On a Mac:

  • Make sure you have Xcode (contains git)
  • Install depot_tools: $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  • Add depot_tools to your PATH: $ export PATH="$PATH":pwd/depot_tools NOTE: You may want to add this to your .bashrc file or your shell's equivalent so that you don’t need to reset your $PATH manually each time you open a new shell.

Development

  • Make sure you are in the root of this project.
  • Run the server: make server
  • Your web browser opens to http://localhost:8081.
    • You may need to reload once.
  • Edit, create docs as normal.
  • To run tests, run ./runtests.sh.

Note: If you see single-page breadcrumbs on pages such as http://localhost:8081/tools/pub/cmd/pub-build.html, make sure that you've installed the latest gem versions. (Run sudo bundle install and then bundle install.)

Windows development tips

You probably won't have make available on the command line by default.

  • To just get up and running, run jekyll from the src/site folder.
  • This starts up the Jekyll webserver and generates into build/static.
  • If Jekyll does not generate output, you need to type chcp 65001 at the command prompt to change the code page to UTF-8. (Jekyll fails silently if this is not done.)
  • To clean, simply delete the contents of build/static and restart jekyll.

Deploying the site

  • Run make clean && make deploy.
    • This builds the site and places everything into build/.
    • This command also uses the current branch for the app engine version name.
    • This command will then deploy the site. (Note: You can also run make clean && make build and then deploy using App Engine.)
  • You will probably need to generate an App-specific password.
    • Save this into the App Engine Launcher during the first deployment.

Regenerating Dartisans playlists

Did you just run a Dartisans? Good for you! Here's what you need to do:

  1. Update the description to be present tense (instead of future), and remove the link to the moderator page.
  2. Ensure the episode is added to the Dartisans playlist, owned by Google Developers channel.
  3. Sort the playlist by date.
  4. Ensure your episode explicitly sets a Recorded On date.
  5. Format your episode's title like this: "Dartisans ep. XX: Subtitle Here"
  6. Pick a great image thumbnail. Don't use the static Dart logo.
  7. Now run make dartisansplaylist
  8. Test it, commit, and go!

Updating the book

The files under docs/dart-up-and-running/contents are autogenerated from the DocBook files for Dart: Up and Running. Here's how to update these files.

First, prepare:

  • Make sure dart (the Dart VM) is in your PATH.

    which dart /Users/me/dart/dart-sdk/bin/dart

  • Make sure xsltproc is in your PATH.

    which xsltproc /usr/bin/xsltproc

  • Find a copy of the latest .xml files that make up dart-up-and-running. For example:

    ls ~/Dart/dartbook/GITHUB LICENSE bookinfo.xml ch02.xml ch05.xml figs README.md ch00.xml ch03.xml code foreword.xml book.xml ch01.xml ch04.xml colo.xml

Now you're ready. From the top directory of this repo, run the following command, specifying the directory that contains ch*.xml:

make book BOOK_XML_DIR=<dir-with-xml-files>

Example:

make book BOOK_XML_DIR=~/Dart/dartbook/GITHUB

Wait 4-5 minutes for results.

Very carefully check the diffs, paying special attention to the headers at the top. Rerun the make book command if you aren't sure of the changes.

(Yes, different runs of make book can have different results, even when the .xml files haven't changed. The problem I've noticed has been misnaming files or skipping them in the navigation. Reported as dartbug.com/8128.)

dartlang.org's People

Contributors

adam-singer avatar alanjoyce avatar azenla avatar butlermatt avatar chalin avatar chrisbu avatar d2m avatar efortuna avatar gramster avatar jjinux avatar johnmccutchan avatar kellegous avatar kevmoo avatar kwalrath avatar marycampione avatar mkustermann avatar modernserf avatar munificent avatar nex3 avatar pq avatar scorpiion avatar sethladd avatar sfshaza2 avatar sgjesse avatar shailen avatar sigmundch avatar stephliu avatar timothyarmstrong avatar vicb avatar whesse avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.