Giter VIP home page Giter VIP logo

crystal-website's Introduction

Crystal Website

Powered by Jekyll

Development setup (via docker)

  • Checkout the repository
  • Run $ docker-compose up
  • Open a browser in localhost:4000

The docker container will launch jekyll with --incremental option.

Development setup (Nix)

  • Checkout the repository
  • Run $ nix-shell
  • Open a browser in localhost:4000

Development setup (Devenv)

Using devenv

  • Checkout the repository
  • Run devenv up to start a local web server
  • Open a browser in localhost:4000
  • Run devenv shell to get a shell with all development environment

Thanks!

As always, thanks to the community who contributes to Crystal and its infrastructure and projects.

License

Crystal is licensed under the Apache License, Version 2.0

crystal-website's People

Contributors

asterite avatar bcardiff avatar beta-ziliani avatar bew avatar byron avatar danimiba avatar dentarg avatar dependabot[bot] avatar fryguy avatar ftarulla avatar github-actions[bot] avatar hertzdevil avatar jhass avatar kcreate avatar matiasgarciaisaia avatar mattrberry avatar mekhla18 avatar ndbroadbent avatar nedkohristov avatar nicck avatar oprypin avatar pettimart avatar philnash avatar renovate[bot] avatar sanks02 avatar signed-log avatar spalladino avatar splattael avatar straight-shoota avatar waj 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crystal-website's Issues

Contribution Guide?

Is there a contribution guide for the website? What framework is being used to compile? If I'm just changing markup, do I just edit the .haml file, .html files, or both?

Fix google rankings of docs by using weighting / google sitemaps

For me I get:

image

aka, linking to https://crystal-lang.org/api/0.20.1/HTTP/Client.html

I actually want https://crystal-lang.org/api/0.30.0/HTTP/Client.html, or "latest" (https://crystal-lang.org/api/latest/HTTP/Client.html).

This can be done, with sitemap (https://en.wikipedia.org/wiki/Sitemaps) using weighting, aka priority:

<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    <url>
        <loc>https://crystal-lang.org/api/0.20.1/HTTP/Client.html</loc>
        <lastmod>2019-07-10</lastmod>
        <changefreq>daily</changefreq>
        <priority>0.1</priority>
    </url>
    <url>
        <loc>https://crystal-lang.org/api/0.30.0/HTTP/Client.html</loc>
        <lastmod>2019-07-10</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>
</urlset>

etc...

Mention Crystal Jobs

I've created https://crystaljobs.org - the website for Crystal Job postings with neat editor, e-mail subscriptions and moderation.

I think that it's a good idea to mention this website on the official Crystal site. That would lead to more e-mail (and twitter) subscribers, which would increase the value of Crystal Jobs which would lead to more Job postings which would lead to the language growth itself.

FYI, VueJS has Jobs link on their website at Ecosystem / News / Jobs and its about section confirms that it's a third party website.

If the team has notes or features they'd like to see on Crystal Jobs, let me know.

Reorder installation instructions

I'd like to pick up on my suggestion in #86 (comment) to improve the order of platforms listed on the Install page.
Currently, it seems to not follow any particular order. At least it's not visible.
While it's not super important, I think it can help people to proceed with installation.
Alternatively, we could just order lexically.

Relevant factors for sort order are:

  1. Popularity of the platform
    We don't have any statics for platform popularity, but I suppose the majority of Crystal users is probably something like macOS, Ubuntu, Arch/Manjaro, Alpine, WSL

  2. Availability of official Crystal distribution package
    Native packages are provided for macOS and Linux distributions using APT or RPM. Binaries are available for macOS and generic Linux.

  3. Availability of Crystal package in platform's native package system
    Alpine, Arch, FreeBSD, Gentoo, Void maintain Crystal packages.

from sources and from .tar.gz are special because they are not instructions for specific platforms but generic distribution methods. Theoretically, they could be treated like snapcraft and linux brew and included in (almost) every platform's installation instructions. But they are usually more effort than installing a package, so that's usually preferred. It might make sense to at least mention the generic binary releases on linux distributions (maybe only on those that don't provide a package).

These platforms, that don't provide a genuine installation method but only through snapcraft the availability of Crystal is a bit thin. Snapcraft is not a native installation, it's a governed sandboxed environment. If I were a user of one of those distributions and see installation instructions that require me to use snapcraft, I'm pretty sure I'd simply jump ship because I want to use Crystal, not Snapcraft.

This affects Elementary OS, KDE neo, Linux Mint (shouldn't that be able to use the APT package?) and Manjaro (AFAIK there is a Crystal package). IMO it would be best to remove those platforms that only provide installation instructions using snapcraft.
Technically, almost all Linux distros should be able to install Crystal using linuxbrew. I don't think we want to list literally all distros and provide installation instructions using linuxbrew either.

Alternatively, we could consider adding Linuxbrew and Snapcraft as generic distribution methods in the same category as from sources and .tar.gz. So if you're using one of these tools, you can immediately get installation instructions for that platform as they're not distro-specific.
We could still leave references to Linuxbrew and Snapcraft in the respective distros' instructions.

Hello World Example Issues

Hello,

I wanted to use the hello world example from this page:
https://crystal-lang.org/2013/07/10/hello-world.html

but I encountered the following error:

Can't infer the type of instance variable '@name' of Greeter

    @name = name.capitalize
    ^~~~~

I fixed the issue, by adding a property statement

class Greeter
 property name : String
  def initialize(name)
    @name = name.capitalize
  end
  ....
end

Another issue while trying to compile:

$ bin/crystal hello.cr
$ ./hello
Hello World
$

this does not work anymore. It is enough to simply use:

$ bin/crystal hello.cr

and if you want to produce an executable:

$ bin/crystal compile hello.cr
$ ./hello

My crystal version is: Crystal 0.18.2 (2016-06-17) [on Archlinux]

I think it would be a good idea to update this example.

By the way I really like that you show the hello world example as simple puts, class and block.

"Install" guide/link

There's no "Install" section or link in the website. We should probably include one.

Integrate docs and API with official website.

By @spalladino on #19

@flagello if you're interested in exploring other sections, feel free to take a look at what we have designed so far for the book and the API reference. We haven't started implementing them, so suggestions are welcome. Keep in mind though that we fully give our designer the last word on how the site should look like ;-)

Some images:

213804748

213868242

Also Devdocs search is a good inspiration:

devdocs

Add integration with online playground for code samples

It would be lovely if there was a "run" button on the code samples... I take it you care about adoption, since you bother providing a REPL - it's common for language sites to make code samples more useful by linking to the REPL so people can try and modify the code samples, and probably low-hanging fruit since you did the hard work of building a REPL already?)

Originally posted by @mindplay-dk in #75 (comment)

I think REPL means an online playogrund (i.e. https://play.crystal-lang.org) which is not really an REPL (but serves a similar use case).

This is an excellent idea. We should definitely do that. An MVP should be pretty simple, just C&P the examples to play and paste the link to the result page besides the original code.
Additionally, we should try to make the examples self-contained. The LibGMP example doesn't compile currently, but this can be fixed.
The HTTP server example won't work either, but that's to be expected. We should consider putting a different example on top which provides a meaningful play button.

The play links are fixed to the Crystal version used at creation. This would mean they need to be updated for every release. But I think that's fine for now. But this can certainly be improved.

Similar playground links would be nice for https://github.com/crystal-lang/crystal-book as well, and maybe the stdlib API docs. But the website has probably the most exposure to newcomers interested in seeing Crystal in action, so this should come first and then we can follow up with other parts.

/cc @jhass

Change google analytics tracking script

The current script throws a warning:

A Parser-blocking, cross-origin script, https://ssl.google-analytics.com/ga.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity. See https://www.chromestatus.com/feature/5718547946799104 for more details.

To fix it, use the following script, replacing UA-CODE by the actual tracking code.

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-CODE', 'auto');
  ga('send', 'pageview');

</script>

Remove or replace Google Analytics

Hey there!

I'd like to ask if Google Analytics can be removed from the website (maybe Google Fonts as well). Google has been heavily criticized[1][2] for abusing user's data, and there are posts about Google Analytics' problems[3][4]. I would love to see Google Analytics removed from this website!

If you still want analytics, then there are FOSS and ethical alternatives listed in this website: https://developers.reverseeagle.org/replace/google-analytics/

References:

ElementaryOS also has switched to Plausible, and they love it!: https://blog.elementary.io/leaving-google-analytics-is-finally-plausible/

[Mobile] Minor details

Version 9e35319, tested on iPhone 5s

  • Home header buttons are missing a border border: 2px solid #ffffff;
    img_4037

  • "Crystal language, born & raised at Manas" should have text in color black
    img_4038

  • Collapsed menu shows links with a non desirable border-bottom: 1px solid #777777;
    img_4035

  • 'Community' title is larger than screen width
    img_4034

  • In Sponsors, the 'Since' date appears shrinked in three lines
    img_4033

  • Many sections should appear centered but instead are shown aligned to the left
    For example in Sponsors, the Want to become a sponsor? section:
    img_4032

Add an overview page to show available versions for the API docs

Currently the website doesn't directly show which versions are available in the API docs. There's the version selector since crystal-lang/crystal#9074 on each individual API docs page. But this only works with JavaScript and is somewhat limited in capabilities.

Ideally such an overview should show more information than just version names and link to API docs of that version.
Basic information is already available in a machine-readable format at https://crystal-lang.org/api/versions.json
This could be further enhanced by relevant data, but a basic list would already be an improvement.

I'd like to add a noscript alternative to the version selector, which should contain of a link to a versions overview page (cf. crystal-lang/crystal#7011 (comment)).

Identity and Design

Considering 2017 may see the bright light of 1.0, it may be a good time to start discussing the definition of Crystal visual personality and communication style.

I would aim to make Crystal's elegance and efficiency-via-essentiality universal and inherently visible in all of its forms and voices. Other than being, I suggest to accompany developer perception and experience into elegance and essentiality.


I took the liberty of starting from the logo to kickstart things up. I would love to see other suggestions from fellow designers or feedback and ideas from the community. I do not consider this direction to be of particular value.

logo-0

logo-3

logo-1

logo-2

logo-4



I then focused on the website. Please, again, share any thought.

1440 ⨉ 900 (@2) [Fullscreen MacBook Pro Retina]
0

375 ⨉ 667 (@2) [Fullscreen iPhone 7]



I used #862E9C (purple) as a variant of the #2e1052 that appears in the docs.

I suggest the persistence of Moriston for <hN> + <p> and SF Mono for <code>. Forma DJR may be a potential alternative for <hN> + <p>. Within both environments, the view scrolls to more details (raw information and full navigation). For desktop, a more prominent action to discover details may aid interaction (possibly “Learn More” or “Get Started”).

I suggest to constrain the information-on-impact to the essential. Should my direction be determined to be of value, what is essential is of course up for research and debate. Currently presented information is in fact indicative.



(Thanks! :)

Release notes for 0.24.2

Are there any plans on writing release notes for 0.24.2?

I could help with this one again, although I think it would generally be better if release notes were written by a core member.

Snake case instead of camelcase ?

In Doc: https://crystal-lang.org/docs/using_the_compiler/index.html

The name of project is in Camelcase not in Snake case. Maybe it will be better to write: my_cool_lib?

Creating a project or library

Use the init command to create a Crystal project with the standard directory structure.

$ crystal init lib MyCoolLib
      create  MyCoolLib/.gitignore
      create  MyCoolLib/LICENSE
      create  MyCoolLib/README.md
      create  MyCoolLib/.travis.yml
      create  MyCoolLib/shard.yml
      create  MyCoolLib/src/MyCoolLib.cr
      create  MyCoolLib/src/MyCoolLib/version.cr
      create  MyCoolLib/spec/spec_helper.cr
      create  MyCoolLib/spec/MyCoolLib_spec.cr
Initialized empty Git repository in ~/MyCoolLib/.git/

Release notes are utterly outdated

On the homepage, section Release Notes, last entry is from 22 Nov 2016. More than a year ago. Anyone looking there would come to the conclusion that Crystal has not seen a release since then, i.e. it's more or less dead.

There are two options: Either add release notes for all recent releases and keep this section updated or remove it entirely. Better no information than information that is misleading.

As a very simple solition it could just link to the release notes on Github.
I would prefer to have proper release notes for any release. It doesn't have to be as detailed as the recent entries from 2016, but mentioning the highlights would be awesome. And a reference to the detailed list on Github.

If the section is to stay, there should be some mechanism to ensure a release note post is prepared for any release. I think this could fit very well in the new workflow of having a PR for each release including it changelog. Whoever opens this PR on the main repo should make sure to open an issue here. I think this can be provided by the community, no need to put a core dev on this (unless they want to).

Bountysource link in Sponsors instructions doesn't have a text-decoration

Version c8873ee

  1. Navigate to Sponsors
  2. Hover over "Bountysource profile"

Expected:
"Bountysource profile" should appear underlined as other links inside a <p> in the page

screen shot 2017-04-26 at 10 47 07 am

Note that Chrome and Safari do not support a <h3> inside a <p>

We grab the website and avatar from your <a href="https://www.bountysource.com/settings" target="_blank">Bountysource profile</a>. If that fails, we try to use your GitHub or Twitter accounts listed in that same profile.

Refresh timely content

  • Add fresh tweets
  • Update stargazers number
  • Update shards numbers
  • Find fresher news outlinks

Learn / Getting Started page

The "Learn" button on the homepage currently links to https://crystal-lang.org/reference/overview/ which is not a very encouraging landing page for people trying to get to know the language.

We could consider linking to the new /docs section (added in #95). But it's not an entirely good fit either. Reading documentation is a part of learning, and learning resources are a part of the documentation. However, I think this call to action should lead to an introductory, specifically tailored to getting new users started. Hence I'd probably call it "Getting Started".

We're still missing a proper getting started guide, but there are already a number of resources that can help with onboarding.

What I'd like to include on this page (roughly in order of priority):

Need a hipster idea for Crystal website

My first impression on Crystal Lang website (https://crystal-lang.org) feels dry, boring and too many code examples in a page which can do more harm or scared away newbie or non-IT savvy when they visit the site for the first time, in contrast to RubyOnRails, Laravel, Vapor, etc.

If we want to grow community from all walk of life, we’ll need to revamp with friendly introductions and what made Crystal so special from other languages, this way the community will adopt without feeling difficulty or less motivated to pick up 2nd language after Ruby.

What do you guys think or some suggestions could be interesting.

404 on API docs path should not redirect out of context

When you request a non-existing path in the API browser (for example https://crystal-lang.org/api/master/Flate.html), you're redirected to https://crystal-lang.org/404.

There are two problems with this:

  • Redirecting on client error is annoying. I don't want to go to another URL, the server should tell me directly at the requested URL when it doesn't exit. That way I could easily fix a typing error for example. With a redirect, the requested URL is not directly available anymore.
  • When a 404 occurs in the context of the API browser, it seems more reasonable to stay in that context (i.e. provide an error page in the API browser) instead of switching to the crystal-website context. From there it's not easy to follow on and try to find the resource you're looking for.

Ideally, https://crystal-lang.org/api/master/Flate.html should show a 404 page in the API browser design with the sidebar and state that the page was not found and maybe this feature was removed and documentation can be found in an older version. This would also allow to change the version selector in the sidebar to take you directly to a different version of a page instead of the readme which is currently the case.

Solutions might be out of scope for this repo, but I suppose this is probably the best place to discuss this.

Interactive Tutorial

Preface: (if this issue causes any issues just tell me and I will pm Brian on the forum instead). I was browsing the Chicago meetup website and noticed Brian mentioned Haskell. I've read Ary uses Haskell as well, so I decided to check it out. I've heard about Haskell before, but I know it's a functional language so I've stayed away ( my mind just doesn't work with functional languages ).

Anyways.. so I went to Haskell's website and started to complete the interactive tutorial. You type in actual code, and if it matches what the tutorial wants you to learn, it will advance the user to the next section.

I've never done a tutorial like this, and IMHO it felt amazing and a great learning experience. I think it would be very cool to have something similar on Crystal's website!

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.