This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
/
index.html
157 lines (145 loc) · 9.18 KB
/
index.html
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="apple-touch-icon" sizes="57x57" href="/dist/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/dist/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/dist/images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/dist/images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/dist/images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/dist/images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/dist/images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/dist/images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/dist/images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/dist/images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/dist/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/dist/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/dist/images/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/dist/images/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body, nav, footer, .body {
background: #111;
}
</style>
<link rel="stylesheet" rel="async" href="/dist/ctti.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script type="text/javascript" defer src="/dist/bundle.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-53667430-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-53667430-1');
</script>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css"/>
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
<title>Daniel Canetti • Host an Eleventy site on Github Pages</title>
<meta name="description" content="Host your Eleventy site for free on Github pages.">
<meta property="og:locale" content="en_GB" />
<meta property="og:site_name" content="Daniel Canetti" />
<meta property="og:title" content="Daniel Canetti • Host an Eleventy site on Github Pages" />
<meta property="og:description" content="Host your Eleventy site for free on Github pages." />
<meta property="og:url" content="https://danielcanetti.com/blog/eleventy-github-pages/" />
<meta property="og:image" content="https://danielcanetti.com/dist/images/eleventygithubpages@2x.jpg" />
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="Daniel Canetti • Host an Eleventy site on Github Pages">
<meta property="twitter:description" content="Host your Eleventy site for free on Github pages.">
<meta property="twitter:image" content="https://danielcanetti.com/dist/images/eleventygithubpages@2x.jpg">
<meta property="twitter:url" content="https://danielcanetti.com/blog/eleventy-github-pages/">
<meta property="twitter:site" content="@Dan_Canetti">
<meta property="twitter:creator" content="@Dan_Canetti">
</head>
<body class="sub post">
<div id="wrapper" class="wrapper night">
<nav>
<a class="logo" href="/">Dan's Blog.</a>
<ul>
<li><a class="l" href="/work/">Work</a></li>
<li><a class="l" href="/blog/">Blog</a></li>
<li class="hom"><a class="l" href="/contact/">Contact</a></li>
<li>
<div class="njs-toggle-menu">
<input type="checkbox" id="njs-toggle-menu--toggle" class="njs-toggle-menu--toggle" />
<label for="njs-toggle-menu--toggle">
<span class="toggle-menu__toggle-menu-icon">
<span class="toggle-menu-icon__toggle-menu-icon-inner" aria-label="More menu options - awesome websites"></span>
</span>
</label>
<div class="main-nav">
<ul>
<li><a class="l" href="/work/">Work</a></li>
<li><a class="l" href="/blog/">Blog</a></li>
<li><a class="l" href="/contact/">Contact</a></li>
<li><a class="l" href="/awesome-sites/">Inspiration</a></li>
</ul>
</div>
</div>
</li>
</ul>
</nav>
<img class="post--bg-image" src="/dist/images/eleventygithubpages@2x.jpg" />
<div id="post" class="body dark post">
<div class="body__section body__section--post">
<h1>Host an Eleventy site on Github Pages</h1>
<div class="body__section--post-meta">
<span>August 07, 2020</span>
<span class="body__section--post-tag">Web Development</span>
<span class="reading-time"></span>
</div>
<p>Github pages allows you to host your site directly from the repo on an Apex domain - essentialy it's free hosting! Even better, you can configure your Eleventy site to output to the <code>docs</code> directory Github uses by making a simple config change.</p>
<p>Copy and paste the below into your <code>eleventy.js</code> file (if you don't have one create this file in the root of your project), all we're doing here is changing the output from the default <code>_site</code> directory to <code>docs</code>.</p>
<pre><code>module.exports = {
dir: {
output: "docs"
}
};
</code></pre>
<p>Once you've made this change - the next time you compile 11ty will create the <code>docs</code> directory with all your site files in it.</p>
<h2>Some good extra reading</h2>
<ul>
<li><a href="/blog/github-pages/">Github Pages</a></li>
<li><a href="https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site">Managing a custom domain for your GitHub Pages site</a></li>
<li><a href="https://www.11ty.dev/docs/config/">11ty Configuration</a></li>
</ul>
<hr>
<div class="share__blog">
<h3>Share: Host an Eleventy site on Github Pages</h3>
<div class="share__blog__links">
<a class="l" href="https://www.facebook.com/sharer/sharer.php?u=https://danielcanetti.com/blog/eleventy-github-pages/" target="_blank">
Share on Facebook
</a>
<!--a class="l" href="https://www.theguardian.com/technology/2020/jun/01/facebook-workers-rebel-mark-zuckerberg-donald-trump" target="_blank" rel="nofollow">
Don't share on Facebook
</a-->
<a class="l" href="https://twitter.com/intent/tweet?text=Host an Eleventy site on Github Pages%20by%20@Dan_Canetti%20-%20https://danielcanetti.com/blog/eleventy-github-pages/" target="_blank">
Share on Twitter
</a>
<a class="l" href="https://www.buymeacoffee.com/dancanetti" target="_blank">
Buy me a Coffee
</a>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="footer__content">
<span class="copyright">
Daniel Canetti © 2020<br>
Built with <a class="l" href="https://www.11ty.dev/" target="_blank" rel="noopener" aria-label="Go to Eleventy">Eleventy</a>, <a class="l" href="https://webpack.js.org/" target="_blank" rel="noopener" aria-label="Go to Webpack">Webpack</a>, <a class="l" href="https://www.netlify.com/" target="_blank" rel="noopener" aria-label="Go to Netlify">Netlify</a>, and Coffee. <a class="l" href="/changelog/">View changelog</a>.
</span>
<div class="footer__content__slinks">
<a class="sl" href="https://github.com/DanCanetti" target="_blank" rel="noopener" aria-label="Go to Github"><img src="/dist/images/github.svg" alt="GitHub" /></a>
<a class="sl" href="https://twitter.com/Dan_Canetti" target="_blank" rel="noopener" aria-label="Go to Twitter"><img src="/dist/images/twitter.svg" alt="Twitter" /></a>
<a class="sl" href="https://www.youtube.com/c/DanielCanetti/" target="_blank" rel="noopener" aria-label="Go to YouTube"><img src="/dist/images/youtube.svg" alt="Youtube" /></a>
<a class="sl" href="https://www.twitch.tv/dan_canetti" target="_blank" rel="noopener" aria-label="Go to Twitch"><img src="/dist/images/twitch.svg" alt="Twitch" /></a>
<a class="sl" href="https://www.instagram.com/dan_canetti_dev/" target="_blank" rel="noopener" aria-label="Go to Instagram"><img src="/dist/images/instagram.svg" alt="Instagram" /></a>
</div>
</div>
</footer>
</body>
</html>