Feature Image

Writing high quality blog posts is a difficult and time consuming task. It requires a great deal of effort and dedication to create content that is both interesting and informative. It is not enough to simply write a few sentences and post them online; the content must be well-researched, well-written, and engaging. It also requires a good understanding of the topic, as well as the ability to craft a compelling narrative. Additionally, the blog post must be optimized for search engines, which requires an understanding of SEO principles. Finally, the post must be edited and proofread to ensure accuracy and clarity. All of these steps take time and effort, but the end result is worth it.

We created AuthorAI to help the bloggers, the writers, and the authors to enhance the creative authoring flow, while leaving the plumbing to the AI. AuthorAI Blogger API was used to generate most of the content for this post. A human author provided the prompts to guide the AI to generate the content. Then based on the content generated the author could research the topic, structure the content appropriately, and generate the post. The post was then edited to add interleaving content to support the intended objective. The human author used a Jupyter Notebook to ideate, research, structure, and generate the content starting with following import statement. They go on to create a blog post object. Next setup the concept or idea which we want to describe as the introductory topic you just read. Then call blogger.describe_concept() API to generate the topic with appropriate grade level English. Finally, they set the topic in the blog post object for publishing.

from authorai import blogger

post = blogger.BlogPost()

concept = 'Writing high quality blog posts is time consuming and hard work'
topic = blogger.describe_concept(concept, 150, grade=10)
post.set_topic(topic)

Before we step into more AuthorAI code, let us continue to read why integrating AuthorAI for Static Website Generators like Jekyll is important. The the words of AI…

Static website generators gaining popularity

Static website generators are gaining popularity as a way to quickly and easily create websites. These generators allow users to create websites without having to write any code. Instead, they use a template-based system to create a website that looks professional and is easy to maintain.

Static website generators are becoming increasingly popular due to their ease of use and the fact that they are more secure than traditional websites. With a static website, all of the content is stored on the server, meaning that it is not vulnerable to malicious attacks. This makes it much more secure than a traditional website, which can be vulnerable to hackers.

Static website generators also offer a number of advantages over traditional websites. For example, they are much faster to create and maintain. This is because they do not require any coding or programming knowledge. Instead, users can simply select a template and fill in the content. This makes it much easier for users to create a website quickly and easily.

In addition, static website generators are much more cost-effective than traditional websites. This is because they do not require any hosting fees or other costs associated with traditional websites. This makes them an attractive option for those who are looking to create a website on a budget.

Finally, static website generators are becoming increasingly popular due to their ability to create websites that are optimized for search engines. This means that they can help to improve the visibility of a website in search engine results. This can be beneficial for businesses, as it can help to increase their online presence and attract more customers.

Overall, static website generators are becoming increasingly popular due to their ease of use, security, cost-effectiveness, and ability to create websites that are optimized for search engines. This makes them an attractive option for those who are looking to create a website quickly and easily.

The above section was generated by first setting the title. Then using AuthorAI Blogger API we could generate the above text. Finally, we added the section to our blog post object for further processing.

title = 'Static website generators gaining popularity'
section = blogger.describe_concept(title, 400, grade=10)
post.set_sections(title, section)

Similarly following section was created. Let us learn more about Jekyll before discussing how AuthorAI integrates with Jekyll.

Jekyll static website generator features

Jekyll is a static website generator that allows users to quickly and easily create websites without the need for complex coding. It is a powerful tool that can be used to create websites with a variety of features.

Jekyll is built on the Ruby programming language and is designed to be simple and straightforward to use. It is a command line tool that can be used to generate HTML files from Markdown files. This allows users to quickly and easily create websites without having to write any code.

Jekyll also has a number of features that make it a great choice for creating websites. It has built-in support for Sass and CoffeeScript, which allow users to quickly and easily create dynamic websites. It also has support for Liquid templating, which allows users to create dynamic content without having to write any code.

Jekyll also has a number of other features that make it a great choice for creating websites. It has built-in support for RSS feeds, which allows users to easily syndicate their content. It also has support for pagination, which allows users to easily create multiple pages for their website.

Finally, Jekyll has a number of plugins that can be used to extend its functionality. These plugins allow users to add additional features to their websites, such as search functionality, social media integration, and more.

To integrate AuthorAI with Jekyll site we initialize a JekyllSite object and identify the Jekyll managed static website folder. Later releases of AuthorAI will parse an existing Jekyll site for config data and content for further automation. For now, this is a good enough start.

authorai_site = blogger.JekyllSite()
authorai_site.set_site_folder('../authorai-site')

In fact, we can use AuthorAI to generate code for creating dynamic Jekyll apps using the Liquid Template Markup Language. Let us learn more about Liquid before jumping into some AuthorAI code to do just that.

Liquid template language for Jekyll

Liquid template language for Jekyll is a powerful and versatile tool for creating dynamic websites. It is a templating language that allows developers to create custom HTML and CSS code for their websites. It is designed to be easy to use and understand, and is used in conjunction with the popular Jekyll static site generator. Liquid is written in Ruby and is based on the Liquid Markup language. It allows developers to create custom HTML and CSS code for their websites, as well as to create dynamic content such as blog posts, product pages, and more. Liquid also allows developers to create custom tags and filters, which can be used to manipulate data and create custom content.

Following code example was generated by AuthorAI. The human author first identifies the language to generate the code. Them defines the use case to be implemented by this code. This is then input to blogger.generate_code() API for doing the magic.

language='HTML page with liquid template language'
usecase = 'todo list with add, delete, and complete features'
caption, snippet = blogger.generate_code(
  language=language, usecase=usecase, loc=30)
post.set_snippets(caption, snippet)

Code Example

HTML page with liquid template language implementing todo list with add, delete, and complete features

<html>
<head>
  <title>Todo List with Liquid Template Language</title>
</head>
<body>
  {% assign todos = 
    “Buy groceries, take out the trash, 
      clean the kitchen, mow the lawn” | split: ‘,’ %}

  <div>
    <ul>
      {% for todo in todos %}
      <li>{{ todo }}
        <a onclick="completeTodo({{ forloop.index }})">Complete</a>
        <a onclick="deleteTodo({{ forloop.index }})">Delete</a>
      </li>
      {% endfor %}
    </ul>

    <button onclick="addTodo()">Add Todo</button>
  </div>

  <script>
  let todos = {% for todo in todos %}
        "{{todo}}"
      {% unless forloop.last  %},
      {% endunless %}
    {% endfor %};

  const deleteTodo = (index) => {
      todos.splice(index, 1);
      console.log(todos);
  }

  const completeTodo = (index) => {
      let todo = todos[index];
      todos[index] = `<strike>${todo}</strike>`;
      console.log(todos);
  }

  const addTodo = () => {
      let newTodo = prompt('Enter a new todo');
      todos.push(newTodo);
      console.log(todos);
  }
  </script>
</body>
</html>

Using AuthorAI Blogger we can also add more features to our Jekyll blog like Frequently Asked Questions.

question = 'What are the well know blogs or static websites built using Jekyll?'
post.set_qna(question, blogger.qna(question))

Frequently Asked Questions

What are the well know blogs or static websites built using Jekyll?

Some well-known blogs and static websites built using Jekyll include GitHub Pages, The Jekyll Theme Showcase, Smashing Magazine, and The Changelog.

Jekyll is a very popular static site generator. According to BuiltWith, Jekyll is used on over 1.2 million websites.

Which companies use Jekyll static site generator?

Some of the companies that use Jekyll static site generator include GitHub, Shopify, Airbnb, Netflix, and Microsoft.