---
# System prepended metadata

title: Scripting Publication in ActivityPub

---

# Distributed Press Social Inbox Presentation - Planning

###### tags: `distributed press` `dp meetings`

Slides:
https://hackmd.io/visu7pzSS5m2WjJrk6x5Ew?edit

## Goals
* Target audience: Already into DWeb
    * Don't need to go super indepth about what is P2P
    * Go over what the DP API is
    * We shouldn't overestimate knowledge and p2p knowledge
* Message
    * Not just publishing sites, but allowing them to interact on the Fediverse
    * Easy to understand way to talk about what we do
* Show communication between Sutty and Mastodon instance
    * Site, P2P URL, then how someone can follow them

## To Dos
* Create a website, show its account on Fediverse, 
    * Not able to demo comments

## Presentation Outline
* Introduction
    * Problem
    	* Publishing is centralized on a few platforms
    	* Single point of failure (outages, shutdowns, censorship, profit fueled extortion)
    * Our solution
        * Very quick overview of P2P protocols
        	* As readers scale they reshare the data with each other
        	* Once loaded available on local network
        * Distributed Press publishing for loading sites
        	* Build a static website that's a bunch of html files
        	* send it to DP and it will publish accross the protocols
        * Social Inbox
        	* Follow and reply to site posts
        	* Connect to existing communities on the fediverse
* P2P publishing demo
    * Publish site and show it's visible on other protocols
    * >> Re-use screenshots of building site, and show already built site
    * >> SHARE SCREEN and *pre-load* page in IPFS
* What's next
    * We're working to make it even more decentralized
    * Building bridges away from centralized systems
        * P2P publishing > Fediverse > EVEN FURTHER (verifiability in the content to allow it to be distributed across servers, load AP messages)
* Get involved!
    * Set up a site on Sutty, publish to DWeb and create an AP account
    * If you want a new way to get connected to your audiences, send us an email
    * People who want to publish and interested in the new social relationships this creates
    * Hire us to set this up for you
    * Contact us if you'd like to set something new up or migrate your existing site
* Conclusion
    * Working 



# Scripting Publication in ActivityPub

## Summarized version

1. Create your account
2. Create your site with a unique name
3. Go to your site settings to enable publishing to the Fediverse.
4. Create your first post... and as many as you want!
5. Click on "Publish all changes" to publish your site.
6. Your site and its posts become available as a site with its own URL and as an account in the Fediverse!
7. Invite others to follow you so that your posts reach more users in different instances. You can write to us at @sutty@todon.nl and @compost@social.coop so we can start following you and you can also add yourself [to our list of accounts available to follow via this form].
8. Start interacting! Remember that you can write article-posts in response to other posts.

# Tutorial

This demo tutorial shows you how you can enable your site for ActivityPub publishing, which means you would make your website its own account on ActivityPub, which each article viewable as an individual post from any Fediverse account.

For the posts to be viewable on their timeline, other Fediverse users from any instance, would have to follow your site's account. This user will receive notifications for each new post you make and this will be visible from the associated instance(s).

Followers will be notified of updates as soon as you publish new posts once they start following you.

Here's how to set up your site to transform it into a Fediverse account that other Fediverse users can follow.

## Step 1. Create a Sutty account.

If you already have a Sutty account, you can skip [to step 2 to create your site].

If you do not have a Sutty, you can create your account at https://panel.sutty.nl

You will need an email address, a secure password and to agree to the Sutty terms listed. You don't need to confirm your account right away: you can continue to the next step.

If you still want to confirm your account at this step, you can check your email for a message from noreply@sutty.nl with instructions.



## Step 2. Create a site in the Sutty panel.

The first screen you see will welcome you and allow you to create your first site by pressing the "Create site" button in the left column.

![](https://hedgedoc.nulo.ar/uploads/ebb0d54d-d7ea-4adb-b87e-e9f21600e602.png)

This is where you will see the list of sites you have already created, the url is 
 https://panel.sutty.nl/sites or https://panel.sutty.nl/sites/new to create a new site.

Choose the name of your site, which must be unique and will have the format "enelfediverso.sutty.nl".

You can then choose the same title or a different one such as "My Sutty site in the Fediverse".

By completing the description below, you can describe your site's purpose in a few lines or what your followers can expect. What you fill in here will be used as a description in search engines (such as Google and DuckDuckGo). For example: "Sutty account in the Fediverse to share articles automatically".

![](https://hedgedoc.nulo.ar/uploads/27dda439-9b86-4d75-9627-bb71e0dc61a7.png)


Next, you will need to choose the _Minima_ layout for your site.  We'll be adding support for other templates soon.

![](https://hedgedoc.nulo.ar/uploads/41d194bb-fda7-4bc9-9362-a2606a6f7715.png)

Finally, you'll need to choose a license for your site and all the content you publish on it. Sutty offers three possible licenses. You can also use your own custom license. Remember that when there is no license, all rights are reserved, aka it will be copyrighted. 

You will find a brief description of each one and, if you have doubts, you can click on the "read more" button, which will send you to a site with more information about each type of license.

![](https://hedgedoc.nulo.ar/uploads/dd921677-955e-4372-9983-ce8b90bbb399.png)

When you are ready, press the _Create site_ button at the bottom. 

![](https://hedgedoc.nulo.ar/uploads/52211852-127b-4b1d-9235-f0742c496fe0.png)

Congratulations! Your site is ready. You will now be redirected to your site panel, where you will have the list of available articles or posts in the center. Don't worry if you find three articles there! These are the ones that Sutty adds by default and will appear in the footer; they contain information about the site's Privacy Policy, Code of Conduct and Licensing Agreements. You can leave them as they are, edit them or even delete them.

In the left panel, you will find a pink box with purple letters indicating that your site is available, inviting you to click to get the address. 

In the next window, you will have a list of addresses. The first one is the address of your site, yay! The next ones, for now, tell you which Sutty servers it is available on. You don't need to do anything, but if you click on the first link, the one containing the address you chose for your site, you will be able to access the first version, which does not yet contain articles.

![](https://hedgedoc.nulo.ar/uploads/0fab0ffd-a224-4e0e-8464-79b00c5e540c.png)


## Step 3. Enable publishing in the Fediverse

You already have your site and you should have been able to see it. But the interesting bit is still missing: publishing to the Fediverse!

To do this, you must go to the _Configuration_ option, on the left side of your panel, inside your site with the _Minima_ design. Remember to scroll down the list until you find the option to _Publish to the Fediverse_ and then, at the bottom, to _Save changes_.

![](https://hedgedoc.nulo.ar/uploads/b0e58834-6c23-4f9b-a14d-7a4b90990158.png)

After pressing _Save_, you will be redirected to your site's panel. A pink box with purple letters will now appear at the top, reminding you to publish the changes for the new configuration to take effect. On the left side you will find, again, the button to _Publish all changes_.

![](https://hedgedoc.nulo.ar/uploads/7ef2a9bb-4ac5-4a6e-ab90-d5f564f029cc.png)

Before moving on to the next step, you may have noticed that there are other settings that might be of interest to you. One of them is publishing to the Distributed Web. You can visit [this Distributed Press link](https://docs.distributed.press/deployment/sutty) for more information.


### How do I know my Fediverse user name?

To quickly find your username, you can check:

1. On the left side, when your site is published and ready, click on the pink box with purple letters with the text "Your site is available! Click here to find all the different ways to visit it" to access a list of places where a copy of your site is available. Look for the one that says _Fediverse_ and there you will find your username.

![](https://hedgedoc.nulo.ar/uploads/45971b20-6be2-454f-9854-ec5e0565285d.png)

![](https://hedgedoc.nulo.ar/uploads/81b2682f-38a6-4fdf-86a1-9791ef784c4f.png)

2. In the footer of your site, where it will be added between the Feed and the default articles.

3. In the confirmation email of the publication.


## Step 4. Publish your first article

Once your site has been created, you will be redirected to your site's section in the panel. There you will find that in the center is the list of articles you have. So far, if you chose to keep them, you will have the license, code of conduct and privacy policies we mentioned earlier.

In order to create your first article, you can find  the list of content types that you can add in the left panel. You must press the _Add_ button for the content type _Post_. You will be redirected to the screen to create your post. 

There, you will need to choose a title, which will be displayed on the main page in a list alongside the other titles of your other articles. In addition, it is important that you complete the description of your article to tell what it is about and to attract readers. Optionally, you can add one or more authors and one or more images with a corresponding description.

![](https://hedgedoc.nulo.ar/uploads/7e1e1a73-a856-420d-bd89-8949cab92d2c.png)

To enter the content of your article, you can use our text editor. There, you will have the option to highlight text as titles, subtitles, or third level headings, highlight with bold, use italics, add links and embed audio-visual content, among others. For this tutorial, we will enter a short text.

![](https://hedgedoc.nulo.ar/uploads/2c5fa576-f15a-4cb3-96ae-bf5bb0648800.png)

Sutty allows you to choose which articles to publish in the Fediverse. That is, you can choose not to publish all of them but instead only some in particular, isn't that great? Just turn the toggler at the bottom of the text editor on or off.

In addition, you have the option to make a post in response to a post in the Fediverse. You do this by entering the URL (address you find in the navigation bar) of the post you want to reply to in the "In reply to" section.

![](https://hedgedoc.nulo.ar/uploads/bb32a0fb-17af-49d2-a39c-61871db48962.png)

There are two more options that we won't cover in this tutorial: saving a draft of the text and editing the publication date.


When you are ready, go to the bottom and press the _Save_ button. You will be automatically redirected to the article view and its _metadata_ (i.e. the data of your data). If you are not satisfied, you can press the _Edit_ button and you will return to the screen to modify your article. Otherwise, you can return to the main panel of your site via the breadcrumbs at the top of the screen. Be sure to tap on the name of your site to return to that step.

![](https://hedgedoc.nulo.ar/uploads/b4d20900-f9a7-412f-a106-795efefa8f09.png)

![Edit screen](https://hedgedoc.nulo.ar/uploads/969d973f-6252-4ddc-a41b-e7dc38461b92.png)

Once in your panel, for the changes to take effect, you must _publish all changes_ by clicking the button. In effect, you will see a pink box with purple letters with the text "There are unpublished changes. Click the button below and wait a moment to find them on your site".

(Mai: Repeat / emphasize above for good measure?)

![](https://hedgedoc.nulo.ar/uploads/23005693-bae5-4007-8761-5d7007cd0886.png)

![](https://hedgedoc.nulo.ar/uploads/01f966fd-8fb3-4408-8f7c-045bd3be9a4d.png)


After pressing the _Publish all changes_ button, the caption will change to "Your site is building,
refresh this page in 2 minutes". Another way to know if the process is finished is to wait for the confirmation email indicating that all your changes took effect. You can then refresh the page from the browser or by pressing F5 on your keyboard.

![](https://hedgedoc.nulo.ar/uploads/550de707-059d-4bbb-b70a-22c9d38e4b23.png)

Each time you publish one or more articles, you will need to publish all the changes from the button in the left column. The site is built all at once over a period of a few minutes, so we recommend that you wait until you have finished making changes before publishing. Once the site has been built, you will receive a confirmation email. 

Once the changes are published, you will be able to access your site from there and see how it looks!

## Step 5. View your posts in the Fediverse

Once you've created your site, you should see that in the footer of your site -- it will be another address that looks something like @minima@minima.sutty.nl. This is the address of your Fediverse account! Yippee! If you look up this address from your Fediverse account, you should see your site profile there just like any other Fediverse account. As you follow the account and as you make posts, they will appear as separate posts on your "timeline".

## Step 6. Invite a following

For those who want to access your Fediverse account, they will need to enter your Fediverse account or the full name of the site (the URL) (e.g. @minima@minima.sutty.nl or https://minima.sutty.nl) into their instance's search engine and start following you.

This means that they must have their own Fediverse account. Remember that the more accounts that follow you, the more your posts will be circulated, as they are displayed in the federated timeline of each instance. That is to say, each account belongs to an instance, each instance shows its own posts and those of the instances that are followed by its users.  In this case, your site is both instance and account.

To get started, you can mention @sutty@todon.nl and @compost@social.coop so that we start following you!

Optionally, you can add the name of your Fediverse user or site to our list of accounts available to follow [from this form]. 

## I'm interacting from the Fediverse!

When you start receiving replies to your posts, remember that you can reply to them in turn by creating a new article on your site and copying the URL into the "In reply to" field under the "Post to the Fediverse" button.

Likewise, if you want to reply to a post and start interacting with a new account, you can use the same option.

We'll be building out features in the months to come -- including allowing you site's Fedi account to follow others. 

---




![](https://hedgedoc.nulo.ar/uploads/9533f3df-b63e-4327-bc72-e507f937648b.png)

![](https://hedgedoc.nulo.ar/uploads/025f1ecd-bc6d-4896-8909-ae9d76080242.png)

![](https://hedgedoc.nulo.ar/uploads/42c98087-9322-4852-bcc8-23c32cb675b8.png)