Git Product home page Git Product logo

ceylon-lang.org's Introduction

layout title tab author
code
Building the website
code
Emmanuel Bernard

How to build ceylon-lang.org

A bit of Git, a bit a Ruby and you will get your local version of ceylon-lang.org served.

Prerequisites

  • Get Git
  • Get Ruby > 2.1
  • If on Mac OS:
    • Get XCode (needed for compilation of native gems)
  • If on Linux:
    • Get libxslt-dev - eg via sudo apt-get install libxslt-dev (may be called libxslt1-dev for some distros)

Install Git to your system. GitHub's help page is a good starting point. Emmanuel's blog on Git tips and tricks is useful too.

Installation

Ensure Rake is installed

Make sure Rake is available. It is often installed per default.

rake --version

If you get "command not found":

gem install rake

Ensure Bundler is installed

Make sure Bundler is available. It manages your Ruby gems locally to the project and prevents version conflicts between different Ruby projects. To quote from the website:

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.

bundle -v

If you get "command not found":

gem install bundler

Get the source

git clone [email protected]:ceylon/ceylon-lang.org.git
cd ceylon-lang.org

Setup awestruct

rake setup
rake check

Note that on existing installs, you might see the following error

/Users/alice/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'bundler' (>= 0) among 8 total gem(s) (Gem::LoadError)
        from /Users/alice/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
        from /Users/alice/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
        from /Users/alice/.rvm/gems/ruby-2.1.2/bin/bundle:22:in `<main>'
        from /Users/alice/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
        from /Users/alice/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
rake aborted!

It is due to a partial or corrupt installation of the bundles that you need to clear. Do either of these operations:

rake clean[all]
# if that fails, do
rm -fR .bundle _tmp _bin

Then run the rake setup command again.

Serve the site locally

rake preview

Point your browser to http://localhost:4242

Any change will be automatically picked up except for _partials files, _base.css and sometimes new blog entries.

Which other tasks exist in the Rake build file?

rake --tasks

This will list the available tasks with a short description

How to also include the spec and ceylon doc pages

Is that obsolete?

Use ./build-site.sh. This will clone or refresh the spec, language and compiler repos into _tmp and build the appropriate artifacts before pushing them to the site.

If you have already run ./build-site.sh and don't wish to rebuild the spec and ceylondoc, use

./build-site.sh --light

to simply copy them to the website structure. This is much faster.

If your changes are not visible...

Panic! Then completely regenerate the site via:

rake clean preview

If serving the site is slow...

On Linux, serving the file may be atrociously slow (something to do with WEBRick).

Use the following alternative:

  • Go in your ~/ceylon-lang.org directory.
  • Run rake gen
  • In parallel, go to the ~/ceylon-lang.org/_site directory
  • Run python -m SimpleHTTPServer 4242

You should be back to millisecond serving :)

License

The content of this repository is released under Creative Commons Attribution Share-Alike 3.0 Unported (CC BY-SA 3.0). Sample code available on this website is released under Apache Software License 2.0.

By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the respective licenses mentioned above.

Acknowledgements

This website uses:

ceylon-lang.org's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ceylon-lang.org's Issues

Update tour to use more compact syntax for control structures

All through the tour we have stuff like "if (exists String name = person.name)", "try (Session s=Session())" and "for (Person p in people)". We should prefer the new shorter form: "if (exists name = person.name)", "try (s=Session())" and "for (p in people)".

Tour: XXX

In the tour there are missing links, generally marked XXX, to stuff originally posted on in.relation.to. These should be fixed

Write quick introduction guide or get rid of it

/documentation/introduction/ is simply pointing to the tour today,

We need to decide the top 5 features we want to show in the quick tour.
Remember the quick tour is only 1 page long and should interest people to find more information.

Linking to the spec and API doc

We need to link to the spec and API doc from the awestruct generated site. If we can agree what the URL will be we can write docs now even in the absence of these.

Trim the size of the bamboo background

We should somehow try to get the size down, it's a 560KB image (which somehow often does not get cached) and I can see it load on my 20Mb connection.
Maybe we can make it less wide (1500px is a lot) and make it repeat with some clever photoshop trickery?

Tour: Work transcluded sections into the body text

When I initially copied the tour from in.relation.to I also copied in some of the related posts, e.g. anonymous functions, and (un)currying. These need editing to ensure that what's documented is what's actually been implemented, and the content needs to be worked into the main body of the tour. Search for 'transcluded' to find where I've done this.

We also need to consider adding content for other posts which I missed.

Put a caching strategy in place

Use .htaccess / apache capabilities

Safe things to cache are images and with a lower expiration CSS.
Actual content is more dangerous so I'd rather not do it initially.

Icons for code examples

The syntax highlighter requires some .png files for icons, which are missing:

/stylesheets/img/page_white_code.png
/stylesheets/img/printer.png
/stylesheets/img/help.png

Clarify how to build ceylon-lang.org on Windows systems

A user is having problem installing Awestruct on Windows, let's try and smooth this process

Here is the feedback

  1. I read the instructions on https://github.com/emmanuelbernard/ceylon-lang.org
  2. I downloaded ruby for Windows from http://rubyinstaller.org/
  3. I downloaded awestruct from http://rubygems.org/gems/awestruct
  4. gem install awestruct-0.2.10 I get the following error:
    ERROR: Error installing awestruct-0.2.10: The 'hpricot' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
  5. I downloaded hpricot from http://rubygems.org/gems/hpricot
  6. gem install hpricot-0.8.5 I get the following error:
    ERROR: Error installing hpricot-0.8.5: The 'hpricot' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit' Please,

Could you show me if i followed the steps correctly and i made the downloads right?, and How i correct this error to build ceylon-lang.org?

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.