Skip to content

Commit a8678bc

Browse files
committed
initial multi site setup
0 parents  commit a8678bc

Some content is hidden

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

76 files changed

+2082
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_dist
2+
.sass-cache
3+
.jekyll-metadata
4+
.swp
5+
.DS_Store
6+
*.notes.*

Gemfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
source "https://rubygems.org"
2+
3+
# Hello! This is where you manage which Jekyll version is used to run.
4+
# When you want to use a different version, change it below, save the
5+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
6+
#
7+
# bundle exec jekyll serve
8+
#
9+
# This will help ensure the proper Jekyll version is running.
10+
# Happy Jekylling!
11+
12+
gem "jekyll", "3.3.1"
13+
14+
# This is the default theme for new Jekyll sites. You may change this to anything you like.
15+
16+
#in our case we're removing it entirely
17+
# gem "minima", "~> 2.0"
18+
19+
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
20+
# uncomment the line below. To upgrade, run `bundle update github-pages`.
21+
# gem "github-pages", group: :jekyll_plugins
22+
23+
# If you have any plugins, put them here!
24+
group :jekyll_plugins do
25+
gem "jekyll-feed", "~> 0.6"
26+
gem "pry"
27+
end

Gemfile.lock

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.5.0)
5+
public_suffix (~> 2.0, >= 2.0.2)
6+
coderay (1.1.1)
7+
colorator (1.1.0)
8+
ffi (1.9.14)
9+
forwardable-extended (2.6.0)
10+
jekyll (3.3.1)
11+
addressable (~> 2.4)
12+
colorator (~> 1.0)
13+
jekyll-sass-converter (~> 1.0)
14+
jekyll-watch (~> 1.1)
15+
kramdown (~> 1.3)
16+
liquid (~> 3.0)
17+
mercenary (~> 0.3.3)
18+
pathutil (~> 0.9)
19+
rouge (~> 1.7)
20+
safe_yaml (~> 1.0)
21+
jekyll-feed (0.8.0)
22+
jekyll (~> 3.3)
23+
jekyll-sass-converter (1.5.0)
24+
sass (~> 3.4)
25+
jekyll-watch (1.5.0)
26+
listen (~> 3.0, < 3.1)
27+
kramdown (1.13.1)
28+
liquid (3.0.6)
29+
listen (3.0.8)
30+
rb-fsevent (~> 0.9, >= 0.9.4)
31+
rb-inotify (~> 0.9, >= 0.9.7)
32+
mercenary (0.3.6)
33+
method_source (0.8.2)
34+
pathutil (0.14.0)
35+
forwardable-extended (~> 2.6)
36+
pry (0.10.4)
37+
coderay (~> 1.1.0)
38+
method_source (~> 0.8.1)
39+
slop (~> 3.4)
40+
public_suffix (2.0.4)
41+
rb-fsevent (0.9.8)
42+
rb-inotify (0.9.7)
43+
ffi (>= 0.5.0)
44+
rouge (1.11.1)
45+
safe_yaml (1.0.4)
46+
sass (3.4.23)
47+
slop (3.6.0)
48+
49+
PLATFORMS
50+
ruby
51+
52+
DEPENDENCIES
53+
jekyll (= 3.3.1)
54+
jekyll-feed (~> 0.6)
55+
pry
56+
57+
BUNDLED WITH
58+
1.13.6

_config_site_one.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
### default jekyll config variables
2+
title: This Is Site One
3+
email: your-email@domain.com
4+
description: > # this means to ignore newlines until "baseurl:"
5+
Write an awesome description for your new site here. You can edit this
6+
line in _config.yml. It will appear in your document head meta (for
7+
Google search results) and in your feed.xml site description.
8+
baseurl: "" # the subpath of your site, e.g. /blog
9+
url: "" # the base hostname & protocol for your site, e.g. http://example.com
10+
twitter_username: jekyllrb
11+
github_username: jekyll
12+
markdown: kramdown
13+
### multi site build settings
14+
### config variables below are specifically for the multisite setup
15+
### gems are defined in gemfile... in the group:
16+
domain: siteone.com
17+
### destination
18+
destination: _dist/siteOne
19+
### excludes & includes
20+
exclude:
21+
- Gemfile
22+
- Gemfile.lock
23+
- sites/siteTwo
24+
# any folder with and underscore is excluded by default, any folder without is included by default
25+
# included folders with the same name get merged together
26+
### config variables from plugins
27+
# jekyll-pages-directory.rb
28+
pages: sites/siteOne/_pages
29+
# jekyll-define-static-assets-image-paths.rb
30+
# no leading & trailing slashes needed they are already accounted for
31+
# static_assets_images is relative to main directory
32+
# static_assets_images_destination is relative to destination folder
33+
static_assets_images_source: sites/siteOne/_staticAssets/images
34+
static_assets_images_destination: assets/images

_config_site_two.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
### default jekyll config variables
2+
title: This Is Site Two
3+
email: your-email@domain.com
4+
description: > # this means to ignore newlines until "baseurl:"
5+
Write an awesome description for your new site here. You can edit this
6+
line in _config.yml. It will appear in your document head meta (for
7+
Google search results) and in your feed.xml site description.
8+
baseurl: "" # the subpath of your site, e.g. /blog
9+
url: "" # the base hostname & protocol for your site, e.g. http://example.com
10+
twitter_username: jekyllrb
11+
github_username: jekyll
12+
markdown: kramdown
13+
### multi site build settings
14+
### config variables below are specifically for the multisite setup
15+
### gems are defined in gemfile... in the group:
16+
domain: sitetwo.com
17+
### destination
18+
destination: _dist/siteTwo
19+
### excludes & includes
20+
exclude:
21+
- Gemfile
22+
- Gemfile.lock
23+
- sites/siteOne
24+
# any folder with and underscore is excluded by default, any folder without is included by default
25+
# included folders with the same name get merged together
26+
### config variables from plugins
27+
# jekyll-pages-directory.rb
28+
pages: sites/siteTwo/_pages
29+
# jekyll-define-static-assets-image-paths.rb
30+
# no leading & trailing slashes needed they are already accounted for
31+
# static_assets_images is relative to main directory
32+
# static_assets_images_destination is relative to destination folder
33+
static_assets_images_source: sites/siteTwo/_staticAssets/images
34+
static_assets_images_destination: assets/images
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% for post in site.posts %}
2+
<li>
3+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
4+
5+
<h2>
6+
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
7+
</h2>
8+
</li>
9+
{% endfor %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% for tagname in tagnames %}
2+
{% if site.tags[tagname].size %}
3+
{% for post in site.tags[tagname] %}
4+
<li>
5+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
6+
7+
<h2>
8+
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
9+
</h2>
10+
</li>
11+
{% endfor %}
12+
{% endif %}
13+
{% endfor %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% comment %}this loop is deprecated but still here as an example{% endcomment %}
2+
{% if site.tags[tagname].size %}
3+
{% for post in site.tags[tagname] %}
4+
<li>
5+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
6+
7+
<h2>
8+
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
9+
</h2>
10+
</li>
11+
{% endfor %}
12+
{% endif %}
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% if page.comments != false and jekyll.environment == "production" %}
2+
3+
<div id="disqus_thread"></div>
4+
<script>
5+
var disqus_config = function () {
6+
this.page.url = '{{ page.url | absolute_url }}';
7+
this.page.identifier = '{{ page.url | absolute_url }}';
8+
};
9+
10+
(function() {
11+
var d = document, s = d.createElement('script');
12+
13+
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
14+
15+
s.setAttribute('data-timestamp', +new Date());
16+
(d.head || d.body).appendChild(s);
17+
})();
18+
</script>
19+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
20+
{% endif %}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script>
2+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
6+
7+
ga('create', '{{ site.google_analytics }}', 'auto');
8+
ga('send', 'pageview');
9+
10+
</script>
11+

_includes/_global/icon-github.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="https://github.com/{{ include.username }}"><span class="icon icon--github">{% include _global/icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>

_includes/_global/icon-github.svg

+1
Loading

_includes/_global/icon-twitter.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include _global/icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>

_includes/_global/icon-twitter.svg

+1
Loading

_includes/_global/links.html

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
2+
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">

_includes/_global/meta.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<meta charset="utf-8">
2+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
5+
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
3+
4+
{% include _siteOne/head.html %}
5+
6+
<body>
7+
8+
{% include _siteOne/header.html %}
9+
10+
<main class="page-content" aria-label="Content">
11+
<div class="wrapper">
12+
{{ content }}
13+
</div>
14+
</main>
15+
16+
{% include _siteOne/footer.html %}
17+
18+
</body>
19+
20+
</html>
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<div class="home">
2+
3+
<h1 class="page-heading">Posts</h1>
4+
5+
{{ content }}
6+
7+
<h3>Site One Posts</h3>
8+
<ul class="post-list">
9+
10+
{% assign tagname = "siteone" %}
11+
{% include _global/_modules/specificTagPosts.html %}
12+
13+
</ul>
14+
15+
<h3>Multiple Tagnames Posts</h3>
16+
<ul class="post-list">
17+
18+
{% assign tagnames = "global siteone" | split: ' ' %}
19+
{% include _global/_modules/multipleTagPosts.html %}
20+
21+
</ul>
22+
23+
<h3>Global Tagnames Posts</h3>
24+
<ul class="post-list">
25+
26+
{% assign tagnames = "global" | split: ' ' %}
27+
{% include _global/_modules/multipleTagPosts.html %}
28+
29+
</ul>
30+
31+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
32+
33+
</div>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<article class="post">
2+
3+
<header class="post-header">
4+
<h1 class="post-title">{{ page.title | escape }}</h1>
5+
</header>
6+
7+
<div class="post-content">
8+
{{ content }}
9+
</div>
10+
11+
</article>
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
2+
3+
<header class="post-header">
4+
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
5+
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
6+
</header>
7+
8+
<div class="post-content" itemprop="articleBody">
9+
{{ content }}
10+
</div>
11+
12+
{% if site.disqus.shortname %}
13+
{% include _global/disqus_comments.html %}
14+
{% endif %}
15+
</article>

_includes/_siteOne/css.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link rel="stylesheet" href="{{ "/assets/css/bundle.css" | relative_url }}">

_includes/_siteOne/footer.html

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<footer class="site-footer">
2+
3+
<div class="wrapper">
4+
5+
<h2 class="footer-heading">{{ site.title | escape }}</h2>
6+
7+
<div class="footer-col-wrapper">
8+
<div class="footer-col footer-col-1">
9+
<ul class="contact-list">
10+
<li>
11+
{% if site.author %}
12+
{{ site.author | escape }}
13+
{% else %}
14+
{{ site.title | escape }}
15+
{% endif %}
16+
</li>
17+
{% if site.email %}
18+
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
19+
{% endif %}
20+
</ul>
21+
</div>
22+
23+
<div class="footer-col footer-col-2">
24+
<ul class="social-media-list">
25+
{% if site.github_username %}
26+
<li>
27+
{% include _global/icon-github.html username=site.github_username %}
28+
</li>
29+
{% endif %}
30+
31+
{% if site.twitter_username %}
32+
<li>
33+
{% include _global/icon-twitter.html username=site.twitter_username %}
34+
</li>
35+
{% endif %}
36+
</ul>
37+
</div>
38+
39+
<div class="footer-col footer-col-3">
40+
<p>{{ site.description | escape }}</p>
41+
</div>
42+
</div>
43+
44+
</div>
45+
46+
</footer>

_includes/_siteOne/head.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<head>
2+
{% include _global/meta.html %}
3+
{% include _siteOne/css.html%}
4+
{% include _global/links.html %}
5+
{% if jekyll.environment == 'production' and site.google_analytics %}
6+
{% include _global/google-analytics.html %}
7+
{% endif %}
8+
</head>

0 commit comments

Comments
 (0)