# Change site content and design based on context

**URL:** <https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725>\
**Category:** Help\
**Created:** [March 6, 2021, 5:12pm UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725 "2021-03-06T17:12:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![volfied](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/volfied/32/3310_2.png) [@volfied](https://talk.jekyllrb.com/u/volfied)\
**Post date:** [March 6, 2021, 5:12pm UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725/1 "2021-03-06T17:12:20Z")

</div>

I just spent a fair while barking up the wrong tree on this and figured I should just ask the experts.

I’ve built my Jekyll site using the minimal-mistakes theme and am quite happy with it. I would, however, like to be able to have it look different and change content in particular contexts. I have two domains, one personal and one professional. I would like the professional site to contain a subset of the site content and use a different skin and logo. I feel like it should be possible to reuse content rather than maintain two separate sites. I’m fine with the build generating separate site files, but I’d like to stick to unique source files.

I was trying to come up with some way of passing the domain from javascript to liquid, but I realize now that makes no sense. I’m drawing a blank now. Any clever ideas? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 6, 2021, 8:38pm UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725/2 "2021-03-06T20:38:46Z")

</div>

First I would suggest thinking about what your overall goal is and if duplicating content makes sense. It is far simpler to focus content that is different on each site and then make a hyperlink to the other site where you need to.

If you do indeed want to duplicate content, I have tips.

I answered a post in Jan on something similar to your question. You can use a submodule or clone process to pull in your content from a single third repo of content only, that gets used by the two Jekyll sites.  
You can pull in from the frontend as well with JS but that is bad for crawlers due to the JS loading needed.

> [@Is it possible to single-source files across Jekyll projects?](https://talk.jekyllrb.com/t/is-it-possible-to-single-source-files-across-jekyll-projects/5565):
>
> I have three Jekyll projects, and a set of HTML files that I sometimes need to use in all three. I don’t want to maintain three sets of identical files, so is it possible to call files in one project directory into a separate project directory? For context, my three projects are: an author website a manuscript that will be my first book a repo of all my poems (just to keep everything under version control; I’ll never serve this site) I need to re-use the poems in the last project in the othe…

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 6, 2021, 8:38pm UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725/3 "2021-03-06T20:38:55Z")

</div>

you also need to be aware of this damaging your SEO ranking. Unless you choose one site to be the “original” one and in the other one you put a canonical metadata tag that links to the original.

> **[Canonical URLs: A Beginner's Guide to Canonical Tags in 2021](https://www.semrush.com/blog/canonical-url-guide/)**
>
> This guide will help you use canonical tags and URLs properly as part of your SEO strategy, you need to understand what they are, how they work, and how to implement them on your site and different CMSs. Also, see common reasons why duplicate content...

---

<div class="post-metadata">

**Author:** ![volfied](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/volfied/32/3310_2.png) [@volfied](https://talk.jekyllrb.com/u/volfied)\
**Post date:** [March 6, 2021, 8:56pm UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725/4 "2021-03-06T20:56:46Z")

</div>

Interesting. I hadn’t considered the SEO end of things. I sort of imagined it being a site people would only reach if I gave them the address, but you never know. I’ll take a look at the earlier solution after I’ve given some further thought to how I want to present things. I appreciate the fresh perspective.

---

<div class="post-metadata">

**Author:** ![jhvanderschee](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jhvanderschee/32/583_2.png) [@jhvanderschee](https://talk.jekyllrb.com/u/jhvanderschee)\
**Post date:** [March 6, 2021, 11:26pm UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725/5 "2021-03-06T23:26:18Z")

</div>

ABOUT SEO  
Google rejects duplicate content but does not penalize it. What it does is filter it so that it does not appear in its results, which is enough punishment.However, sites that copy and/or rewrite the content of others in a systematic way are penalized. The famous Panda algorithm was designed for that mission.

Source: [Duplicate Content on Google: The Complete Guide](https://seotoolnetwork.com/duplicate-content-google-complete-guide/)

ABOUT THE DUPLICATION  
Just thinking out loud: Could git branches be a solution here? Anyone?

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 7, 2021, 7:07am UTC](https://talk.jekyllrb.com/t/change-site-content-and-design-based-on-context/5725/6 "2021-03-07T07:07:05Z")

</div>

Thanks for the info and link.

Can you elaborate on what would be achieved by git branching?

The premise underlying my clone + copy at build time or git submodule approach is that you have one version of the original content in version control and then copy to the two other repos that build using the content.  
Well you could do this with 2 instead of 3 repos but it makes things cleaner I think to have 3 and separate content from the rest of the site.

The problem with copy and pasting your content by hand in two repos, or of having a second branch in a repo that has additional content and styling changes, is how do you keep them in sync?

The repos or branches will diverge.

Unless you know you will _never_ rename move or delete or update content of an existing page (very restrictive). Or you make the identical change in both versions every time which is tedious and error prone (you’ll forget)
