Replies: 13 comments
-
It's possible but would require you change up your workflow. What you'll want to do is install the theme as a gem. Check the docs for instructions on that. The problem is GitHub Pages doesn't currently support 3rd party theme gems. Similar to how they don't allow Jekyll plugins (except for a few that have been whitelisted). So instead of pushing commits to GH and having it build your site, you need to build it locally and push the contents of your It's not as nice of a workflow but sadly that's the only way if you want to use a theme gem vs. forking a theme. If you Google around you can find some variations on this process. A lot of people use CI services like Travis to build their site and deploy to GH. |
Beta Was this translation helpful? Give feedback.
-
The repository can be forked, pulled locally, removed from github, recreated as an empty repo, then pushed to for this effect, without needing any Example of this in use: https://github.com/Plailect/Guide |
Beta Was this translation helpful? Give feedback.
-
@Plailect - thanks that's very helpful! 👩🏻👍 |
Beta Was this translation helpful? Give feedback.
-
@Plailect : and how do you update the theme from there please ? |
Beta Was this translation helpful? Give feedback.
-
https://mmistakes.github.io/minimal-mistakes/docs/upgrading/ With "Git" or "Update Files Manually" |
Beta Was this translation helpful? Give feedback.
-
I tried to use the gem version with GitHub Pages and travis, but I'm having some problems. But when I try to access my site, the css and other resources are not being loaded... Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
@4brunu Your post/page are missing the https://jekyllrb.com/docs/configuration/#front-matter-defaults |
Beta Was this translation helpful? Give feedback.
-
@mmistakes I'm setting the layout and the problem remains :/ https://github.com/4brunu/4brunu.github.io/blob/master/index.html#L2 (page) |
Beta Was this translation helpful? Give feedback.
-
@4brunu Not sure. Something is overriding it then. If you look at the compiled HTML for the posts/pages they definitely don't have the full layout. Jekyll is just converting the That's why there is no CSS. For example this post (https://4brunu.github.io/blog/2017/01/18/welcome-to-jekyll) Just has the actual content in the HTML... it's not wrapped with any of the layout. Maybe something is screwy with how you have Travis CI setup or Jekyll in general. Pretty sure it has nothing to do with the theme. Does it build locally? <p>You’ll find this post in your <code class="highlighter-rouge">_posts</code> directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run <code class="highlighter-rouge">jekyll serve</code>, which launches a web server and auto-regenerates your site when a file is updated.</p>
<p>To add new posts, simply add a file in the <code class="highlighter-rouge">_posts</code> directory that follows the convention <code class="highlighter-rouge">YYYY-MM-DD-name-of-post.ext</code> and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.</p>
<p>Jekyll also offers powerful support for code snippets:</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
<span class="nb">puts</span> <span class="s2">"Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="n">print_hi</span><span class="p">(</span><span class="s1">'Tom'</span><span class="p">)</span>
<span class="c1">#=> prints 'Hi, Tom' to STDOUT.</span></code></pre></figure>
<p>Check out the <a href="http://jekyllrb.com/docs/home">Jekyll docs</a> for more info on how to get the most out of Jekyll. File all bugs/feature requests at <a href="https://github.com/jekyll/jekyll">Jekyll’s GitHub repo</a>. If you have questions, you can ask them on <a href="https://talk.jekyllrb.com/">Jekyll Talk</a>.</p> |
Beta Was this translation helpful? Give feedback.
-
@4brunu I just cloned your repo and tried to build it locally. It worked, so the issue isn't Jekyll or theme. As a comparison here is the HTML I'm getting for your I don't know enough about the Rake task your using to deploy with Travis CI. Maybe that's the culprit. As |
Beta Was this translation helpful? Give feedback.
-
@mmistakes But even the home page, that has the compiled HTML is not working :/ |
Beta Was this translation helpful? Give feedback.
-
@4brunu That's a path thing. If you look at the HTML source the CSS is being referenced here https://4brunu.github.io/assets/css/main.css which doesn't exist. It's in your Like I mentioned earlier I don't know Travis all that well. That and your deployment process is the issue. Don't have enough experience with either to offer any other suggestions. |
Beta Was this translation helpful? Give feedback.
-
@mmistakes your last message gave me a hint, I found the solution and I'm leaving it here, because it could help anyone. My repository structure was, the source code was in master branch and the generated source was in gh-pages branch. |
Beta Was this translation helpful? Give feedback.
-
Environment informations
Expected behavior
I would like to be able to use this theme with GH pages, but don't want to fork it in the event that the repository need to use a different theme in the future without having to switch to a different repository for the page (if that makes sense), which would confuse people. Is this possible atm?
Beta Was this translation helpful? Give feedback.
All reactions