testxlog

testxlog

You can play blockchain blogs even if you are completely unfamiliar with computers.

photo by Firmbee.com on Unsplash

1. Origin#

  • Daobao is very interested in humanities and history knowledge
  • Want to encourage Daobao to try humanities and history creation
  • After considering multiple factors, decided to use the xLog blockchain blog platform

2. Planning#

  • Use Obsidian as the blog editor
  • Use Github as a free image hosting service
  • Use the sync-to-xlog community plugin for Obsidian as the blog publishing tool
  • Use the Emo community plugin for Obsidian as the image hosting tool

3. Implementation#

(1) Register an xLog account#

  • Register and verify using an email address
  • Notes
    • Publishing or commenting on blog posts on the blockchain requires payment
    • So you also need an electronic wallet like MetaMask
    • You cannot customize your avatar when you first register
    • Because it requires 0.057 CSB
    • Usually, the initial relief fund is only 0.02 CSB

(2) Install the MetaMask electronic wallet plugin for the browser#

  • For Edge browser, you can directly search and install MetaMask from the Edge Add-ons Store
  • For Tor browser, you can search and install it from the built-in plugin store
  • For other browsers, you can download the corresponding plugin package from the metamask-extension project on Github and install it
    • Example of installing the plugin for Google Chrome
    • Download metamask-chrome-11.16.15.zip and extract it to a folder with the same name
    • Open the extension management of Google Chrome and load the previously extracted plugin extension program folder to install it
  • Note that the following operations are recommended to be completed in the Tor browser
    • You need to research how to use the Tor browser by yourself
    • Choose Crossbell or other network methods to try logging into MetaMask
    • Create a password for the MetaMask wallet that is at least 8 characters long
    • At the same time, 12 mnemonic words will be created to protect the wallet, so be sure to save them
    • Record the generated account information, such as 0x...
    • You can also save the private key, such as 18d...
    • Apply for a relief fund of 0.02 CSB through the faucet for backup

(3) Generate a token for xLog#

  • Open your xLog page and click on the connection
  • Click on the MetaMask option to enter the backend
  • Click on the settings at the bottom left
  • Click on xSettings on the right
  • Make sure to check Operator Sign and Sync Operator and make a payment
  • Open the developer mode by pressing F12 after ensuring that the xSettings option is open in advance
  • Click on the console
  • Enter the code JSON.parse(localStorage.getItem("connect-kit:account")).state.wallet.siwe.token; after the prompt and press Enter to confirm
  • If there is a warning message, you can enter the corresponding characters to remove the warning as prompted and then re-enter the above code
  • The long code returned below is the token

(4) Configure the sync-to-xlog plugin#

  • Search for the sync-to-xlog plugin from the community plugins in Obsidian settings or download and install the plugin from sync-to-xlog
    • Paste the long token from above into the XLOG SIWE Token in the sync-to-xlog plugin settings
    • The CharactorID will be automatically generated as a string of numbers
    • Uploading whether to modify the image to IPFS can be left unselected
    • Click on Connect to test if it works properly and save the configuration

(5) Configure the Emo plugin#

  • Register a Github account
    • Register a Github account and receive the verification code through email
    • Take note of the Github username and password you entered
    • Create a new Repo with the folder name "image", set it as public, and use it as the image hosting repository
    • Generate a Repo management token that never expires
  • Search for the Emo plugin from the community plugins in Obsidian settings or download and install the plugin from Emo and configure it
    • Choose Github as the target hosting
    • Enter the Github username in the owner field, note that it is not the email address
    • Enter the folder name "image" in the repo field
    • Enter "main" in the branch field, which should be determined based on the branch name generated by Github, it could also be "master"
    • Enter the Repo management token generated above in the token field
    • The message will be generated automatically
    • You can enter 2024/ in the path field to facilitate image management by year
    • The random filename option can be left unselected, but make sure there are no duplicate image names
    • Keep the CDN as raw by default
  • Using the image hosting service
    • When pasting or dragging an image into an Obsidian note
    • The image will be automatically uploaded to Github instead of being stored in the library
    • The location is in the image/main/2024 directory
    • The image link will also be automatically embedded in the note
    • The image will be displayed automatically when previewing the note
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.