Code Monkey home page Code Monkey logo

www.ruby-lang.org's Introduction

Join the chat at https://gitter.im/ruby/www.ruby-lang.org

Build Status

This is the Jekyll source of the www.ruby-lang.org website.

How to Contribute?

You can contribute by reporting errors or suggesting improvements. Just open an issue or pull request.

This is a big project with many translations involved. Please help us stay on top of things by following our guidelines for contributors.

Get It!

Bundler will take care of the dependencies, so unless you already have done so, you might need to install bundler with:

gem install bundler

Then clone the repository and install the dependencies:

git clone https://github.com/ruby/www.ruby-lang.org.git
cd www.ruby-lang.org/
bundle config set --local without production
bundle install

Make Changes

Making changes is easy: just locate the Markdown source of the page you want to improve, then make your changes or add content.

If you plan to submit a pull request or want to preview your changes on Heroku, you need to

  • create a topic branch,
  • commit your changes to this branch.

See the project's wiki for some guidelines on how your commits and PRs should look like.

Preview Your Changes

Preview Locally

Generate the website with

bundle exec rake build

Then start a local web server with

bundle exec rake serve

Open http://localhost:4000/ in your browser to access the preview.

Note: The build of the site will take several minutes.

Alternatively, you can use Jekyll directly.

bundle exec jekyll serve --watch --future --incremental

If your draft uses future date, you may want to use --future option.

Preview on Heroku

In case a build is not possible on your local machine or you want to test your changes under production conditions you can also create a preview on Heroku.

  • Sign up for Heroku if you do not have an account yet.

  • Install the Heroku Toolbelt.

  • Unless you already have, cd into your local working copy of this repo.

  • Create a preview app on Heroku using the custom buildpack:

    heroku login
    heroku create --buildpack https://github.com/ruby/heroku-buildpack-www-ruby-lang.git
  • Push your feature branch:

    git push heroku feature_branch:master

    To create a preview of the master branch:

    git push heroku master

Open the preview in your browser with heroku open or retrieve the preview URL using heroku info and open it in your browser.

Testing

Besides generating and previewing the site you can perform additional tests with these tasks:

bundle exec rake lint          # run linter on markdown files
bundle exec rake check:markup  # check markup for all generated pages
bundle exec rake check:links   # check for 404's (needs a running local server)

More Information

For more information see the wiki.

www.ruby-lang.org's People

Contributors

aleksandrilyin avatar alepore avatar andorchen avatar chikamichi avatar crabonature avatar dabit avatar dependabot[bot] avatar dsh0416 avatar gazay avatar gmitrev avatar hsbt avatar ismailarilik avatar jcserracampos avatar juanitofatas avatar makimoto avatar mame avatar marocchino avatar meisyal avatar nagachika avatar namsk avatar nurse avatar postmodern avatar quintus avatar riseshia avatar sorah avatar stomar avatar unak avatar vtamara avatar yous avatar znz avatar

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

www.ruby-lang.org's Issues

Last couple of commits do not build (Jekyll 0.12.0 / kramdown 0.13.8)

On my system the site does not build anymore. I narrowed it down to commit 8e69da1, the previous commit works fine.

I use ruby-1.9.3-p374 on Linux and freshly updated gems.

Error:

/home/user/.rvm/gems/ruby-1.9.3-p374/gems/kramdown-0.13.8/lib/kramdown/parser/kramdown/list.rb:217:in `block in parse_definition_list': undefined method `type' for nil:NilClass (NoMethodError)

Remove duplicate "Posted by" info on news posts (ja)

The posts in ja are the only ones(?) on the original site that show "Posted by" information on each post's HTML page. These have been imported into the markdown files as part of the post's text, so that the information appears twice (the staticly included "Posted by" line and the generated one).

Use consistent markdown for all code examples

Some code examples are defined using the {{ highlight xy }} tag in the markdown files, some are defined using code blocks with attribute lists, like {: .code .bash-code}, some are defined as plain code blocks. This results in differently structured html.

Consistent syntax would simplify the CSS.

Remove empty code box from headers of subpages

The code box for the random code samples should only show up on the home pages (/lang/index.html). Currently it shows up as an empty box in the header of all pages.

Reason: all pages use <body id="home-page-layout">, but only the home pages should.

Localize the News Archive plugin

The News Archive plugin and the news layouts need localization.

Strings

  • Recent News
  • Archives
  • Archives By Month
  • Continue Reading
  • Month names

Locales can be accessed from the Archive Page classes using config['locales'].

Correct wrong languages for highlighted code

On the original site there are some code examples in C, Python, ... that have the ruby-code CSS class. After migration the corresponding Jekyll highlight tag should be changed to the correct language.

Redirections

For the current site there seem to exist some redirects, e. g.

/en/license.txt -> 302: http://www.ruby-lang.org/en/about/license.txt
/en/LICENSE.txt -> 302: http://www.ruby-lang.org/en/about/license.txt
/ja/install.cgi -> 302: http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=Ruby+Install+Guide
/cgi-bin/cvsweb.cgi/ -> 301: http://svn.ruby-lang.org/

Possibly more. Will they still work after transition? (Probably an Apache thing.)

Updated 2013-04-14:

/ja/20030611.html -> 302: www2.ruby-lang.org/ja/20030611.html -> 301: http://www.ruby-lang.org/

Add missing page anchors

We should check for missing anchors that are linked to from within the site.

I found only one reference (needed for en, ja, zh_cn, zh_TW):

news/2008/08/08/multiple-vulnerabilities-in-ruby/#label-3

(Section on "Lack of taintness check in dl" in the post.)

Should we add a section id or can we just change the links to point to the article instead of the section?

Non-localized sidebar links always point to /en site

When no localization of the sidebar is defined (e. g. for ja/), the /en sidebar is used with links to the /en site.

Instead, the links should be defined in _config.yml without the lang part, and page.lang should be used to generate the correct localized links.

Correct links to preview.ruby-lang.org

E.g. on en/security/ there is a link to

http://preview.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/

There are more. These should be fixed.

Use the same path structure and page names for all languages

pt and pl use different paths than the rest of the languages.

This makes maintenance more complicated and is annoying. Consistently using the same path structure would make searching/comparing/editing of corresponding pages much easier.

E.g. for pt: noticias-recentes (news), comunidade (community), ...

(Of course, ja is a special case and is excluded from this suggestion).

Missing header texts, primarily in news posts

Many header texts are missing, instead part of markdown shows up on the html pages ("##"), see e.g. en/news/2013/02/06/ruby-1-9-3-p385-is-released.html.

The corresponding lines in the markdown files are truncated after the first space of what should be the header ('## ').

This mainly affects news posts (as shown from grep -E '^#+ $' **/*).

Improve import of some code examples

On the original site, some preformatted code is enclosed in <code><pre> instead of <pre><code>, e.g. on en/community/ruby-core. This is imported at the moment into markdown like this:

Checking out the latest Ruby source code is a matter of logging into
the [Subversion][1] anonymous account. From your commandline:

 `
 $ svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby
` The `ruby` directory will now contain ...

Fix the rake task to switch the tag order and produce markdown with a nice code block.

How to handle missing subpages for translated sites?

Some subpages are not present for translated sites,

e.g. /ja/documentation/success-stories/, or /de/security/

At the moment for the first example there is a sidebar link into nirwana and for the second example there is a navigation bar where the security subpage link is omitted.

What should the general strategy be for missing translations:

  1. provide a link to the original page (en)
  2. omit the link
  3. ...?

Import news task

Add a separate rake task that imports the News posts via their RSS feed.

Update content to current state of ruby-lang.org

Since August 2011 there have been updates and fixes to ruby-lang.org (besides news post). Those include updates for current versions (e.g. on the downloads page), fixed typos, etc., both on the original site and on translated sites.

How to incorporate these?

Update: The downloads page is not a very good example, since the current version is included from site config, but there are differences on some pages. (Note to self: e.g. on "To Ruby from Python", list item concerning new style / old style classes).

Update the Ruby license for all translations

Some translations link to an outdated version of the Ruby license (on the about page), these need to be updated.

Update: Done with 78cc297.

To DRY this out, all translations should link to the same file, not to different copies.

Update credits for new site

The GitHub repository and/or its "Issues" page should be linked in the credits.

Proposal (not perfect; links are italic):

This website was generated with Ruby using Jekyll. It is proudly maintained by members of the Ruby community. Please contribute on GitHub or contact our webmaster for questions or comments concerning this website.

Updated

Fix existing broken links

Fix the following existing broken links:

http://www.ruby-lang.org/bg/libraries/top-projects/ -> /cs/
http://www.ruby-lang.org/pt/ -> /pt/about/
http://www.ruby-lang.org/pt/ -> /pt/news/
http://www.ruby-lang.org/tr/news/ -> /tr/security/
http://www.ruby-lang.org/tr/documentation/success-stories/ -> /tr/community/mailing-lists/
http://www.ruby-lang.org/tr/documentation/success-stories/ -> /tr/community/user-groups/
http://www.ruby-lang.org/tr/documentation/success-stories/ -> /tr/community/weblogs/
http://www.ruby-lang.org/tr/documentation/success-stories/ -> /tr/community/ruby-core/
http://www.ruby-lang.org/tr/documentation/success-stories/ -> /tr/libraries/top-projects/
http://www.ruby-lang.org/bg/about/ -> /bg/about/license.txt
http://www.ruby-lang.org/fr/about/ -> /fr/about/license.txt
http://www.ruby-lang.org/it/about/ -> /it/about/license.txt
http://www.ruby-lang.org/it/news/2011/02/27/planned-maintenance-of-redmine-ruby-lang-org/ -> /it/news/2011/02/27/mailto:[email protected]
http://www.ruby-lang.org/it/community/mailing-lists/ -> /it/community/mailing-lists/manual-instructions/
http://www.ruby-lang.org/pl/about/ -> /pl/about/license.txt
http://www.ruby-lang.org/pt/sobre-o-ruby/ -> /pt/sobre-o-ruby/licence.txt
http://www.ruby-lang.org/tr/community/ -> /tr/community/kullanici-gruplari/
http://www.ruby-lang.org/tr/community/ -> /tr/community/eposta-listeleri/
http://www.ruby-lang.org/tr/community/ -> /tr/community/ruby-cekirdek/
http://www.ruby-lang.org/tr/community/ -> /tr/community/webloglar/
http://www.ruby-lang.org/tr/community/ -> /tr/community/konferanslar/
http://www.ruby-lang.org/tr/about/ -> /tr/about/license.txt
http://www.ruby-lang.org/zh_cn/downloads/ -> /zh_CN/community/ruby-core/
http://www.ruby-lang.org/zh_cn/documentation/ -> /zh_CN/documentation/quickstart/
http://www.ruby-lang.org/zh_cn/documentation/ -> /zh_CN/documentation/ruby-from-other-languages/
http://www.ruby-lang.org/zh_cn/security/ -> /zh_CN/news/2008/08/08/multiple-vulnerabilities-in-ruby/
http://www.ruby-lang.org/zh_cn/security/ -> /zh_CN/news/2008/07/01/arbitrary-code-execution-vulnerabilities/
http://www.ruby-lang.org/zh_cn/about/ -> /zh_CN/community/mailing-lists/
http://www.ruby-lang.org/zh_cn/documentation/quickstart/ -> /zh_CN/downloads/
http://www.ruby-lang.org/zh_cn/documentation/ruby-from-other-languages/ -> /zh_CN/documentation/
http://www.ruby-lang.org/ko/news/2005/07/01/xmlrpcipimethods-vulnerability/ -> /patches/ruby-1.8.2-xmlrpc-ipimethods-fix.diff
http://www.ruby-lang.org/en/news/2011/02/22/planned-maintenance-of-redmine-ruby-lang-org/ -> /en/news/2011/02/22/mailto:[email protected]
http://www.ruby-lang.org/ja/news/2005/09/22/20050922/ -> /ja/news/2005/09/22/20050922/20050701.html
http://www.ruby-lang.org/ja/news/2002/12/10/20021210/ -> /en/rc2002-minor/
http://www.ruby-lang.org/ja/news/2002/12/10/20021210/ -> /en/oopsla2002/
http://www.ruby-lang.org/ja/news/2002/12/10/20021210/ -> /en/ll2/
http://www.ruby-lang.org/ja/news/2002/12/10/20021210/ -> /ja/of-kansai/
http://www.ruby-lang.org/zh_cn/news/2008/03/10/-rails-2008/ -> /zh_cn/news/2008/03/10/-rails-2008/Scotland%20on%20Rails%202008
http://www.ruby-lang.org/zh_cn/news/2008/03/10/-rails-2008/ -> /zh_cn/news/2008/03/10/-rails-2008/Michael%20Koziarski%20and%20David%20Black

ruby-lang.tk is parked

ruby-lang.tk seems to be domain-parked now and redirects to sites on the other end of the alphabet for me.

Import sub-directories of news posts

Import the following sub-directories:

  • /en/news/2004/07/22/incident-analysis-of-the-intrusion-on-heliumruby-langorg/report/
  • /en/news/2004/06/22/anonyous-cvs-service-restart/announce/
  • /en/news/2004/06/15/wwwftp-service-restart/a/
  • /en/news/2004/06/01/notice-on-ruby-langorg-mailing-list-service-restart/announce/
  • /en/news/2004/05/29/heliumruby-langorg-was-cracked/report/
  • /en/news/2002/12/11/ruby-hacking-guide-is-out-though-/table-of-contents/

Make sure every page has a page.lang attribute

A missing page.lang causes problems.

See for example /en/documentation/quickstart/2/: the Ruby logo links to "http:///" and the site links are broken.

So: check all pages and/or provide for a reasonable fall back.

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.