-
Notifications
You must be signed in to change notification settings - Fork 1
Modules
BlockPress currently includes three modules, one link module and two content modules. These are link, static and steem.
The link
module is the simplest and allows a link to any url to be added to the main menu. The bundled link module allows a any url to be specified. You may want to build a custom link module for more specific kinds of link. For example, you want to create a wikipedia
module so that you can just pass in a page name and the correct url is generated automatically. Link modules are the simplest kind of module to create.
Content modules such as static
and steem
give BlockPress its real power. These allow content to be loaded into the contentArea of the page.
You must list any module you intend to use in the modules
array of your config file. To optimise loading performance, do not list any modules that you do not intend to use on your site.
"modules": ["steem","static"],
You can specify the default content your site should load using the firstpage
object. Specify the module to use with the type
property, and any additional information using the args
property. Different modules expect different data types for the args
property. You can only use Content modules in this object.
You can also specify menu items in the menu
array with the same object notation for each item. You must also add a label
property to these objects, the value of which will be the text of that menu item. You can use both Content and Link modules in this array.
"menu": [
{"label": "BlockPress", "type": "link", "args": "https://blockpress.me"},
{"label": "Projects", "type": "static", "args": "projects.html"},
{"label": "News", "type": "steem", "args": {"show":"profile", "user":"blockpress", "tag":"","count":"50"}},
],