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, chose xLog blockchain blog platform
2. Planning#
- Use Obsidian as the blog editor
- Use Github as a free image hosting service
- Use Obsidian's sync-to-xlog community plugin as the blog publisher
- Use Obsidian's Emo community plugin as the image hosting service
3. Implementation#
(1) Register xLog account#
- Register and verify using an email address
- Notes
- Publishing or commenting on blogs on the blockchain requires payment
- So you also need an electronic wallet like MetaMask
- You can't 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 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
- Example of installing the plugin for Google Chrome browser
- Download metamask-chrome-11.16.15.zip and extract it to a folder with the same name
- Open the Google Chrome extension management 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 study how to use the Tor browser by yourself
- Try logging in to MetaMask by selecting Crossbell or other network methods
- Create a password for the MetaMask wallet that is no less than 8 characters
- 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 token for xLog#
- Open your own xLog page and click Connect
- Click to select MetaMask to enter the background
- Click Settings at the bottom left
- Click 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 Console
- Enter the code
JSON.parse(localStorage.getItem("connect-kit:account")).state.wallet.siwe.token;
after the prompt and press Enter to confirm - If prompted with an alert message, you can enter the corresponding characters to dismiss the alert and then re-enter the above code
- The long string of code returned below is the token
(4) Configure the sync-to-xlog plugin#
- Search for the plugin from the community plugins in Obsidian settings or download and install the plugin from sync-to-xlog
- Paste the long token string mentioned 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 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 never-expiring Repo management token
- Search for the plugin from the community plugins in Obsidian settings or download and install the plugin from Emo
- 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 field will be automatically generated
- 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 note will also automatically embed the image link
- The image will be displayed automatically when previewing the note