var page = require('../../page.part') var com = require('../../com.part') module.exports = () => page({ title: 'Publish a message', section: 'docs', tab: 'docs-basics', path :'/docs/basics/publish-a-message.html', content: `
Every user has an append-only log of JSON messages, called their feed.
Use this command to publish your first message:
${ com.code({ js: jsSnippet, bash: bashSnippet }) } ` }) var jsSnippet = ` sbot.publish({ type: 'post', text: 'Hello, world!' }, function (err, msg) { // 'msg' includes the hash-id and headers }) ` var bashSnippet = ` sbot publish --type post --text "Hello, world!" `