Delegate at least 2 SP to @self-driving account as a service registration step, so autopilot knows you want to enable the service. The delegation tool such as https://steemyy.com/sp-delegate-form/ can be used for the delegation. We need this delegation step because we don’t have a decent UI for this service yet. We’ll cancel the needs for delegation after this service gets mature, and you can undelegate the SP then.
Future Plan
Improve the Autopilot UI and user experience
support more “autopilot” features for the users in the future, such as a smarter vote bot for SCOT communities and applications, alert for token price trends / patterns, etc.
For any questions, please feel free to share your ideas and comments here.
This post will introduce the development of a Hexo plugin hexo-stop-tag-plugins, which helps hexo users to disable built-in tag plugins / nunjucks syntax, and write with pure markdown syntax.
To be more precise, this post’s contribution include:
For example, the {%s} string in the below code block from the post https://steemd.com/@oflyhigh/mfc-access , will break the conversion from post’s source into html, with no html result returned.
This issue happens because hexo enables tag plugins by default, which relies on the nunjucks syntax, and there’s no settings to disable that by hexo users.
To make steemblog function well, we need to fix this issue.
(2) A common painful issue in hexo community
What’s more, this is a quite common issue complaint by a lot of hexo users. You can checkout relevant links and examples from my PR and issues, and examples are:
In order to overcome this pain for the hexo users who want to get more control over the tag plugins syntax, we implemented this hexo plugin hexo-stop-tag-plugins for those who suffered from the common issue.
How to Use
To use this plugin, you can check out the description in the NPM package: hexo-stop-tag-plugins
It’s as easy as install it with NPM.
1
$ npm install hexo-stop-tag-plugins --save
That’s it. Then your post will be rendered by hexo as pure markdown, and you can use packages like marked as the renderer.
Technology Stack
JavaScript (ES6) / NodeJS
Implementation
Below we’ll introduce how the plugin is implemented.
(1) set disableNunjucks at renderer level
The implementation of the plugin is not complex if you’re familiar with hexo’s source code. In project https://github.com/think-in-universe/hexo-stop-tag-plugins, we implemented the overrider.js to set the disableNunjucks property of renderer to true. Then hexo post renderer should skip the renderering with nunjucks.
We come up with this idea by reading thorough the renderer process of hexo, and look at relevant issues and pull requests in hexo repostiory.
/* The module is created to disable the tag plugins (https://hexo.io/docs/tag-plugins) and nunjucks syntax, which causes troubles in parsing markdown often */
We also added sufficient test cases to test this plugin, which you can checkout in test folder.
However, what makes us frustration is that the code blocks in markdown are not renderered correctly after we set the disableNunjucks property, and only placeholder of the code block are displayed.
This should be an issue of hexo, and that leads us to fix the defect in hexo with PR #3573
(2) fix the problem with the disableNunjucks property in hexo project
// Render with markdown or other renderer return ctx.render.render({ text: data.content, path: source, engine: data.engine, toString: true, onRenderEnd(content) { // Replace cache data with real contents data.content = cacheObj.loadContent(content);
// Return content after replace the placeholders if (disableNunjucks) return data.content;
// Render with Nunjucks return tag.render(data.content, data); } }, options);
The PR #2593 that introduced the disableNunjucks property didn’t add tests. So, to assure the quality, added unit tests for the disableNunjucks property:
It takes a few days to have the plugin be reviewed and merged.
Retrospective
The hexo repository reviewers are not that active, and may need close follow-up from contributor to make PR to be reviewed and merged.
May need more thoughts and actions on how to push this plugin to the users who met the same issues.
Roadmap
The disableNunjucks property is set at renderer level and applied to all the posts. User may need another setting to make it only applied to some of the posts, which is more flexible.
hexo-stop-tag-plugins is quite useful if we want to bring more hexo blog writers onto Steem. It makes it easier for bi-directional integration between hexo and steem: hexo users can use the plugins to write posts that can be published onto Steem; Steem users can use the plugins to render and organize their steem posts with hexo.
As a successor of this plugin, we may create another plugin that could make it easier for hexo users to share their posts onto Steem. And as a result, may introduce more developers and writers to Steem community.
My long-term vision is to make better integration between Steem and GitHub features (such as GitHub pages), to make developers enjoy their work and life in blockchain era.
picture made by me which combines GitHub and Steem logos
To reviewers: this post is set to “development” category because it contains a new project (a hexo plugin), and defect fixing to “hexo” project contributed by myself. If you have any concern, feel free to reach out to me directly.