git ssb

2+

cel / scuttlebot.io



Tree: 6df421c40b28e10fe7138c1519f7c78ebb52f470

Files: 6df421c40b28e10fe7138c1519f7c78ebb52f470 / tmpl / docs / social / update-your-profile.html.js

1875 bytesRaw
1var page = require('../../page.part')
2var com = require('../../com.part')
3
4module.exports = () => page({
5 section: 'docs',
6 tab: 'docs-social',
7 path :'/docs/social/update-your-profile.html',
8 content: `
9 <p>
10 Each user has a profile, comprised of data published by the user and by other users.
11 The profile content is controlled by <code>type:about</code> messages.
12 </p>
13
14 <h2>Set a petname</h2>
15 <p>
16 Users can publish petnames for self and others.
17 </p>
18 ${ com.code({ js: jsSnippet1, bash: bashSnippet1 }) }
19
20 <h2>Set a profile pic</h2>
21 <p>
22 Users can publish pictures for self and others.
23 First, <a href="/docs/basics/publish-a-file.html">add the image file to the blobstore.</a>
24 Then, publish this message with the output hash.
25 </p>
26 ${ com.code({ js: jsSnippet2, bash: bashSnippet2 }) }
27
28 <p class="next"><a href="/docs/social/view-a-profile.html">View a profile</a></p>
29 <ul class="see-also">
30 <li><a href="/docs/basics/publish-a-file.html">Publish a file</a></li>
31 <li><a href="/advanced/message-schemas.html">Message schemas</a></li>
32 <li><a href="/advanced/linking-messages.html">Linking messages</a></li>
33 </ul>
34 `
35})
36
37var jsSnippet1 = `
38sbot.publish({
39 type: 'about',
40 about: userId,
41 name: name
42}, cb)
43`
44
45var bashSnippet1 = `
46sbot publish --type about --about {userId} --name {name}
47`
48
49var jsSnippet2 = `
50sbot.publish({
51 type: 'about',
52 about: userId,
53 image: {
54 link: hash, // required
55 width: widthInPx, // optional, but recommended
56 height: heightInPx, // optional, but recommended
57 name: fileName, // optional, but recommended
58 size: sizeInBytes, // optional, but recommended
59 type: mimeType // optional, but recommended
60 }
61}, cb)
62`
63
64var bashSnippet2 = `
65sbot publish --type contact --contact {userId} --no-following
66`

Built with git-ssb-web