JupyterLab viewer for static websites (e.g. jekyll) - jekyll

I use Jupyter notebooks to create posts for a jekyll based website, so I'm starting to try out JupyterLab. If I have jekyll serve ... running a development server, is there a way to view it within a JupyterLab window/panel/tab?

Related

deploy a Jekyll site with the use of a

This is the first time that I am going to use Jekyll to build a static site. I would like to use a dozen plugins that are not white listed for deploying on Github. My question is : is it possible to deploy a such site with a dozen plugins (not white listed) on github ?
Browsing on internet, I found the following assertions :
1) We can't run user plugins on GitHub Pages due to security restrictions. That' what the documentation says
2) You are free to generate your site locally and push the resulting HTML to a Git repo, however : what does that means ? First when you generate the site locally, it ends with a group of HTML files and that group of html files, are they enough to run the site autonomously (for example must you include the css files in html pages ) ? Furthermore when you push the resulting HTML to a Git repo, is it enough to deploy it on a production environment (on GITHUB for example) ? and how you do that ?
3) on this link (https://help.github.com/articles/using-jekyll-plugins-with-github-pages/) I found the following explaination : Adding Jekyll plugins to a GitHub Pages site
You can further customize your GitHub Pages site by adding Jekyll plugins. (do they talk about all plugins ?)
GitHub Pages officially supports the Jekyll plugins found in the GitHub Pages gem. For the exact versions of the Jekyll plugins that GitHub Pages supports, see this list of GitHub Pages dependencies. Other plugins are not supported, so the only way to incorporate them in your site is to generate your site locally and then push your site's static files to your GitHub Pages site.
So as they say, it is possible , generating your site locally and then pushing your site's static files to your GitHub Pages site. Is there a detailled procedure example somewhere ?
Thanks in advance for your answers
To be able to use Jekyll with any plugins and host in Github pages you have two options
first alternative
Build your site locally and then push the resulting site at _site to Github.
Then push the built site's static files to your pages publishing branch (gh-pages or master depending on your site type).
GitHub Pages supports any HTML or static files you push to it so you
can use any static site generator to build your site. You can even
just push raw HTML files to GitHub Pages and it will build your site.
You can also customize your own build process locally or on another
server.
second alternative
Use a CI service like Travis, so when you push your Jekyll files to Github, it automatically builds your site and deploy it to your publishing branch.

Commands to start and stop jekyll site

Which commands do I need to use to start and stop a jekyll site?
I am trying to use
jekyll build
or
jekyll serve
but I only get build and serve folders created instead.
Both commands create a folder containing your website files already processed and ready to make them available using a web server, with the difference that serve also starts a server that should be used only for development only at http://localhost:4000.
So you can "start" a Jekyll site with jekyll build and then using a server to make those files "available" or you can use jekyll serve and then access http://localhost:4000 to browse your website while you develop it.

Use 'jekyll-multiple-languages-plugin' with GitHub Pages

How to use 'jekyll-multiple-languages-plugin' on GitHub Pages?
It works locally, but I get the following error when I push my sources to GitHub:
The tag `t` on line 6 in `about.html` is not a recognized Liquid tag.
The code causing the error is:
{% t about.title %}
GitHub Pages allow a limited set of plugins. You can find a list here with the versions for each plugin.
In order to run your jekyll site locally in an environment similar to GitHub Pages, you should serve it with plugins disabled, using:
jekyll serve --safe
There are ways to make Jekyll multilingual without plugins, e.g. this implementation based on this article.
If you really want to use plugins, you will have to generate your web pages locally, and push them into your GitHub repository instead of the Jekyll sources.
On Github pages only following gems are allowed : https://pages.github.com/versions/
If you want to use any other gems you can :
build locally and push to gh-pages branch on github pages (see this for git setup)
setup a continuous integration that will take care of building and publishing for you
use a service like netlify

Use Jekyll to generate static pages locally

After reading some documentation, I find Jekyll-based project will work on a Jekyll aware web server, what if I just need to generate static pages locally, is there a way to publish locally, I just need the generated blogs locally and will host it in a plain static web hosting.
Can Jekyll generate static pages locally (for blog posts)?
Can Jekyll generate post or blog folder that can be navigated through a navbar which is part of the blog list template?
What should be the format of the blog list to be able to be Jekyll-friendly?
The answers are yes, yes and liquid/html. Just install Jekyll locally and look for the generated _site folder. It will exceed your expectations, for sure.

Having trouble building jekyll locally and deploying to gh-pages

A few months ago, I set up a site using jekyll and it's hosted on github pages here: http://sethxd.github.io. Originally, I just figured I'd let github pages handle the building because I wouldn't need to use plugins.
Well, now I'd like to use plugins. I've tried to follow a few tutorials online to set up a separate source branch, but I keep running into git errors and conflicts. I'd also like to set up a rakefile or other tool to build and deploy this automatically in the future.
I'm on Windows, running Jekyll 3.0.
GitHub Pages doesn't allow using most of Jekyll plugins for security reasons, but some can be used. The only way to deploy a Jekyll website to GitHub that uses plugins is via _site folder. You only upload the content of this folder, so GitHub won't build the site for you, it will display it as simple html.