cgmartin / hexo-theme-bootstrap-blog

A simple Bootstrap v3 blog theme for Hexo
MIT License
104 stars 62 forks source link

set order of widgets #4

Open oupala opened 8 years ago

oupala commented 8 years ago

Is it possible to set the set the order of widgets?

The default ordering is alphabetical, I'd like to set another order.

It is currently a simple forEach. See themes/bootstrap-blog/layout/_partial/sidebar.ejs:

<% theme.widgets.forEach(function(widget){ %>
  <%- partial('_widget/' + widget) %>
<% }) %>

It would be great to be able to set the order in _config.yml where:

  widgets:
    - about
    - category
    - archive
    - recent_posts
    - tag

would be a different order and activation setting than:

  widgets:
    - recent_posts
    - about
    - category
oupala commented 8 years ago

This issue should be converted to a documentation.

It is already working as I wished in the issue... :+1: