Login  Register

Static Website (blog) generator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Static Website (blog) generator

ChrLipp
Hi!
I would like to build a static website (concrete a blog) generator with the help of Asciidoctor. Since I didn't use Asciidoctor before I  would like to ask for the typical steps necessary to reach this goal:

- At first I would hand-craft a blog post  html page
- I would use Asciidoctor HTML backend to create HTML, here comes the question:  should I try to generate the whole page or should I use a template (I will use Groovy) and just "inject" the blog post part into the template?

Thanks for your support,
kind regards

Christian
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Static Website (blog) generator

asotobu
Hi,

have you seen jbake.org project? it is a blog generator (like awestruct) which has planned to support Asciidoctor, maybe you can collaborate in that project, and then use it within Groovy, well it is only a suggestion. Moreover you can see how they are doing the transformation from post file to html.

Apart from this project, I would suggest to create a template and inject there the generated content. I think it is more versatile because of separation of concerns. Moreover if in future you want to support other formats, would be easier to integrate with current structure (look and feel).


Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Static Website (blog) generator

mojavelinux
Administrator
Also, if you're willing to use Ruby, I encourage you to checkout Awestruct. That's the static site generator used for asciidoctor.org.


Here's a guide to get started with it:


I'd like to see jBake progress, so I second Alex's recommendation if the JVM is your target platform for running it.

-Dan


On Wed, Jun 5, 2013 at 7:47 AM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

have you seen jbake.org project? it is a blog generator (like awestruct) which has planned to support Asciidoctor, maybe you can collaborate in that project, and then use it within Groovy, well it is only a suggestion. Moreover you can see how they are doing the transformation from post file to html.

Apart from this project, I would suggest to create a template and inject there the generated content. I think it is more versatile because of separation of concerns. Moreover if in future you want to support other formats, would be easier to integrate with current structure (look and feel).





If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Static-Website-blog-generator-tp285p291.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Static Website (blog) generator

ChrLipp
Hi asotobu , hi Dan!

Thanks a lot for the links and the information you provided. I know (and used) Octopress http://octopress.org/, a framework based on Jekyll http://jekyllrb.com/. I am not that happy with Octopress, so I wanted to switch the framework and decided to build my own on top of Asciidoctor.

However I didn't know the generators you mentioned, so I will play around  with these. Even if I want to learn and use Asciidoctor it would be easier to start on top of an existing framework than to begin from scratch.

Thanks for your support!
Christian
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Static Website (blog) generator

Stefan Miklosovic
This post was updated on Jun 15, 2013; 2:49pm.
Hi

I am using Asciidoctor  with BlazeBlogger http://blaze.blackened.cz/.

It is pretty nice static blog generator which produces just pure HTML. I started to write blog in it http://miklosovic.net/.

What is the true power of this blog tool is that you are using it in shell. E.g when you want to make blog post, you type in your blog root dir:

$ blaze-add

Then your $EDITOR is fired up and you write blog in pure HTML. You write tags, name of post, categories and so directly into that editor file, blazeblogger recognizes and parses it automatically.

Then you compile whole blog with

$ blaze-make

And you are done :)

Since writing pure html sucks, I am using asciidoctor for fast typing, then I compile asciidoc file, output is HTML and then I copy part of that generated html file into blaze blogger as

$ blaze-edit 1

1 is number of blog post, then I paste asciidoc output there and I correct some typos in generated asciidoctor html output (if there are any).

I love this whole concept but copying of asciidoctor is very tiresome. Blaze blogger is written in Perl, not ruby, but there are custom processors to specify which parse the content instead of default blazeblogger backend.

That blog is on my github:https://github.com/smiklosovic/blog-gsoc

If someone was able to add asciidoctor support into blazeblogger so I can write posts directly in blazeblogger editor and it is parsed with asciidoctor, avoiding copying of generated output by asciidoctor, it would be awesome :D in that case, beers on me! :) There would not be easier way how to write blogs really, you are ready to publish complete standalone blog literally under one minute, installation of whole thing included.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Static Website (blog) generator

Stefan Miklosovic
Hehe it was easier than I expected :)

you just have to setup your own processor like

$ blaze-config blaze-config core.processor 'ascii_processor %in% %out%'

and put this ascii_processor file into your $PATH (e.g. to /usr/bin)

https://github.com/smiklosovic/blog-gsoc/blob/master/stuff/ascii_processor

blazeblogger treats comments like this
<!-- break -->
 and makes perex + blogpost itself from it. Asciidoctor can't make html  from it because blazeblogger would not swallow it, so you have to type
+++<!-- break -->+++
 in the embedded editor.

Then header and footer from asciidoctor compilation are removed automatically so just HTML which is used is processed with blazeblogger.