Search code examples
githubjekyllliquidjekyll-extensions

How to get started on building my own jekyll template?


How do I make my own design in jekyll blog ? Currently I have the default minima theme I got by jekyll new my-blog and no idea of how to get started on designing my own posts, main etc layouts. For some reason I don't see the typical _layouts and _includes folders when I ran the jekyll new command


Solution

  • I don't see the typical _layouts and _includes folders when I ran the Jekyll new command

    Then start by creating them. They are just folders. You can start a layout with this minimal structure in a file _layouts/main.html:

    <!DOCTYPE html>
    <html>
      <head>
      </head>
      <body>
        {{ content }}
      </body>
    </html>
    

    With an "hello world" be like this:

    ---
    layout: main
    ---
    Hello World
    

    Then extend the layout with whatever you want, like a normal web page: css, header, footer, ...