Mastodon Deployment Weblet
- Clone the project
git clone https://github.com/threefoldtech/www-mastodon.git
# Change directory inside project
cd ./www-mastodon
- Install project dependencies
yarn install
- Build project
yarn build
-
Copy all files in ./dist folder into your project (for e.g in ./weblet)
-
Import scripts in your project
<script src="./weblet/config.js"></script>
<script defer src="./weblet/mastodon.js"></script>
- Use weblet within your templates
<!DOCTYPE html>
<html>
<head>
<!-- Code... -->
<script src="./weblet/config.js"></script>
<script defer src="./weblet/mastodon.js"></script>
</head>
<body>
<tf-mastodon provider="your-provider-id"></tf-mastodon>
<tf-mastodon-list></tf-mastodon-list>
<body>
</html>
If you didn't add a Provider ID. User will be asked to enter a valid id or stick to our default id(1).
If you add a Provider ID. you will get Credentials as first page.
<tf-mastodon provider="your-provider-id"></tf-mastodon>