How do you separate jekyll site content and code into separate branches? - web

Hi I am using jekyll hosted on github oages and I would like to separate the content and code of my site into separate branches so:
It is more organised.
If I want to change some code in the site experimentally I can create A new branch based of the code branch and I don't have to worry about updating its contents when I create new blogs in my main code branch.
I have done some research someone mentioned using gem files to store the code but creating a jekyll theme and distributing it with ruby gem seems a daunting task since I don't even know the gem programming language.
Any thoughts? And thanks in advance.

What you want is a CI solution.
Github Action should be a good choice to you since you are using Github Pages.
To simplify the process, you could leverage jekyll-deploy-action.
It also makes the plugins those are not on the Github Safe List works on Github Pages.
To achieve this, just follow the usage doc.

Should have said this earlier but I found a solution to the problem you can actually set a them variable in you _config.yml so it pilots to a GitHub repo

To seperate the (markdown) content from the (template) code you should use/create a theme.

Related

Sharing Meteor APIs/schemas across multiple projects (git repos)

I am working on a project that has a few different code-bases (mostly Meteor), but they all use some of the same API code (schemas, publications and methods).
It doesn't seem very intuitive to have one repository and use sub-trees/sub-modules in my case. Maybe I'm wrong and somebody could help clear it up.
An example structure of my project:
project-landing-page (meteor app for collecting leads and offering basic account management)
project-app (an angular/ionic/cordova/meteor app that is distributed via the app store)
project-worker (a set of cron-like scripts that are executed in the background to manage the data in the mongo instance)
They all share the same schemas, and the two meteor apps use the same methods and publications. It seems a bit cluttered to have one repo for all of this code. Making a branch for the app would also branch the code for the worker scripts. That just seems messy.
Would it be okay to have another repo called "project-apis", that provides the shared code an could be cloned into the other projects? What are the drawbacks? Other than having to run git pull when the "project-apis" repo is updated, I can't really see any.
Would any git-wizards be able to chime in?
Thanks!

Unable to fix Hugo architecture when hosted on gitlab

I am new to Hugo and tried to create a hugo website using hugo's tutorial and then putting it online with a predefined theme named simplicity using their gitlab tutorial.
However my website seems to be missing the theme for the index page and the structure seems to be missing.
You can find the gitlab repo here and the index page here.
For instance, the posts link does not link to https://username.gitlab.io/website/posts but to https://username.gitlab.io/posts .
The website works well locally and I am not sure how to fix the structure on gitlab. I have tried tweaking the .gitlab-ci.yml and config.toml documents to no avail.
Thanks for your pointers.
I eventually fixed the problem with help from hugo's discourse community by changing the baseurl, rebuilding the website, and paying attention to cache/ trying with another browser.

Use SVN in opencms to keep versioning of site content

I am working with 10.5.4. I would like to use SVN to keep versioning of my site contents so as editors to be able to commit their changes. I have read a lot about mounting the VFS and that stuff, however with that way everyone coulld access and commit others changes
I would appreciate any further information about using versioning not only for module developments but also for site contents
I know, this is probably not exactly what you are looking for, but you may have a look at the OpenCms Maven plugin.
The main focus of this plugin is, to ease the development process of OpenCms projects. But with a good setup and Maven configuration you might use it to put the contents of your production site under version control. If you are interested, you'll find more information on the official website of the plugin.

Is there a way I can embed code from github repository in a node js site?

Is there a way I can embed the code in a file present in github repository into a page of site being developed on node js.
Simplest I can think of is invoke a ajax call and pull the content into a dom element on the page.
Is there any other way out?
EDIT
Code on github is not nodejs code.
A use case:
I have ruby code committed and shared on github, now I want to refer that code on a site being created using nodejs.
Gist-it is your solution for it. A man named "Robert Krimen" is kind enough to create an application so that we can embed any file from github repository to our webpage/blog. You can do it as simple as in three steps, just like you embed a gist, hoping you are familiar with embedding gist.
Copy github url of the file you like to embed.
Submit it to Gist-it and copy the script tag generated.
Use the script tag copied in you blog, same as you use gist.
for further reference
http://blog.revathskumar.com/2012/08/embed-files-from-github-repository-into-webpage.html

Reveal.js server - serve many presentations

I'm using markdown and reveal.js to create presentations, and want to start using node.js to serve them from my website.
I've read the docs for reveal.js and it seems like it's easy to do for one presentation, but trickier for several. For example, I'd like
http://mysite/presentations/rabbits
and
http://mysite/presentations/deer
to run on the same instance of node, but each point to a different presetation. Is this possible natively (or with existing plugins), or will I have to hack something together myself?
I know, just three years late. But in case anyone might end up here to look for an answer, there's a working recipe over here: https://web.archive.org/web/20151223044405/https://medium.com/#KienanKB/serving-multiple-reveal-js-presentations-b1a5c086e959 (archived link to the now removed article).
Note: Reveal.js changed the part defining what files it watches:
html: {
 files: [ ‘index.html’ ]
}
Instead of ‘index.html’ it now reads ‘*.html’. 
The recipe still works fine though.
As long as you're using basic features you don't need node.js at all - just drop the reveal.js distribution in every presentation folder where it is served statically.
Another option is hosting on github pages, I've checked it now for this scenario and it seems to be served right.
You might also want to raise this issue at the project page https://github.com/hakimel/reveal.js/issues

Resources