File tree 3 files changed +15
-5
lines changed
3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "development" : {
3
+ "root_url" : " http://localhost:3000"
4
+ },
5
+ "production" : {
6
+ "root_url" : " https://dcos.io"
7
+ }
8
+ }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const writemetadata = require('metalsmith-writemetadata')
24
24
const moment = require ( 'moment' )
25
25
const tags = require ( 'metalsmith-tags' )
26
26
const mlunr = require ( 'metalsmith-lunr' )
27
+ const CONFIG = require ( './env.json' ) [ process . env . NODE_ENV ] || require ( './env.json' ) [ 'production' ]
27
28
28
29
// --- general build settings --- //
29
30
const docsVersions = [ '1.7' ] ;
@@ -179,7 +180,8 @@ Metalsmith(__dirname)
179
180
}
180
181
} ) )
181
182
. use ( define ( {
182
- moment
183
+ moment,
184
+ rootUrl : CONFIG . root_url
183
185
} ) )
184
186
. use ( sass ( {
185
187
outputStyle : 'expanded' ,
Original file line number Diff line number Diff line change @@ -36,19 +36,19 @@ block content
36
36
article.post-content.blog-article != contents
37
37
38
38
.blog__article-footer
39
- .blog__social-share
39
+ a ( href = "http://twitter.com/share?text= #{ encodeURIComponent (title)} &url= #{rootUrl} / #{path} " , target = "_blank" ) .blog__social-share
40
40
img( src ='/assets/images/icons/twitter-icon.svg' )
41
41
p Tweet
42
42
43
- .blog__social-share
43
+ a ( href = "https://www.facebook.com/sharer/sharer.php?u= #{rootUrl} / #{path} " , target = "_blank" ) .blog__social-share
44
44
img( src ='/assets/images/icons/facebook-icon.svg' )
45
45
p Share
46
46
47
- .blog__social-share
47
+ a ( href = "https://plus.google.com/share?url= #{rootUrl} / #{path} " , target = "_blank" ) .blog__social-share
48
48
img( src ='/assets/images/icons/googleplus-icon.svg' )
49
49
p Share
50
50
51
- .blog__social-share
51
+ a ( href = "http://news.ycombinator.com/submit" , target = "_blank" ) .blog__social-share
52
52
img( src ='/assets/images/icons/hackernews-icon.svg' )
53
53
p Vote
54
54
You can’t perform that action at this time.
0 commit comments