git ssb

2+

cel / scuttlebot.io



Tree: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493

Files: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493 / tmpl / docs / basics / publish-a-message.html.js

790 bytesRaw
1var page = require('../../page.part')
2var com = require('../../com.part')
3
4module.exports = () => page({
5 section: 'docs',
6 tab: 'docs-basics',
7 path :'/docs/basics/publish-a-message.html',
8 content: `
9 <h2>Publish a message</h2>
10 ${ com.code({ js: jsSnippet, bash: bashSnippet }) }
11 <p class="next"><a href="/docs/basics/read-the-log.html">Read the log</a></p>
12 <ul class="see-also">
13 <li><a href="/advanced/message-schemas.html">Message schemas</a></li>
14 <li><a href="/advanced/linking-messages.html">Linking messages</a></li>
15 </ul>
16 `
17})
18
19var jsSnippet = `
20sbot.publish({
21 type: 'post',
22 text: 'Hello, world!'
23}, function (err, msg) {
24 // 'msg' includes the hash-id and headers
25})
26`
27
28var bashSnippet = `
29sbot publish --type post --text "Hello, world!"
30`

Built with git-ssb-web