Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:41:16+00:00 2026-06-04T12:41:16+00:00

I use Jekyll with a custom Coderay , so I have to maintain 2

  • 0

I use Jekyll with a custom Coderay, so I have to maintain 2 branches on GitHub

master; The generated HTML site
source; Markdown files, etc

On the source branch I have a _includes folder that I ignore because it just contains some hard links. I have a script to manage the 2 branches but it seems like there should be something better than what I have come up with.

# Start on "source" branch
jekyll /tmp
git checkout master
git stash -u # _includes
rm -r * # keeps ".git"
cp -r /tmp/* .
git add -A
git commit
git push origin master
git checkout source
git stash apply
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:41:17+00:00Added an answer on June 4, 2026 at 12:41 pm

    Option 1

    The better option for me was to just get rid of the hard links altogether. I did this by making a plugin that allows to render a file outside of the repo.

    render_partial.rb

    module Jekyll
        class IncludeTag < Liquid::Tag
            def initialize(tag_name, file, tokens)
                super
                @file = file.strip
            end
            def render(context)
                File.read(@file)
            end
        end
    end
    Liquid::Template.register_tag('render_partial', Jekyll::IncludeTag)
    

    Option 2

    This option will work if you want to keep the hard links.

    help.github.com/ignore-files

    #!/bin/sh
    # Initial setup, configure excludes
    cat > .git/info/exclude <<EOF
    _includes
    _site
    EOF
    # Commit source branch
    git checkout source
    git add -A
    git commit -m 'new post'
    git push origin source
    # Commit master branch
    jekyll
    git checkout master
    git rm -r .
    cp -r _site/* .
    git add -A
    git commit -m 'new post'
    git push origin master
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a site using jekyll.rb . I have a page called about.html: <div
I want to use pygments with jekyll I have the following code: {% highlight
Use case: Wanna insert custom annotation to fields in java class generated by JAXB
Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q
Use case: we have some project meta-data files which we want tracked, but are
I you have a github account with Jekyll-rendered pages at: username.github.com is it possible
I am trying to use Jekyll on github but can't seem to push to
I'm trying to use Jekyll on GitHub pages. I'm running it exactly how they
Use case: user clicks the link on a webpage - boom! load of files
I'm using Jekyll for my blog, and I'd like the ability to use unique

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.