BlendedSiteGenerator / Blended

Licence: GPL-3.0 license
The Most Versatile Static HTML Site Generator

Programming Languages

python
139335 projects - #7 most used programming language
Batchfile
5799 projects

Projects that are alternatives of or similar to Blended

hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (+163.64%)
Mutual labels:  static-site-generator, static-site, disqus
Staticgen
Static website generator that lets you use HTTP servers and frameworks you already know
Stars: ✭ 628 (+2754.55%)
Mutual labels:  static-site-generator, static, static-site
React Static
⚛️ 🚀 A progressive static site generator for React.
Stars: ✭ 9,946 (+45109.09%)
Mutual labels:  static-site-generator, static, static-site
readme-in-static-site
💎 Transform and insert your GitHub readme in your static site.
Stars: ✭ 24 (+9.09%)
Mutual labels:  static-site-generator, static-site
vscode-front-matter
Front Matter is a CMS running straight in Visual Studio Code. Can be used with static site generators like Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...
Stars: ✭ 962 (+4272.73%)
Mutual labels:  static-site-generator, static-site
presta
Minimalist serverless framework for SSR, SSG, serverless APIs and more.
Stars: ✭ 89 (+304.55%)
Mutual labels:  static-site-generator, static-site
Peco
nothing here, move on..
Stars: ✭ 213 (+868.18%)
Mutual labels:  static-site-generator, static-site
pokedex-nextjs
Get to know the different render methods that the Next.js framework provides by exploring Pokemons
Stars: ✭ 39 (+77.27%)
Mutual labels:  static-site-generator, static-site
urlzap
⚡️ Your own static URL shortener
Stars: ✭ 57 (+159.09%)
Mutual labels:  static-site-generator, static-site
mpa-frontend-template
🔥 Template based on webpack, pug, stylus, es6, postcss for multi page applications
Stars: ✭ 27 (+22.73%)
Mutual labels:  static-site-generator, static-site
hyperdraft
Turn your notes into a website.
Stars: ✭ 59 (+168.18%)
Mutual labels:  static-site-generator, static-site
Next.js
The React Framework
Stars: ✭ 78,384 (+356190.91%)
Mutual labels:  static-site-generator, static
Statiq.framework
A flexible and extensible static content generation framework for .NET.
Stars: ✭ 251 (+1040.91%)
Mutual labels:  static-site-generator, static-site
Mizi
A simple markdown to website generator written in C++.
Stars: ✭ 31 (+40.91%)
Mutual labels:  static-site, website-generation
Elegant
Best theme for Pelican Static Blog Generator
Stars: ✭ 241 (+995.45%)
Mutual labels:  static-site-generator, static-site
nene
Nēnē: A no-frills static site generator
Stars: ✭ 22 (+0%)
Mutual labels:  static-site-generator, static-site
Kotsu
✨ Clean, opinionated foundation for new projects — to boldly go where no man has gone before
Stars: ✭ 48 (+118.18%)
Mutual labels:  static-site-generator, static-site
highlights-jekyll-theme
A Jekyll version of the "Highlights" theme by HTML5 UP.
Stars: ✭ 26 (+18.18%)
Mutual labels:  static, static-site
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (+40.91%)
Mutual labels:  static-site-generator, static-site
Jekyll Doc Theme
Jekyll theme for creating project documentation websites
Stars: ✭ 203 (+822.73%)
Mutual labels:  static-site-generator, static-site

Blended

Blended is a static website generator written in Python and licensed under the GPL 3.0 open-source license. It supports a HTML-based templating system, content written in HTML, Markdown, Textile, reStructuredText, Jade, Docx, and Plain Text. It also supports the compilation of SASS, Less, Stylus, and CoffeeScript. Blended makes it easy to deploy your websites by including a built-in FTP uploader. In addition, Blended is powerfully upgradeable because it has support for a Python plugin system.

Installing

To install Blended from PyPi (recommended) run:

pip install blended

To build and install Blended from source run:

git clone https://github.com/johnroper100/Blended.git

cd Blended

pip install .

Running

To use Blended after you have installed it, run:

blended init

This will help you start up a new website. If you need help, run:

blended --help

and you will see all of the commands that are available.

Building Your Site

To build the site you have created with Blended run

blended build

or

blended interactive (for on file change building)

For any command that you run, you can specify an alternative --outdir to build or view from. For example, to build to the source_output folder, run blended build --outdir source_output.

Inside the config.py file, you can set minify_css and minify_js to true to optimize your CSS and JS files after building.

Working With templates

You can install templates from GitHub using blended install-template.

Each Blended website uses four template files:

  • header.html (Required)
  • footer.html (Required)
  • home_page.html (Not required but the site looks better)
  • content_page.html (Not required but the site looks better)
  • nav(name).html (You can have up to 6 different nav templates. For example, navTest.html or nav_test.html)
  • page_list_item.html (Not required, if used, this will replace each page list item content. Can have the variables {name}, {content}, {content_short}, {date}, {day}, {month}, {month_name} {year}, {path})

In these files you place the markup for each section to be generated.

When working with pages, you can optionally specify which template you want (other than content_page.html) by adding the name of the template file without the extension to the first line of the page, and then at least five +s to the second line. For example, if I wanted to use a template called blog_page.html for a certain page, I would put

blog_page
+++++

at the top of the page. Make sure you put it at the top or else it will not work!

You have some variables that you can use in your templates to pull in values while building:

  • {website_name}
  • {website_description}
  • {website_description_long} (Use for long descriptions like an author bio)
  • {author_name}
  • {author_bio}
  • {website_language}
  • {website_license}
  • {website_url}
  • {page_content} (Can only be used in the content_page.html template file)
  • {page_date} (Date/Time the page was written/modified)
  • {page_day} (Day the page was written/modified)
  • {page_month} (Month the page was written/modified)
  • {page_month_name} (Name of the month the page was written/modified)
  • {page_year} (Year the page was written/modified)
  • {relative_root} (Returns a relative path for the current file)
  • {random_number}
  • {build_date}
  • {build_time}
  • {build_datetime}
  • {(page_filename)_active} (When building, if the active page equals the filename in the tag, the tag is replaced by active ex. {getting-started.html_active})
  • {nav(name)} (Use to place navbars. To add a navbar, write nav plus something else. For example, {nav2} or {nav_test})
  • {page_list} (Lists all the pages in <ul><li><a href="page-name.html">page-name</a></li></ul> format)
  • {page_file} (The full filename of the page. ex. getting-started.html)
  • {page_filename} (the filename of the page without the .html extension. ex. getting-started)
  • {page_name} (Gives the name of the current page. Makes the page name look more pretty. For example, getting-started.html is converted to Getting Started)
  • {page_folder} (Gives the name of the current page's folder. Makes the folder name look more pretty. For example, getting-started is converted to Getting Started)
  • {page_folder_orig} (Gives the name of the current page's folder)
  • {blended_version} (Gives Blended's current version)
  • {blended_version_message} (Gives Blended's current version with a nice message: Built with Blended v4.9)

Wherever you put these variables in the templates, they will be replaced by the values in your config.py file. The variables must stay within the curley brackets. You can even put variables inside the content of other variables!

Working With Plugins

You can install plugins from PyPi, for example pip install blended_google_analytics. You can also install plugins from GitHub using blended install-plugin.

To use plugins, include them in the plugins list in config.py.

If the plugin is meant to be called in your templates, ex. {html_comment_box} then insert it into the plugins list like plugins = ["html_comment_box"].

You can use multiple plugins at once, ex. plugins = ["html_comment_box", "minify_images"]

Working With Custom Variables

Inside of your config.py there is a variable custom_variables = {}. This is a dictionary of all of the custom variables you would like to use. To add a variable, add it as a dictionary item.

Here are some examples:

custom_variables = {"software_name": "Blended"}

custom_variables = {"software_name": "Blended", "software_version": "5.0"}

Importing from WordPress

You can import a website and posts from WordPress. To do so, export from WordPress using the Posts option and download the file to the directory where you want to generate your website.

Run the command blended import-wp and it will prompt you for the name/file path of the file. Type in the filename and Blended will create a new website with the information.

Importing from Blogger

You can import posts from Blogger. To do so, export from Blogger using the Backup Site option and download the file to the directory where you want to generate your website.

Run the command blended import-blogger and it will prompt you for the name/file path of the file. Type in the filename and Blended will create a new website with the information.

Pre-Made Templates

Remember that you can install templates from GitHub using blended install-template.

Plugins

Projects That Use Blended

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].