jekyllt / jasper2

Full-featured Jekyll port of Ghost's default theme Casper v2 👻
https://jekyllt.github.io/jasper2/
MIT License
764 stars 662 forks source link

Normal GitHub pages deployment #80

Closed abpaudel closed 3 years ago

abpaudel commented 5 years ago

As per the readme, there are problems with normal github pages deployment with this theme because of issues with plugins. However, I just tried deploying a github page without any visible issue. Can someone clarify what issues are there with this method of deployment?

wtho commented 5 years ago

When you add posts, it is not enough to just create a new .md file, but to use all the features of the blog-template, such as cross-referenced tags, the plugins have to be executed and the changes committed.

If GitHub would enable plugins on their Jekyll Engine, it would do it for you on startup, but in the current situation you have to run it on your local machine or some CI server and commit & push the generated changes.

michalzobec commented 5 years ago

If GitHub would enable plugins on their Jekyll Engine, it would do it for you on startup, but in the current situation you have to run it on your local machine or some CI server and commit & push the generated changes.

so it is not possible enable plugins on GitHub? you cannot create fully compatible theme for GitHub Page?

maximousblk commented 4 years ago

If it is not possible to do the normal deployment then a video or even a write up about the option 2 will be super helpful for people like me who are new to these things.

Edit: can GitHub actions help with what Travis does

wtho commented 4 years ago

@michalzobec GitHub only has the base plugins enabled. If you build a theme without pagenation, tags, ..., then it will work on GitHub pages out of the box without generating these each time by hand.

@maximousblk It would definitely work with GitHub Actions, but I do not know if anyone set it up before, so some fiddling around and testing might be required. But probably you can just migrate most of the commands from the TravisCI build.

maximousblk commented 4 years ago

@wtho other themes like pintereso (https://github.com/wowthemesnet/template-pintereso-bootstrap-jekyll) do the pagination and tags but still work with "normal" deployment.

I think we can borrow some things from other themes cuz this is a good theme which I need right now and don't have access to my computer (not saying you should do this for me).

abpaudel commented 4 years ago

@maximousblk I've been running the theme by omitting external plugin features. I too am planning integrate tags and other features by referring to other themes that does so without external plugins.

maximousblk commented 4 years ago

Meanwhile, can someone help me set it up using netlify or Travis CI? The instructions don't seem clear.

wtho commented 4 years ago

I think this should help you figure it out:

maximousblk commented 4 years ago

What are the plugins not supported by github pages that is used in this theme?

wtho commented 4 years ago

I'm also just some guy who once tried out this theme. Please try to research a little more before you ask for every small detail.

In the top of the jasper2 README in the section Getting Started it says

Important: For security reasons, Github does not allow plugins (under _plugins/) when deploying with Github Pages.

Having a look at the plugins directory `/_plugins/, you can immediately see, that there are custom plugins not supported natively by GHP.

maximousblk commented 4 years ago

Let's not heat up.

Sorry for being naive but I was just thinking about using JavaScript alternatives for the unsupported plugins. I mean, capitalisation can be done with js, right?

wtho commented 4 years ago

Haha don't worry, I'm glad to help! Just clarifying.

Of course you can use JS (I assume you mean client-side), but that would defeat the purpose of Jekyll and its strength to fully render a website on the server side and being independent of JS.

I would recommend to setup GitHub Actions, it might take a day to get into it and set it up, but then you're free to use any additional Jekyll plugins.

maximousblk commented 4 years ago

That's the problem. GitHub actions is not working for me

michalzobec commented 4 years ago

@michalzobec GitHub only has the base plugins enabled. If you build a theme without pagenation, tags, ..., then it will work on GitHub pages out of the box without generating these each time by hand.

where is a little problem: I use GitHub only, I am not have any build tool (except Visual Studio).

biomadeira commented 3 years ago

@abpaudel @michalzobec @maximousblk @wtho The latest developments with GitHub Actions make it work fine. I have added this basic workflow. I have now stopped building with TravisCI and then pushing to gh-pages branch, as the workflow (using this action) does everything out of the box for us. Read more here: https://jekyllrb.com/docs/continuous-integration/github-actions/