evisx / obsidian-content-publisher

An obsidian plugin to quick expose markdown file as content of blog
0 stars 0 forks source link

slug translate chinese to english #1

Open zcyc opened 6 months ago

evisx commented 6 months ago

Seems you want to bring more content to your notes, however, content-publisher is focus on content conversion. But I believe you can achieve it by using other ob plugin like SilentVoid13/Templater: A template plugin for obsidian and Fevol/obsidian-translate: Translate text and entire notes in Obsidian.

Here is my example:

  1. auto translate title to English by templater and translate.

    title-en: <% await window.app.plugins.plugins.translate.api.translate(tp.file.title) %>
  2. use title-en in content-publisher, such as generating pubSlug

    {{simplify(relative(file.parent)  + '-' + frontmatter['title-en'])}}
    image
  3. finally set as slug

    image