shiqi

shiqi

Study GIS, apply to world
twitter
github
bento
jike

從 Obsidian 上傳到 Xlog

  • This is a test from Obsidian uploaded to Xlog.
  • This is a test from the Xlog editing page.

It was found that files from Xlog cannot be further edited from Obsidian.
In other words, the plugin currently (April 13, 2024) can only create new files and update existing files from Obsidian, but cannot retrieve and update the results edited and published in the Xlog editor.

Therefore, it can be concluded that the Obsidian-Xlog plugin is currently only suitable for friends who edit in Obsidian. If there is a need for multi-platform editing (editing in Obsidian and then modifying in the Xlog editor), you will need to wait for future updates. Friends who like to try new things can go to the Obsidian marketplace to search for Xlog downloads. Project address: https://github.com/Otto-J/sync-to-xlog

How to achieve coexistence of local and IPFS addresses?#

Image Hosting#

It is best to use an image hosting service to store images locally and remotely. Implement image tracking and link replacement locally (i.e., the uploaded link is already an IPFS address, so no further conversion is needed). The key is to use alt text for image labeling.

  • When uploading, check if there are any updates to local images
    • If there are updates, pass the images and MD files normally
    • If there are no updates, directly replace the local IPFS address
  • When downloading, check if the IPFS link has changed
    • If it has changed, update it locally and update the image hosting service
    • If it hasn't changed, do not make any modifications

Using alt text for articles#

  • Do not rely on image hosting services, implement alt text modification in your own plugin.
    Paste the local path address on the alt text. It should be done like ![original alt text + separator + local address](local address).
  • After uploading, the image will be ![local address](IPFS address) and can be displayed.
  • During the download process, check if the local address image and the IPFS address image are the same
    • If they are the same, swap the text ![original alt text + IPFS address](local address)
    • If they are different, overwrite and store the new address ![original alt text + IPFS address](new local address)
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。