Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc016d4

Browse files
committed
added code syntax highlighting
1 parent dbff4b7 commit dc016d4

6 files changed

Lines changed: 35 additions & 151 deletions

File tree

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"metalsmith": "^2.1.0",
2525
"metalsmith-layouts": "^1.4.1",
2626
"metalsmith-markdown": "^0.2.2",
27+
"metalsmith-metallic": "^2.0.2",
2728
"metalsmith-permalinks": "^0.5.0",
2829
"metalsmith-watch": "^1.0.3"
2930
},

tutorial/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var Metalsmith = require('metalsmith');
22
var markdown = require('metalsmith-markdown');
33
var layouts = require('metalsmith-layouts');
44
var permalinks = require('metalsmith-permalinks');
5+
var metallic = require('metalsmith-metallic');
56
var watch = require('metalsmith-watch');
67

78
Metalsmith(__dirname)
@@ -15,6 +16,7 @@ Metalsmith(__dirname)
1516
.source('./src')
1617
.destination('./public')
1718
.clean(false)
19+
.use(metallic())
1820
.use(markdown())
1921
.use(permalinks())
2022
.use(layouts({

tutorial/layouts/layout.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<meta name="description" content="{{description}}">
1010
<meta name="author" content="{{author}}">
1111
<meta name="keywords" content="docker, docker tutorial, docker guide, containers, getting started, beginners">
12-
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic|PT+Mono&amp;subset=latin,cyrillic">
12+
<link href="https://fonts.googleapis.com/css?family=Oxygen|Roboto+Mono" rel="stylesheet">
13+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/tomorrow-night-bright.min.css">
1314
<title>{{title}}</title>
1415
{{>meta}}
1516
{{>styles}}

tutorial/layouts/partials/styles.html

Lines changed: 9 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
url('font/fontello.ttf') format('truetype'),
1212
url('font/fontello.svg') format('svg');
1313
font-weight: normal;
14+
font-display: 'auto';
1415
font-style: normal;
1516
}
1617

@@ -51,7 +52,7 @@
5152

5253
body {
5354
margin: 0;
54-
font: 0.8rem/1.5 "PT Sans", sans-serif;
55+
font: 0.8rem/1.5 "Oxygen", sans-serif;
5556
color: #5a5a5a;
5657
display: flex;
5758
min-height: 100vh;
@@ -119,7 +120,7 @@
119120

120121
code,
121122
pre {
122-
font-family: "PT Mono", Menlo, "Courier New", monospace;
123+
font-family: 'Roboto Mono', monospace;
123124
font-size: 95%;
124125
}
125126
code {
@@ -135,22 +136,25 @@
135136
margin: 0 0 1rem;
136137
line-height: 1.4;
137138
white-space: pre;
138-
white-space: pre-wrap;
139139
}
140+
140141
pre code {
141142
padding: 0;
142143
color: inherit;
143144
background-color: transparent;
144145
border: 0;
145146
}
147+
146148
.highlight {
147149
margin: 0 0 1rem;
148150
padding: 1rem;
149151
background-color: #f7f7f9;
150152
}
153+
151154
.highlight pre {
152155
margin-bottom: 0;
153156
}
157+
154158
.highlight + .highlight {
155159
margin-top: 1rem;
156160
}
@@ -171,6 +175,7 @@
171175
main {
172176
flex: 1;
173177
padding: 0 20px;
178+
max-width: 40rem;
174179
}
175180

176181
nav {
@@ -184,6 +189,7 @@
184189
bottom: 0;
185190
flex: 0 0 auto;
186191
border-right: 1px solid #d2d3d4;
192+
z-index: 100;
187193
}
188194

189195
nav>ul {
@@ -216,150 +222,4 @@
216222
.masthead-links a:hover {
217223
color: #08c;
218224
}
219-
220-
221-
/*
222-
* Footer
223-
*/
224-
225-
.footer {
226-
margin-top: 3rem;
227-
padding: 3rem 1rem;
228-
font-size: 90%;
229-
text-align: center;
230-
border-top: 1px solid #eee;
231-
}
232-
.footer p {
233-
margin-bottom: .5rem;
234-
}
235-
236-
.quick-links {
237-
list-style: none;
238-
margin-left: 0;
239-
}
240-
.quick-links li {
241-
display: inline;
242-
}
243-
244-
245-
/*
246-
* Syntax highlighting and ads
247-
*/
248-
249-
.hll { background-color: #ffffcc }
250-
/*{ background: #f0f3f3; }*/
251-
.c { color: #999; } /* Comment */
252-
.err { color: #AA0000; background-color: #FFAAAA } /* Error */
253-
.k { color: #006699; } /* Keyword */
254-
.o { color: #555555 } /* Operator */
255-
.cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */
256-
.cp { color: #009999 } /* Comment.Preproc */
257-
.c1 { color: #999; } /* Comment.Single */
258-
.cs { color: #999; } /* Comment.Special */
259-
.gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */
260-
.ge { font-style: italic } /* Generic.Emph */
261-
.gr { color: #FF0000 } /* Generic.Error */
262-
.gh { color: #003300; } /* Generic.Heading */
263-
.gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */
264-
.go { color: #AAAAAA } /* Generic.Output */
265-
.gp { color: #000099; } /* Generic.Prompt */
266-
.gs { } /* Generic.Strong */
267-
.gu { color: #003300; } /* Generic.Subheading */
268-
.gt { color: #99CC66 } /* Generic.Traceback */
269-
.kc { color: #006699; } /* Keyword.Constant */
270-
.kd { color: #006699; } /* Keyword.Declaration */
271-
.kn { color: #006699; } /* Keyword.Namespace */
272-
.kp { color: #006699 } /* Keyword.Pseudo */
273-
.kr { color: #006699; } /* Keyword.Reserved */
274-
.kt { color: #007788; } /* Keyword.Type */
275-
.m { color: #FF6600 } /* Literal.Number */
276-
.s { color: #d44950 } /* Literal.String */
277-
.na { color: #4f9fcf } /* Name.Attribute */
278-
.nb { color: #336666 } /* Name.Builtin */
279-
.nc { color: #00AA88; } /* Name.Class */
280-
.no { color: #336600 } /* Name.Constant */
281-
.nd { color: #9999FF } /* Name.Decorator */
282-
.ni { color: #999999; } /* Name.Entity */
283-
.ne { color: #CC0000; } /* Name.Exception */
284-
.nf { color: #CC00FF } /* Name.Function */
285-
.nl { color: #9999FF } /* Name.Label */
286-
.nn { color: #00CCFF; } /* Name.Namespace */
287-
.nt { color: #2f6f9f; } /* Name.Tag */
288-
.nv { color: #003333 } /* Name.Variable */
289-
.ow { color: #000000; } /* Operator.Word */
290-
.w { color: #bbbbbb } /* Text.Whitespace */
291-
.mf { color: #FF6600 } /* Literal.Number.Float */
292-
.mh { color: #FF6600 } /* Literal.Number.Hex */
293-
.mi { color: #FF6600 } /* Literal.Number.Integer */
294-
.mo { color: #FF6600 } /* Literal.Number.Oct */
295-
.sb { color: #CC3300 } /* Literal.String.Backtick */
296-
.sc { color: #CC3300 } /* Literal.String.Char */
297-
.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
298-
.s2 { color: #CC3300 } /* Literal.String.Double */
299-
.se { color: #CC3300; } /* Literal.String.Escape */
300-
.sh { color: #CC3300 } /* Literal.String.Heredoc */
301-
.si { color: #AA0000 } /* Literal.String.Interpol */
302-
.sx { color: #CC3300 } /* Literal.String.Other */
303-
.sr { color: #33AAAA } /* Literal.String.Regex */
304-
.s1 { color: #CC3300 } /* Literal.String.Single */
305-
.ss { color: #FFCC33 } /* Literal.String.Symbol */
306-
.bp { color: #336666 } /* Name.Builtin.Pseudo */
307-
.vc { color: #003333 } /* Name.Variable.Class */
308-
.vg { color: #003333 } /* Name.Variable.Global */
309-
.vi { color: #003333 } /* Name.Variable.Instance */
310-
.il { color: #FF6600 } /* Literal.Number.Integer.Long */
311-
312-
.css .o,
313-
.css .o + .nt,
314-
.css .nt + .nt { color: #999; }
315-
316-
/* Ads
317-
-------------------------------------------------- */
318-
319-
#fusionads {
320-
display: block;
321-
padding: 2rem 0;
322-
overflow: hidden; /* clearfix */
323-
font-size: .85rem;
324-
line-height: 1.3;
325-
background-color: #fff;
326-
border-bottom: 1px solid #eee;
327-
}
328-
.fusion-text,
329-
.fusion-poweredby {
330-
display: block;
331-
color: #999;
332-
}
333-
.fusion-text:hover,
334-
.fusion-poweredby:hover {
335-
color: #08c;
336-
text-decoration: none;
337-
}
338-
.fusion-img {
339-
float: left;
340-
margin-right: 1rem;
341-
}
342-
.fusion-poweredby {
343-
display: block !important;
344-
margin-top: .5rem;
345-
}
346-
347-
@media (min-width: 50rem) {
348-
#fusionads {
349-
position: fixed;
350-
left: 0;
351-
bottom: 0;
352-
width: 7rem;
353-
padding: 1.5rem;
354-
margin: 0;
355-
font-size: .6rem;
356-
border-bottom: 0;
357-
}
358-
.fusion-img {
359-
float: none;
360-
display: block;
361-
margin-bottom: .5rem;
362-
}
363-
}
364-
365225
</style>

tutorial/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ Wohoo! We get a valid response! Try playing around by making more changes in the
12931293
That concludes our tour of Docker Compose. With Docker Compose, you can also pause your services, run a one-off command on a container and even scale the number of containers. I also recommend you checkout a few other [use-cases](https://docs.docker.com/compose/overview/#common-use-cases) of Docker compose. Hopefully I was able to show you how easy it is to manage multi-container environments with Compose. In the final section, we are going to deploy our app to AWS!
12941294

12951295
<a id="aws-ecs"></a>
1296-
### 3.4 AWS Elastic Container Service
1296+
### AWS Elastic Container Service
12971297

12981298
In the last section we used `docker-compose` to run our app locally with a single command: `docker-compose up`. Now that we have a functioning app we want to share this with the world, get some users, make tons of money and buy a big house in Miami. Executing the last three are beyond the scope of tutorial, so we'll spend our time instead on figuring out how we can deploy our multi-container apps on the cloud with AWS.
12991299

0 commit comments

Comments
 (0)