steemit / devportal

Steem Platform Developer Documentation.
https://developers.steem.io
MIT License
120 stars 74 forks source link

Blockchain includes #412

Closed inertia186 closed 4 years ago

inertia186 commented 5 years ago

As a devportal maintainer, I would like the ability to include specific content that has been published on the Steem Blockchain, so that this content can be hosted and searchable on the developer portal.

This pull request includes:

Together, this change allows content on the blockchain to import on pages that use this new liquid tag:

{{'@stoodkev/how-to-set-up-and-use-multisignature-accounts-on-steem-blockchain' | steem_post}}

... which generates (area in red):

image

The obvious advantage to this process is that previously published content can be included easily on the devportal. The content is generated each time jekyll build executes. If the post is modified, jekyll build must be executed again to pick up the changes.

inertia186 commented 5 years ago

I changed post_generator.rb to deal with markdown-in-html better. Kramdown (the ruby library used by jekyll) doesn't know how to deal with this in the same way that condenser can:

<center>
  ![](url-to-image.png)
</center>

So I have the generator find a regex match for html tags and pre-render them as html so that jekyll can show them as expected.

I also switch the article to the one picked by the bounty.

roadscape commented 4 years ago

@inertia186 still relevant?

inertia186 commented 4 years ago

Yes, it's relevant and I think it'd be a great feature moving forward.

roadscape commented 4 years ago

Neat!