Random Cat BlockPress module creation tutorial...

in #utopian-io6 years ago

BlockPress-CatModule.png

https://github.com/blockpress/blockpress.me

Part of the power of BlockPress lies in its extensibility. Writing a module is fairly straight forward, only a few simple rules need to be followed. In order to reveal this simplicity ready for our beta launch, I have written a couple of tutorials aimed at developers who might wish to extend BlockPress with their own specialised content modules.

Link module

Link modules are very simple modules that allow menu items to external sites to be added. BlockPress comes with a very simple form of link module that allows any url to be added. A developer may wish to add specialised link modules that make it easy to create more specific types of link. To demonstrate how to do this, I created a tutorial for a link module that only links to wikipedia pages. You pass the wikipedia page name as the parameter instead of the whole url, and the module creates the rest of the url for you.

Built in link module

I also documentated how to use the built in link module.

Content module

The most useful kind of module in BlockPress is one that allows you to load content inside BlockPress. BlockPress comes with two of these by default, static allows files containing html to be loaded, and steem loads content from the steem blockchain via the API to display user profiles, post listings, posts and comments.

A developer may wish to add their own, so in order to demonstrate how to do so I wrote a tutorial explaining how to create a module that loads a random cat image inside blockpress, by interfacing with the random cat api.

Each time you load the random cat page, you get a different cat image.

BlockPress-Cats.png

I tested the tutorial module locally, so I know it works!

See my personal BlockPress site for a demo of the random cat module in action.

Built in content modules

I also added intructions on using the built in content modules, static and steem.

Developer reference

@dana-varahi recently added a page on generic style classes that apply throughout BlockPress. I merged this with an older page on ids, css classes and placeholders in templates, to create a more universal Developer reference, with everything in one place.

My latest documentation contributions

New pages

Updates

Note: I also updated the links on a lot of reference pages to the new developer reference page, but I'm not going to list them all. The above are the significant changes I made.

Sort:  

Reminder for those that want to know more about the BlockPress project...

Follow us

First of all, make sure you follow the @blockpress steem account. We are very near to our beta launch and we plan to run some contests with SBD prizes.

You can also follow the BlockPress.me CMS on various social media, which are good places to ask questions and get support.

This contribution is staff picked by me as I see a fairly good amount of work done in the contribution. But I will encourage you to increase the quality of the documentation by organizing it more properly in the wiki or an external webpage.

Thanks!

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

All the documentation is organised in the wiki? What 'proper organisation' do you think is lacking? Is there particular utopian guidelines on how wiki documentation should be organised?

Asking so I can improve documentation, once I understand what you mean. :)

Hey @antonchanning
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.23
TRX 0.12
JST 0.029
BTC 66647.09
ETH 3474.84
USDT 1.00
SBD 3.20