forked from PJUllrich/run-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
130 lines (117 loc) · 4.23 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
defmodule RunElixir.MixProject do
use Mix.Project
@source_url "https://github.com/PJUllrich/run-elixir"
@version "0.1.0"
def project do
[
app: :run_elixir,
name: "RunElixir.com",
version: @version,
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: &docs/0,
package: package()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ex_doc, "~> 0.34.2", only: :dev, runtime: false},
{:publishex, "~> 1.0.1", only: :dev, runtime: false},
{:file_system, "~> 1.0", only: :dev, runtime: false}
]
end
defp package do
[
maintainers: ["Peter Ullrich"],
description: "An quickstart guide to Elixir through examples",
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
defp docs do
[
main: "welcome",
name: "RunElixir",
source_url: @source_url,
assets: %{"assets/images" => "images"},
authors: ["Peter Ullrich"],
logo: "assets/images/logo.jpg",
extra_section: "Guides",
api_reference: false,
extras: [
"guides/welcome.livemd",
"guides/01-basics/hello-world.livemd",
"guides/01-basics/lists-and-tuples.livemd",
"guides/01-basics/maps.livemd",
"guides/01-basics/keyword-lists.livemd",
"guides/01-basics/modules.livemd",
"guides/01-basics/structs.livemd",
"guides/01-basics/functions.livemd",
"guides/01-basics/pipes.livemd",
"guides/01-basics/pattern-matching.livemd",
"guides/01-basics/control-flow.livemd",
"guides/01-basics/loops.livemd",
"guides/02-start-coding/create-a-phoenix-project.md",
"guides/02-start-coding/install-dependencies.md",
"guides/02-start-coding/deploy-your-project.md",
"guides/03-next-steps/continue-learning.md",
"guides/03-next-steps/join-the-community.md",
"guides/03-next-steps/stay-informed.md",
"guides/03-next-steps/find-a-job.md",
"guides/03-next-steps/find-libraries.md",
"guides/04-async/async.livemd",
"guides/04-async/spawn.livemd",
"guides/04-async/task.livemd",
"guides/04-async/genserver.livemd",
"guides/04-async/supervisor.livemd",
"guides/05-misc/big-o.livemd",
"guides/05-misc/type-hierarchy.livemd"
],
groups_for_extras: [
"The Basics": [~r"/01-basics/"],
"Start Coding": [~r"/02-start-coding/"],
"Next Steps": [~r"/03-next-steps/"],
Async: [~r"/04-async/"],
Miscellaneous: [~r"/05-misc/"]
],
before_closing_head_tag: &before_closing_head_tag/1,
before_closing_body_tag: &before_closing_body_tag/1,
meta: []
]
end
defp before_closing_head_tag(:html) do
"""
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="manifest" href="/images/site.webmanifest">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#9f00a7">
<meta name="theme-color" content="#ffffff">
<meta property="og:title" content="RunElixir.com - The Free 1 Hour Intro to Elixir">
<meta property="og:image" content="https://runelixir.com/images/social-share.jpg">
<meta property="og:description" content="Interested in Elixir? This quickstart guide teaches you the basics and gets you coding in 1 hour.">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@PJUllrich">
<script defer data-domain="runelixir.com" src="https://plausible.io/js/script.js"></script>
"""
end
defp before_closing_head_tag(:epub), do: ""
defp before_closing_body_tag(:html) do
key_navigation_script = File.read!("./assets/js/key-navigation.js")
"""
<script>
#{key_navigation_script}
</script>
"""
end
defp before_closing_body_tag(:epub), do: ""
end