I have a Ghost blog. I would like to host it using Jekyll etc. using static pages that I would be generating.
I use Prismjs for syntax highlighting.
How is Jekyll going to handle this situation considering that static pages will have no Javascript support?
Do I need to make changes from my side?
Thanks.
Static pages will have no JavaScript support.
Wrong. Static page doesn't have database support, but it supports JavaScript (quite obvious actually).
Jekyll has built-in syntax highlight engines with Pygments or Rouge. Pygments needs Python, while Rouge is pure Ruby based. Please have a look at documentation here.
If you don't want to use built-in engine, yes, Prism is also possible. You can totally follow the usual usage like this, or use this Jekyll Prism Plugin. For example, this article in my blog uses both built-in Pygments highlighting (for Ruby and Python code) and JavaScript Google prettify highlighting (for C# code).
If you don't know how to use JavaScript in your Jekyll project, please post your repository link, so we can help out.
Related
I feel as if I'm missing something. I've read through the documentation of Jekyll and Hugo, but am still confused as to why one would use them as opposed to something like Pug with Webpack or Parcel to create a static-site.
So, what do static-site generators provide that bundlers don't?
You are comparing apple with oranges here. While all those tools can technically be used to create static websites, they serve different purposes. To quote the header of Jekyll's homepage:
Transform your plain text into static websites and blogs.
Jekyll and Hugo are really designed for plain text and (mostly) blogs. As a user, you write articles in plain text or Markdown, and use those tools to turn them into static HTML sites. Besides generating HTML, the tools have a lot of functionality that is typically needed for blogs, e.g. they create an index of all articles and support categories.
With Jekyll (and probably Hugo, but never used it myself), you can also add pages to your site that are not blog articles. So theoretically, you can ditch the blog and use it to build a static website. But that is probably not why most people use it...
Compare that to Webpack: Webpack is first and foremost a build tool for Javascript. It doesn't care if you are building a static page, a progressive web app or a mobile app. It just bundles your assets based on the configuration you provide. With the right configuration, you can certainly use it for static pages, but Webpack will not offer more functionality than to bundle your files.
Depending on your goal, either of these tools might be better suited for you. Tools like Jekyll and Hugo make it very simple to get started and create a static website or a blog. You can style the HTML, sprinkle JavaScript on it and create your own design. Or you just grab an existing template that somebody else in the community created. Whatever approach you choose, you have something running in minutes.
Tools like Webpack on the other hand give you all the flexibility and a lot of power, but also require that you do everything yourself. It really depends on your use case whether or not it makes sense to build a static site with them.
I have a template page with a number of labels. I would like to produce several html's from this template, say one per each language. Is this possible using Jekyll?
I have seen a multi-language-plugin, however it seems not working anymore.
Can Jekyll produce more pages from a single template?
If the answer is negative, do you know any other static site generator that can handle multi language?
A good way to implement multi-language sites in Jekyll is via jekyll-multiple-languages-plugin that also works with Jekyll v3.x
You can find an useful tutorials on how to install and configure the plugin here and here.
As an alternative, you can try to implement multi-language without any plugin, using this tutorial.
I'm learning Typo3 and wanted to create my own website. I have found that it's very difficult to work with Typo Script.
Is there an easy way to integrate an example HTML5 template in Typo3? I'm using the latest version of Typo3 (6.2).
Best option to learn this easy way is http://typo3buddy.com/ by Ronald Eijkman. Great place to start, and I would chose Fluid templating instead TemplaVoila...
TypoScript is must-know technology, if you wan't to use TYPO3...
You can use TemplaVoila extension as other templating engine, anyway it also has it's requirements (learning curve)
I find myself doing a lot of work here and there (both for myself and on contract) to develop small, static websites where the use of dynamic tools like PHP frameworks or Rails would be totally useless and heavy-handed and a waste of resources.
I'm looking for a way to author static HTML sites that introduces a level of modularity and syntax simplification; to clarify, something like SASS for HTML with a fast syntax and that allows common patterns to be extruded out in to separate files.
I'm aware of HAML. I would love for HAML to be my solution. But in all of my reading, HAML doesn't seem to have an equivalent to a SASS-style include directive used for in-lining the content of external files. In addition, HAML seems to bill itself as more of a templating engine than an authoring tool the way SASS bills itself; it seems to have a desire to be a replacement for ERB and to be used in Rails projects, rather than being used as a modular HTML preprocessor.
I know I could roll my own solution by bolting a small amount of Ruby and in-line evaluation on to HAML, but it feels a little cheap and dirty since this isn't really what HAML "wants" to do. It's not a solution I'm averse to, but if there is a no-configuration, light-weight option out there that basically behaves like SASS but for HTML then I'd prefer to go that route.
We build static sites with middleman. There are a lot of features, but mainly it's just a very handy static site generator (for development and production). As a plus middleman is a quite popular thing.
And another known option is a Serve. It may be useful for rails prototypes or for those people, who already familiar with rails.
But I still prefer middleman because it's more popular (Serve just more younger, not worse).
As about your question: in both tools you can split HAML views into partials, layouts, etc.
Also, take a look at this category.
It sounds like Stasis would fit your needs very well. I've used it to build a number of small static sites now.
Another option is Jekyll. It offers an easy setup, easy syntax, plugins and extras.
I am looking for a blogging platform that has built in tools for programming-related content. For example, I've seen blogs that have line-numbers, color-coded line separation, code-formatting and tool tips for copying and pasting code-samples. Some of these are better than others. (I'm sure I'm not the only one here who gets annoyed by blog entries with posted source that you can't copy without also copying all the line numbers). So, my question is what blogging-platform does the community recommend for a developer-oriented blog?
er...none that i know of. at the moment, you have to get the bits and pieces together. for my own blog (Blogger, so i'm limited in addons), i use Highlight code converter to generate the display HTML/inline CSS, clean it up a bit (the default settings assume you're creating an entire web page from the code) by removing unnecessary markup, then using it in my blog posts.
Wordpress has the code highligthing feature using some addins, if you are going to host it yourself it will be a very good option to use Wordpress.
BlogDown is a static blogging platform, so it can be hosted on GitHub. You can write posts with markdown files, which has great support for code snippets. You can write your own themes and modules for it also. Unlike Jekkyl, BlogDown does not have a compilations step. You just swap out the markdown files, and you're good to go. It's also worth noting that BlogDown supports custom renderers.