Skip to content

Commit 01af1d9

Browse files
committed
Add a page with all cases, restructure layout
1 parent 9d5290c commit 01af1d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+127
-169
lines changed

_includes/categories-list.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ <h3 class="widget-title">Blog Categories</h3>
33
<ul>
44
{% assign sorted_cats = site.categories | sort %}
55
{% for category in sorted_cats %}
6-
<li><a class="spec" href="/blog/categories.html#{{ category | first }}">{{ category | first }}</a></li>
6+
{% assign category_first = category | first %}
7+
<li>
8+
{% if category_first == "Elixir in Production" %}
9+
<a class="spec" href="/cases.html">{{ category_first }}</a>
10+
{% else %}
11+
<a class="spec" href="/blog/categories.html#{{ category_first }}">{{ category_first }}</a>
12+
{% endif %}
13+
</li>
714
{% endfor %}
815
</ul>
916
</div>

_includes/top.html

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<li class="menu-item install"><a class="spec" href="/install.html">Install</a></li>
4040
<li class="menu-item getting-started"><a class="spec" href="/getting-started/introduction.html">Guides</a></li>
4141
<li class="menu-item learning"><a class="spec" href="/learning.html">Learning</a></li>
42+
<li class="menu-item cases"><a class="spec" href="/cases.html">Cases</a></li>
4243
<li class="menu-item development"><a class="spec" href="/development.html">Development</a></li>
4344
<li class="menu-item docs"><a class="spec" href="/docs.html">Docs</a></li>
4445
<li class="menu-item blog"><a class="spec" href="/blog/">Blog</a></li>

_layouts/getting-started.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
section: getting-started
3-
---
4-
51
{% include top.html %}
62

73
<div id="sidebar-primary" class="sidebar">
@@ -22,6 +18,13 @@ <h3 class="widget-title">{{guide.title}}</h3>
2218

2319
<div id="content">
2420
<article>
21+
<div class="getting-started-title">
22+
<small>{{ page.category | default: "Getting Started" }}</small>
23+
<h1>{{ page.title }}</h1>
24+
</div>
25+
26+
{% include toc.html %}
27+
2528
{{ content }}
2629
</article><!-- .hfeed -->
2730

_layouts/post.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ <h1>{{ page.title }}</h1>
1111
{% if page.subtitle %}
1212
<h2>{{ page.subtitle }}</h2>
1313
{% endif %}
14-
<div class="byline">{{ page.date | date: "%B %d, %Y" }}{% if page.author %} &middot; by {{ page.author}}{% endif %} &middot; in {% for category in page.categories %}<a href="/blog/categories.html#{{category}}" class="category">{{ category }}</a>{% endfor %}</div>
14+
<div class="byline">{{ page.date | date: "%B %d, %Y" }}{% if page.author %} &middot; by {{ page.author}}{% endif %} &middot; in {% for category in page.categories %}
15+
{% if category == "Elixir in Production" %}
16+
<a class="category" href="/cases.html">{{ category }}</a>
17+
{% else %}
18+
<a class="category" href="/blog/categories.html#{{ category }}">{{ category }}</a>
19+
{% endif %}
20+
{% endfor %}</div>
1521
</div>
1622

1723
<div class="entry-content">

_posts/2020-06-23-growing-with-elixir-at-brex.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: Elixir at fintech with Brex
44
author: José Valim
5-
category: Cases
5+
category: Elixir in Production
66
excerpt: A case study of how Elixir is being used at Brex.
77
logo: /images/cases/logos/brex.png
88
tags: fintech phoenix grpc

_posts/2020-08-20-embedded-elixir-at-farmbot.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: Embedded Elixir at Farmbot
44
author: José Valim
5-
category: Cases
5+
category: Elixir in Production
66
excerpt: A case study of how Elixir is being used at Farmbot.
77
logo: /images/cases/logos/farmbot.png
88
tags: embedded nerves

_posts/2020-09-24-paas-with-elixir-at-Heroku.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: PaaS with Elixir at Heroku
44
author: José Valim
5-
category: Cases
5+
category: Elixir in Production
66
excerpt: A case study of how Elixir is being used at Heroku.
77
logo: /images/cases/logos/heroku.png
88
tags: paas phoenix

_posts/2020-10-08-real-time-communication-at-scale-with-elixir-at-discord.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: Real time communication at scale with Elixir at Discord
44
author: José Valim
5-
category: Cases
5+
category: Elixir in Production
66
excerpt: A case study of how Elixir is being used at Discord.
77
logo: /images/cases/logos/discord.png
88
tags: real-time genstage otp

cases.html

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
section: cases
3+
layout: default
4+
---
5+
6+
<h1>Cases</h1>
7+
8+
<p>Learn more about how companies across different industries are using the power of Elixir and its ecosystem to create and grow their businesses. Cases are listed in the order they have been published.</p>
9+
10+
<div class="cases-boxes">
11+
{% assign sorted_posts = site.categories["Elixir in Production"] | sort: 'date' %}
12+
{% for post in sorted_posts %}
13+
<a class="cases-box" href="{{ post.url }}">
14+
<div class="cases-image">
15+
{% if post.logo == nil %}
16+
<img src="/images/cases/logos/default-image.png">
17+
{% else %}
18+
<img src="{{ post.logo }}">
19+
{% endif %}
20+
</div>
21+
<div class="cases-tag">
22+
{% for tag in post.tags %}
23+
<span>#{{tag}}</span>
24+
{% endfor %}
25+
</div>
26+
</a>
27+
{% endfor %}
28+
</div>

css/style.css

+17-1
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ body.install div.menu li.install a,
496496
body.getting-started div.menu li.getting-started a,
497497
body.blog div.menu li.blog a,
498498
body.docs div.menu li.docs a,
499+
body.development div.menu li.development a,
500+
body.cases div.menu li.cases a,
499501
body.learning div.menu li.learning a {
500502
color: #aaa;
501503
}
@@ -665,10 +667,13 @@ body.learning div.menu li.learning a {
665667
.cases-box {
666668
margin: 1em 0.25em;
667669
text-decoration: none;
670+
}
671+
672+
#shuffled-cases .cases-box {
668673
display: none;
669674
}
670675

671-
.cases-box:nth-child(-n+3) {
676+
#shuffled-cases .cases-box:nth-child(-n+3) {
672677
display: block;
673678
}
674679

@@ -1075,3 +1080,14 @@ ol.jekyll-toc li a {
10751080
#top-banner .close:hover {
10761081
opacity: 0.7;
10771082
}
1083+
1084+
/* Getting started */
1085+
.getting-started-title h1 {
1086+
font-size: 2.3em;
1087+
}
1088+
1089+
.getting-started-title small {
1090+
font-size: 1em;
1091+
color: #999;
1092+
display: block;
1093+
}

getting-started/alias-require-and-import.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: alias, require, and import
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
In order to facilitate software reuse, Elixir provides three directives (`alias`, `require` and `import`) plus a macro called `use` summarized below:
118

129
```elixir

getting-started/basic-operators.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Basic operators
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
In the [previous chapter](/getting-started/basic-types.html), we saw Elixir provides `+`, `-`, `*`, `/` as arithmetic operators, plus the functions `div/2` and `rem/2` for integer division and remainder.
118

129
Elixir also provides `++` and `--` to manipulate lists:

getting-started/basic-types.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Basic types
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
In this chapter we will learn more about Elixir basic types: integers, floats, booleans, atoms, strings, lists and tuples. Some basic types are:
118

129
```elixir

getting-started/binaries-strings-and-char-lists.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Binaries, strings, and charlists
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
In "Basic types", we learned a little bit about strings and we used the `is_binary/1` function for checks:
118

129
```elixir

getting-started/case-cond-and-if.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: case, cond, and if
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
In this chapter, we will learn about the `case`, `cond`, and `if` control flow structures.
118

129
## `case`

getting-started/comprehensions.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Comprehensions
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
In Elixir, it is common to loop over an Enumerable, often filtering out some results and mapping values into another list. Comprehensions are syntactic sugar for such constructs: they group those common tasks into the `for` special form.
118

129
For example, we can map a list of integers into their squared values:

getting-started/debugging.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Debugging
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
There are a number of ways to debug code in Elixir. In this chapter we will cover some of the more common ways of doing so.
118

129
## IO.inspect/2

getting-started/enumerables-and-streams.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Enumerables and Streams
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
## Enumerables
118

129
Elixir provides the concept of enumerables and [the `Enum` module](https://hexdocs.pm/elixir/Enum.html) to work with them. We have already learned two enumerables: lists and maps.

getting-started/erlang-libraries.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Erlang libraries
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
Elixir provides excellent interoperability with Erlang libraries. In fact,
118
Elixir discourages simply wrapping Erlang libraries in favor of directly
129
interfacing with Erlang code. In this section, we will present some of the

getting-started/introduction.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Introduction
45
---
56
{% assign stable = site.data.elixir-versions[site.data.elixir-versions.stable] %}
67

7-
# {{ page.title }}
8-
9-
{% include toc.html %}
10-
118
Welcome!
129

1310
In this tutorial, we are going to teach you about Elixir fundamentals - the language syntax, how to define modules, how to manipulate the characteristics of common data structures, and more. This chapter will focus on ensuring that Elixir is installed and that you can successfully run Elixir's Interactive Shell, called IEx.

getting-started/io-and-the-file-system.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: IO and the file system
45
---
56

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
107
This chapter is a quick introduction to input/output mechanisms and file-system-related tasks, as well as to related modules like [`IO`](https://hexdocs.pm/elixir/IO.html), [`File`](https://hexdocs.pm/elixir/File.html) and [`Path`](https://hexdocs.pm/elixir/Path.html).
118

129
We had originally sketched this chapter to come much earlier in the getting started guide. However, we noticed the IO system provides a great opportunity to shed some light on some philosophies and curiosities of Elixir and the <abbr title="Virtual Machine">VM</abbr>.

getting-started/keywords-and-maps.markdown

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Keyword lists and maps
45
redirect_from: /getting-started/maps-and-dicts.html
56
---
67

7-
# {{ page.title }}
8-
9-
{% include toc.html %}
10-
118
So far we haven't discussed any associative data structures, i.e. data structures that are able to associate a certain value (or multiple values) to a key. Different languages call these different names like dictionaries, hashes, associative arrays, etc.
129

1310
In Elixir, we have two main associative data structures: keyword lists and maps. It's time to learn more about them!

getting-started/meta/domain-specific-languages.markdown

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Domain-specific languages
5+
category: Meta-programming in Elixir
46
---
57

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
108
## Foreword
119

1210
[Domain-specific languages (DSL)](https://en.wikipedia.org/wiki/Domain-specific_language) allow developers to tailor their application to a particular domain. You don't need macros in order to have a DSL: every data structure and every function you define in your module is part of your Domain-specific language.

getting-started/meta/macros.markdown

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Macros
5+
category: Meta-programming in Elixir
46
---
57

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
108
## Foreword
119

1210
Even though Elixir attempts its best to provide a safe environment for macros, the major responsibility of writing clean code with macros falls on developers. Macros are harder to write than ordinary Elixir functions and it's considered to be bad style to use them when they're not necessary. So write macros responsibly.

getting-started/meta/quote-and-unquote.markdown

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Quote and unquote
5+
category: Meta-programming in Elixir
46
---
57

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
108
This guide aims to introduce the meta-programming techniques available in Elixir. The ability to represent an Elixir program by its own data structures is at the heart of meta-programming. This chapter starts by exploring those structures and the associated `quote` and `unquote` constructs, so we can take a look at macros in the next chapter and finally build our own domain specific language.
119

1210
> The Elixir guides are also available in EPUB format:

getting-started/mix-otp/agent.markdown

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2+
section: getting-started
23
layout: getting-started
34
title: Agent
5+
category: Mix and OTP
46
---
57

6-
# {{ page.title }}
7-
8-
{% include toc.html %}
9-
108
{% include mix-otp-preface.html %}
119

1210
In this chapter, we will learn how to keep and share state between multiple entities. If you have previous programming experience, you may think of globally shared variables, but the model we will learn here is quite different. The next chapters will generalize the concepts introduced here.

0 commit comments

Comments
 (0)