Giter Club home page Giter Club logo

obsidian-github-publisher's Introduction

order
1

Obsidian Downloads

✉️ Enveloppe : An Obsidian GitHub Vault Publisher

Publish your notes in your own GitHub repository for free and do whatever you want with them. ✨

This allows you to set up any template: Jekyll, Mkdocs, Hugo, or custom-made ones!

Here, you will only get a quick setup!

🪄 Features

  • Converting [[wikilinks]] to markdown links
  • Linking to other notes and updating the links according to your settings
  • Cleaning the repo by removing depublished and deleted files
  • Folder notes (renaming them to a specific name, like index.md)
  • All dataview queries are supported (including dataviewjs, inline DQL and inline dataviewJS.)
  • Supporting any markdown syntax supported by your template, as well as other formats like Mermaid or Latex
  • And many more ✨

Warning

Do not use this plugin to sync or save your Obsidian Vault! Avoid opening the converted files from your repository in Obsidian!


🖥️ Initial setup

There are plenty of options available, some of which are pre-configured and others are optional.

Before you begin, you will need to configure your GitHub repository.

  1. Fill in your username, repository name, and branch.
  2. Generate a GitHub token from the settings link and paste it here.
  3. Click the button to check if everything is working as intended.
  4. Now, let's try publishing your first note! To achieve this, you need to set the key share: true in the frontmatter of a file, like this:
    ---
    share: true
    ---
    
  5. Now, run the command to publish: Upload single current active note
  6. If everything is good, a PR will be created on your repository and will be automatically merged (this can be disabled if desired!).

That's it! However, there are many options that a simple README cannot cover, so please refer to the documentation for more information. 💕.

⚙️ Usage

The plugin adds 8 commands in the palette, one of which is also available in the right-click menu.

  • Upload single current active note (available in the right-click menu)
  • Upload all notes
  • Upload unpublished notes
  • Refresh published and upload new notes
  • Refresh all published notes
  • Purge depublished and deleted files
  • Test the connection to the configured repository
  • Check the rate limit of the GitHub API

Each of the commands are explained here.

🤖 How it works

  1. The plugin will create a branch named after your vault, where spaces are replaced by a -.
  2. The plugin will perform all conversion (based on your settings) and push the note(s) into the branch.
  3. By default, the branch will be merged once all the notes (and their embedded files) have been processed.

Warning

Sometimes, the branch may not be merged due to merge conflicts. This can occur if you push too frequently.

🪛 Developing

You can :

🪧 Looking for something?

Settings explanationCommands referencesGitHub Discussion


If you find this plugin and workflow useful, you can give me some coffee money!
Buy Me a Coffee at ko-fi.com

obsidian-github-publisher's People

Contributors

ajar avatar github-actions[bot] avatar kurko avatar mara-li avatar ooker777 avatar runarsf avatar suheugene avatar zyuhel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

obsidian-github-publisher's Issues

[FR]: Allow exporting profil

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

  • It will be good to share directly the configuration for template
  • For debugging, it forces to go in .obsidian/plugins/obsidian-mkdocs-publisher to get the data.json, with editing it and sharing. Not pretty good.
    → Will help in debugging!

What solution do you want to see ?

  • A button to export the settings in the json format, with removing the repo + github token.
  • A button to import the settings file

The button will be in the Github configuration
It will open the file explorer to set the emplacement of the generated file

Describe the alternative you've considered

/

OS

IOS, Windows

Anything else?

No response

[Bug]: Markown links are not converted

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

It seems that markdown links are not converted for internals links (as they should)
Wikilinks works fine

How to reproduce ?

No response

Configuration

/

Relevant log output

/

OS

Windows

Anything else?

See #67

[Bug]: icannot git up

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

image

plugin cannot git push to my repo

image

i alread init my docsify by my PC

image

i don‘t know how to use the plugin

How to reproduce ?

No response

Configuration

i can't find reason to the question T_T

Relevant log output

No response

OS

No response

Anything else?

No response

[FR]: Copy inline tags to frontmatter

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

With some publishing websites like Quartz and anything that uses Hugo, it's only possible to use tags if they are in frontmatter and inline tags doesn't work.

What solution do you want to see ?

I think Publisher Plugin should have an option to add inline tags to frontmatter while processing file content.

Describe the alternative you've considered

No response

OS

Linux

Anything else?

This can be done by:

  • Getting inline tags app.metadataCache.getFileCache(app.workspace.getActiveFile())?.tags?.map(t => t.tag.replace('#', '').replace('/', '_')).
  • Appending tags to frontmatter tags key if it exists, or creating a new one with inline tags if it doesn't.

Instead of writing a code that does this from scratch I think metaedit API can be utilized, this way by using update, createYamlProperty, getPropertiesInFile and getPropertyValue.

P.S. dataview can also get file tags, but it doesn't separate frontmatter and inline tags as far as I know.
app.plugins.plugins.dataview.api.page(app.workspace.getActiveFile().path).file.tags

[FR]: Add the ability to do custom Regex text transformation

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

I am using the plugin to push notes to my digital garden repo, which uses Quartz. However, Quartz doesn't like date formats in frontmatter like 2022-06-20 18:34, and I have to regex it to remove the time part, then post date will be shown correctly.

What solution do you want to see ?

I would like the plugin to have an option for doing regex replace operations on text before copying note file. For example it can be a simple input field like other plugin settings, that user can set Regex replacements that will be performed on the file.

Describe the alternative you've considered

Writing my own shell script that will run in CI modifying files.

OS

Linux

Anything else?

No response

[FR]: custom "Key::Value" as trigger to publish

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

I have project related files that are marked with inline "Project:: ProjektName" all over my vault. It would be awesome to have this key-value as custom trigger to be pushed to the git.

thinking ahead a separation by "ProjectName" per Project-Git would be even better

What solution do you want to see ?

  • option to define custom triggers by "key::Value" (not only key)

(option to add multiple git repositories with related key::value)

Describe the alternative you've considered

No response

OS

MacOS

Anything else?

No response

[FR]: Copy tags improvement: Add the ability to copy dataview simple values to tags

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

No response

What solution do you want to see ?

Some people heavily depends on dataview annotations for categorizing topics instead of tags. I think a super useful addition would be having the ability to copy pre-defined dataview inline fields link text value(s).

For example, if I have the page with the following:

---  
created: 2021-12-28 00:00  
updated: 2021-12-28 00:00  
title: youtube-dl download subtitle only  
share: true  
website: en/notes  
---  
  
# youtube-dl download subtitle only  
  
Status:: #notes/archives  
Link: <https://superuser.com/a/927532>  
Knowledge:: [Linux](Linux), [Tools](Tools),

By setting Knowledge as the field to be copied, the processed note should have:

tags:
  - Linux
  - Tools

Describe the alternative you've considered

No response

OS

Linux

Anything else?

  • The option should be able to handle having single or multiple dataview link objects, because as far as I know it can be Link or Array.

[Bug]: Image links are broken because of appended .md

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Images are broken when published because the image URL has .md appended to the end.

Example:
After publishing to GitHub from Obsidian, a note has the following reference too an image file:
![Paper.Journal.1.jpeg](../images/obsidian/Paper.Journal.1.jpeg.md)

This results in a broken image icon instead of the actual image.
Changing it to:
![Paper.Journal.1.jpeg](../images/obsidian/Paper.Journal.1.jpeg)

fixes the issue and the image shows as expected.

How to reproduce ?

No response

Configuration

{
"githubRepo": "blog",
"githubName": "me",
"GhToken": "token",
"githubBranch": "main",
"shareKey": "share",
"shareKey": "share",
"ExcludedFolder": "",
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "fixed",
"folderDefaultName": "obsidian",
"yamlFolderKey": "category",
"rootFolder": "docs",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "images/obsidian",
"autoCleanUp": true,
"autoCleanUpExcluded": "docs/assets/js, docs/assets/meta, docs/assets/css, tags.md",
"folderNote": true,
"convertWikiLinks": true,
"convertForGithub": true,
"subFolder": "",
"embedNotes": false,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": true,
"convertDataview": false,
"useFrontmatterTitle": false,
"censorText": [
{
"entry": "(?<!\\)\\\\[(.*?)\\\\]\\\\((?!(http|\\\\/*image|obsidian\\\\/image))(\\\\.\\\\/)*(.+?)(\\\\.md)*\\\\) ", "replace": "[$1]({% link obsidian/$4.md %})", "after": false }, { "entry": "(?<!\\\\)\\[(.*?)\\]\\(((obsidian\\/)?image)(.+)\\)",
"replace": "$1",
"after": false
}
],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": false
}

Relevant log output

No response

OS

No response

Anything else?

No response

[Bug]: addInlineTags removes part of note content while updating the frontmatter

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

If the note content has --- in any place after the frontmatter, the update inline tags option removes that part by mistake.

How to reproduce ?

No response

Configuration

``

Relevant log output

No response

OS

Linux

Anything else?

Before updating the file:

---  
created: 2021-12-28 00:00  
updated: 2021-12-28 00:00  
title: youtube-dl download subtitle only  
share: true  
website: en/notes  
---  
  
# youtube-dl download subtitle only  
  
الحالة:: #ملاحظة_مؤرشفة  
الرابط: <https://superuser.com/a/927532>  
المعرفة:: [Linux](Linux)  
  
---  
  
\`\`\`bash  
  
youtube-dl --sub-lang LANG --skip-download  
youtube-dl --all-subs --skip-download  
youtube-dl --sub-lang LANG --write-auto-sub --skip-download URI  
youtube-dl --sub-lang LANG --write-auto-sub --sub-format srt --skip-download URL  
\`\`\`  

After updating the file:

---  
created: 2021-12-28 00:00  
updated: 2021-12-28 00:00  
title: youtube-dl download subtitle only  
share: true  
website: en/notes  
tags:  
  - ملاحظة_مؤرشفة  
---  
  
  
# youtube-dl download subtitle only  
  
الحالة:: #ملاحظة_مؤرشفة  
الرابط: <https://superuser.com/a/927532>  
المعرفة:: [Linux](Linux)  
  

More examples: https://github.com/yshalsager/digital-garden/pull/21/files

[Bug]: Plugin sharing files on its own without my input

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

I was working on merging a few notes into one main note by opening the other notes in a new window, then copying and pasting from the new window to the main window. Every time I pasted something with that extra window open, the plugin uploaded the note.

I also needed to insert some templates with ctrl+T into my main note while doing this, and every time I did that, the plugin uploaded the note. This only happened with the new window open. I have no hotkeys set for this plugin to cause conflicts.

It also uploaded the note a few times just by typing a header into the main Obsidian window, but that happened with less than half of the headers I typed in, and again, only with the new window open.

I'm using version 4.5.1 of the plugin, and version 1.0.3 of Obsidian.

How to reproduce ?

  1. Open a note in a new window
  2. Copy and paste text from the new window into another note in the main Obsidian window
  3. Try inserting a template into a note in the main Obsidian window
  4. See what happens

Configuration

There is no configuration setting to allow this to happen, and I have no hotkeys set. My configuration is default.

Relevant log output

No response

OS

Linux (EndeavourOS)

Anything else?

No response

[Bug]: Refresh published and upload new notes -> "Repo empty"-Error

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Uploading a single file works, uploading with another command "Refresh published and upload new notes" leads to an error
Screenshot 2023-01-23 at 17 12 43

after a force reload and trying again it uploaded one new file and deleted!!!! three that were already uploaded (they still have share:true)

this is not working reliable - and deleting files is fatal!!

How to reproduce ?

No response

Configuration

Relevant log output

No response

OS

No response

Anything else?

No response

[FR]: Support local folder

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

See #17

What solution do you want to see ?

Local folder must includes every thing but instead of send to github, keep it local on Obsidian.

Note :

  • Destructive behavior, maybe strange usage in Obsidian
  • Some part are specific to github (deleting and checking file in Repo)
  • More file reading (frontmatter cache, again)

Describe the alternative you've considered

Use github.

OS

IOS, Android, MacOS, Windows, Linux

Anything else?

No response

[Bug]: Files no longer have the .md extension

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Files sent by Github publisher do not keep the .md extension once they arrive on Github.

example : https://github.com/Valkann/Obsidian/tree/main/docs/week

image

How to reproduce ?

Go to : https://github.com/Valkann/Obsidian/tree/main/docs/week

Configuration

{
"githubRepo": "Obsidian",
"githubName": "Valkann",
"GhToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"githubBranch": "main",
"shareKey": "share",
"excludedFolder": [],
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "yaml",
"folderDefaultName": "docs/notes",
"yamlFolderKey": "category",
"rootFolder": "docs",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "",
"autoCleanUp": true,
"autoCleanUpExcluded": [],
"folderNote": false,
"folderNoteRename": "index.md",
"convertWikiLinks": true,
"convertForGithub": true,
"subFolder": "",
"embedNotes": true,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": false,
"convertDataview": true,
"useFrontmatterTitle": false,
"censorText": [],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": true,
"automaticallyMergePR": true,
"metadataExtractorPath": "",
"convertInternalNonShared": false,
"frontmatterTitleRegex": "",
"frontmatterTitleReplacement": "",
"ExcludedFolder": []
}

Relevant log output

No response

OS

Windows

Anything else?

No response

[Bug]: Tool tips image error

Issue validation

Workflow

Mkdocs Template 🐍

Describe the bug

If site_URL is a subdirectory, tippy fail to load image

How to reproduce ?

No response

Configuration

/

Relevant log output

\

OS

IOS, Android, MacOS, Windows, Linux

Anything else?

No response

[Bug]: Plugin crash using obsidian path & empty default

What part of the workflow is concerned ?

Obsidian plugin

Describe the bug

I have looked into this a little further, it looks like there may also be underlying issues with the Obsidian Path option. If you leave "default folder" blank for that setting it fails to sync entirely...

On #9

How to reproduce ?

  1. Config Obsidian Path
  2. Use empty folder
  3. See error in console

Configuration

  1. Config Obsidian Path
  2. Use empty folder

Relevant log output

upload.ts:138 HttpError: path cannot start with a slash: {"resource":"Commit","field":"path","code":"invalid"}

OS

Windows

Anything else?

No response

[BUG] Cannot read properties of undefined (reading 'filter')

I've just tried setting this plugin up on a new Obsidian repository, but I can't see any of the commands in the Commands Palette. I've used all the same settings that worked previously.

When I open up developer tools, it's showing this error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'filter')
    at eval (plugin:obsidian-mkdocs-publisher:2095:65)
    at Generator.next (<anonymous>)
    at eval (plugin:obsidian-mkdocs-publisher:60:61)
    at new Promise (<anonymous>)
    at __async (plugin:obsidian-mkdocs-publisher:44:10)
    at convertOldSettings (plugin:obsidian-mkdocs-publisher:2088:10)
    at GithubPublisher.eval (plugin:obsidian-mkdocs-publisher:4451:13)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-mkdocs-publisher:47:24)

Is there something I should be changing in the settings to avoid this?

Originally posted by @heyteresagreen in #57

[Bug]: TypeError: Cannot read properties of undefined (reading 'commit')

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Hi,

I did set up Obsidian Github Publisher Plugin. After entering the configuration data and starting "Share ... with Github Publisher" for a page with "share: true" in frontmatter, I get the following error via popup:
"TypeError: Cannot read properties of undefined (reading 'commit')"

Developer Console: "Uncaught (in promise) TypeError: s is not a function
at eval (plugin:obsidian-mkdocs-publisher:59:4942)
at Generator.throw ()
at s (plugin:obsidian-mkdocs-publisher:6:1261)"

I switched to beta via BRAT, but do get the same error. Any idea what I am doing wrong?

Thanks and best regards
Matthias

How to reproduce ?

No response

Configuration

{
"githubRepo": "aeternus",
"githubName": "mhofherr",
"GhToken": "ghp_5RAV3yxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"githubBranch": "main",
"shareKey": "share",
"excludedFolder": [],
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "obsidian",
"folderDefaultName": "docs",
"yamlFolderKey": "",
"rootFolder": "",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "docs/images",
"autoCleanUp": false,
"autoCleanUpExcluded": [],
"folderNote": true,
"convertWikiLinks": true,
"convertForGithub": true,
"subFolder": "",
"embedNotes": false,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": true,
"convertDataview": true,
"useFrontmatterTitle": false,
"censorText": [],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": false,
"automaticallyMergePR": true,
"metadataExtractorPath": "",
"convertInternalNonShared": false,
"ExcludedFolder": []
}

Relevant log output

Uncaught (in promise) TypeError: s is not a function
    at eval (plugin:obsidian-mkdocs-publisher:59:4942)
    at Generator.throw (<anonymous>)
    at s (plugin:obsidian-mkdocs-publisher:6:1261)

OS

MacOS

Anything else?

No response

[FR]: Add ability to specify frontmatter fields that reference files

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

No.

What solution do you want to see ?

I use a plugin simply called "Banners" (Link). It allows me to specify an image using a frontmatter field (i.e., banner) which displays above my note. It would be nice if I could also use this field to identify the featured image of a particular note.

My idea is to allow users to specify frontmatter fields that are used to reference images/files that, if present, would trigger your plugin to send that file along with the Merge Request as well.

Describe the alternative you've considered

I have thought of:

  1. Just not having featured images
    • But that's not as pretty!
  2. Add the image at the top of the note
    • This would look weird with the Banners plugin (Though, I know that is not your problem)
    • I would have a hard time doing any custom styling for that image, especially if I wanted it to display elsewhere on my webpage
  3. Use a combination of uploading the file manually and then use text replace to get the URL right
    • This could be a pain to setup and be prone to issues

OS

MacOS

Anything else?

I'm loving this plugin. Solves so many problems I was having. Thank you!

[Bug]: Embedded links to images are removed by plugin during publishing

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

When I publish a note with a Obsidian plugin (release 4.2.1), and a note has image embedded with a wiki link ![[image file name.png]], link is removed from an .md file sent to github. "EmbedImage" option is on.
Definitely this was working for me using some previous release, but I did not notice the release that broke embedding, but the last one (4.2.1) has this bug.

How to reproduce ?

  1. Make a note with an embedded image in an Obsidian vault and mark it with share: true in a frontmatter, or select an already shared note with an embedded image. Image should be embedded with a wikilink (![[some image.png]]).
  2. Publish it via Obsidian Plugin.
  3. Look at the published file in a github repository - image link is removed.

Configuration

{
"githubRepo": "---",
"githubName": "---",
"GhToken": "---",
"shareKey": "share",
"ExcludedFolder": "",
"fileMenu": false,
"editorMenu": false,
"downloadedFolder": "obsidian",
"folderDefaultName": "docs",
"yamlFolderKey": "",
"rootFolder": "",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "docs/images",
"autoCleanUp": true,
"autoCleanUpExcluded": "docs/assets/logo",
"folderNote": false,
"convertWikiLinks": false,
"convertForGithub": false,
"subFolder": "",
"embedNotes": false,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": false,
"convertDataview": false,
"useFrontmatterTitle": false,
"censorText": [],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"transferEmbedded": true
}

Relevant log output

No response

OS

Windows

Anything else?

No response

[Bug]: Frontmatter "title" value is used for filename even when option is disabled

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

I have set the "title" frontmatter key to a value that I don't want as the filename for the note (it's used as a Jekyll blog post title).
image

I have disabled the option for using a frontmatter value as the filename (useFrontmatterTitle in data.json is false):
image

And yet, the plugin tries to use the "title" value as the filename (frontmatterTitleKey in data.json, which is set to "title", seems to be used regardless of useFrontmatterTitle):
image

How to reproduce ?

No response

Configuration

{
"githubRepo": "tobiasvl.github.io",
"githubName": "tobiasvl",
"GhToken": "REDACTED",
"githubBranch": "main",
"shareKey": "synced",
"excludedFolder": [],
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "obsidian",
"folderDefaultName": "",
"yamlFolderKey": "",
"rootFolder": "",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "../assets/images",
"autoCleanUp": false,
"autoCleanUpExcluded": [],
"folderNote": false,
"folderNoteRename": "index.md",
"convertWikiLinks": true,
"convertForGithub": true,
"subFolder": "blog",
"embedNotes": false,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": true,
"convertDataview": true,
"useFrontmatterTitle": false,
"censorText": [
{
"entry": "jekyll_tags:",
"replace": "tags:",
"after": false,
"flags": "gi"
},
{
"entry": "{::comment}.*{:/comment}",
"replace": "",
"after": false,
"flags": "gi"
}
],
"inlineTags": false,
"dataviewFields": [
""
],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": false,
"automaticallyMergePR": true,
"metadataExtractorPath": "",
"convertInternalNonShared": false,
"frontmatterTitleRegex": "",
"frontmatterTitleReplacement": "",
"ExcludedFolder": []
}

Relevant log output

No response

OS

No response

Anything else?

No response

[Bug]: Error during publish because of a list in the category

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

when I run a publish I get this error in the Obsidian console.

plugin:obsidian-mkdocs-publisher:32 Uncaught (in promise) TypeError: t.endsWith is not a function
    at Uu (plugin:obsidian-mkdocs-publisher:32:2995)
    at Hu (plugin:obsidian-mkdocs-publisher:32:3328)
    at Re (plugin:obsidian-mkdocs-publisher:32:4204)
    at Vt.getAllFileWithPath (plugin:obsidian-mkdocs-publisher:36:6728)
    at eval (plugin:obsidian-mkdocs-publisher:33:12439)
    at Generator.next (<anonymous>)
    at eval (plugin:obsidian-mkdocs-publisher:6:1359)
    at new Promise (<anonymous>)
    at D (plugin:obsidian-mkdocs-publisher:6:1179)
    at Qa (plugin:obsidian-mkdocs-publisher:33:12357)

How to reproduce ?

No response

Configuration

{
"githubRepo": "Obsidian",
"githubName": "Valkann",
"GhToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"githubBranch": "main",
"shareKey": "share",
"excludedFolder": [],
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "yaml",
"folderDefaultName": "docs/notes",
"yamlFolderKey": "category",
"rootFolder": "docs",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "",
"autoCleanUp": true,
"autoCleanUpExcluded": [],
"folderNote": false,
"folderNoteRename": "index.md",
"convertWikiLinks": true,
"convertForGithub": true,
"subFolder": "",
"embedNotes": true,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": false,
"convertDataview": true,
"useFrontmatterTitle": false,
"censorText": [],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": true,
"automaticallyMergePR": true,
"metadataExtractorPath": "",
"convertInternalNonShared": false,
"frontmatterTitleRegex": "",
"frontmatterTitleReplacement": "",
"ExcludedFolder": []
}

Relevant log output

No response

OS

Windows

Anything else?

No response

[Bug]: HTML-Links to folder note files do not work (Local folder)

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Hallo,

I really love your plugin. I use obs2mk in a docker container to convert my obsidian markdown file-structure to an mkdoc page. I use this line in a bash script:

find /docs -type f -name \*.md -exec bash -c 'FN="{}"; obs2mk --minimal file "{}"' \;

I have the following folder structure:
image
note that the icons are from the folder-icons plugin and do not belong to the filenames

Please checkout the resulting mkdocs file here: https://unterricht.emig.me/Unterricht/Fächer/Biologie/NuT/Ökosystem%20Grünland/

The links to the folder-note files do not work. They are not correctly linked.
For example the link to "Stoffwechsel" points to ../../../../Stoffwechsel instead of ../Der%20%Mensch%20als%20Lebewesen/Stoffwechsel
Please note, that the link in the navigation bar on the left is correctly created

How to reproduce ?

  1. In Obsidian: Create a folder and inside that a MD file with the same name as the folder (folder-note)
  2. Link to the folder note markdown file from an external markdown file
  3. Convert files using obs2mk

Configuration

using --minimal argument it should use your minimal config:

minimal:
  configuration:
    input: null
    output: null
  frontmatter:
    category:
      default value: notes
      key: category
    index: (i)
    share: share
  weblink: null

Relevant log output

No response

OS

Linux

Anything else?

No response

[FR]: Use Obsidian subfolder as root

What part of the workflow do you want to improve ?

Obsidian plugin

Is your feature related to a problem ?

I would like to sync a subfolder of my Obsidian vault to the root of my git repo using the Obsidian Path folder reception setting. Because the Obsidian path is mapped relative to the vault root folder (eg. vault/), anything in the subfolder (eg. vault/sub/) gets uploaded to repo/sub/.

What solution do you want to see ?

Option in in plugin config to designate a subfolder of the vault for syncing to repo.

So for example you could plug in in vault/sub/ as the base folder for sync. That way the sync flow would be vault/sub/ --> repo/ and vault/sub/a/ --> repo/a/

Describe the alternative you've considered

I have looked into creating a separate vault specifically for syncing to the repo but moving files from other vaults into the sync one creates extra steps I would like to remove.

OS

Windows

Anything else?

No response

EDIT: I have looked into this a little further, it looks like there may also be underlying issues with the Obsidian Path option. If you leave "default folder" blank for that setting it fails to sync entirely...

[Bug]: Repo not found but repo exist

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

When the plugin is firstly installed or the settings are emptied (and after filled) the plugin didn't found the repository. Reloading the plugin manually and try the repo allow to the plugin to connect to github.

How to reproduce ?

  1. Empty the settings, with deleting the data.json file or throught the Obsidian Settings
  2. Reload the plugin
  3. Fill the settings
  4. Try to connect to github ; Give me error
  5. Reloading the plugin
  6. Try to connect : no problem

Configuration

Default settings + any valid repo with valid token

Relevant log output

/

OS

IOS, Windows

Anything else?

No response

How to fix

For the moment, the only way to fix the plugin is to forcing reloading it throught Obsidian. Warning, it's not reload Obsidian (it didn't change any thing), just the plugin, throught the community plugin panel (activate/desactivate). After that, everything will work as intended.

[Bug]: Notifications says success, but no files uploaded

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

I configured the plugin as described; test connection is successful.

i added the "share: true" frontmatter to two files and start sync with "upload all files" from cmd+p menu (as rightclick menu does not get option even when activated)

the notification pops up saying its a success uploaded two files. but the developer info is full of errors.

Screenshot 2023-01-17 at 19 35 37

How to reproduce ?

No response

Configuration

{
"githubRepo": "xcxcxc",
"githubName": "xcxcxc",
"GhToken": "xcxcxcxc",
"githubBranch": "main",
"shareKey": "share",
"excludedFolder": [],
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "fixed",
"folderDefaultName": "test",
"yamlFolderKey": "Project",
"rootFolder": "",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "",
"autoCleanUp": false,
"autoCleanUpExcluded": [],
"folderNote": false,
"folderNoteRename": "index.md",
"convertWikiLinks": false,
"convertForGithub": false,
"subFolder": "",
"embedNotes": false,
"copyLink": true,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": false,
"convertDataview": false,
"useFrontmatterTitle": false,
"censorText": [],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": false,
"automaticallyMergePR": true,
"metadataExtractorPath": "",
"convertInternalNonShared": false,
"frontmatterTitleRegex": "",
"frontmatterTitleReplacement": "",
"ExcludedFolder": []
}

Relevant log output

No response

OS

No response

Anything else?

No response

[FR]: Add a page in documentation website to explain the behavior of each command

Discussed in #75

Originally posted by andrey-jef January 13, 2023
Hi,

Since I have some ambiguity when experimenting the plugin's command, I would like to suggest a dedicated page in documentation website to explain the behavior of each command in the plugin Github Publisher.

Here is my attempt to clarify the behavior of each command, for your consideration.

Github Publisher: Share active file -> should change to Github Publisher: Upload single current active note

  • Behavior: publish only the single current active note, this command also add the key share: true into the frontmatter of the current active note

Github Publisher: Upload all shared notes -> change to Github Publisher: Upload multiple notes

  • Behavior: publish all notes which have the key share: true in their frontmatter

Github Publisher: Upload new shared notes -> change to Github Publisher: Upload unpublished notes

  • Behavior: publish only the notes satisfying these two conditions: have the key share: true in their frontmatter AND were not published since last upload

Github Publisher: Check validity of this repository

  • Behavior: check and display the result whether there is a valid connection between the plugin and its attached repository

Github Publisher: Upload all edited notes since last upload -> change to Github Publisher: Refresh content of all published notes

  • Behavior: publish only the notes satisfying these two conditions: have the key share: true in their frontmatter AND were recently modified since last upload

Github Publisher: Upload all new and edited notes since last upload

  • This command is the combination of 2 command Github Publisher: Upload new shared notes and Github Publisher: Upload all edited notes since last upload, isn't it? In this case, is it better to remove this command in cause of its ambiguity?
  • Behavior: publish only the notes satisfying these two conditions: have the key share: true in their frontmatter AND (were newly created OR recently modified since last upload)

[FR] Publisher modal

Looks great. Thank Mara.

I would love to see how could you adopt the Publication Center feature from oleeskild to make it easier to understand what files are published, which has changed, been deleted and are yet to be published.

Screenshot 2022-04-12 182128

Or if you two can collab. Since I dreamed of a oleeskild's published page with left navigation bar, top menu, right TOC pane like what you did with your mkdocs template :)

[Bug]: Github Authorization token not included on branches requests

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

tl;dr the plugin, v4.3.6, requests to /branches returns 404, despite token configured correctly.

The dev console's Network tab completely omits the Authorization header, so I'm not sure whether the header is really missing or just hidden. I debugged the plugin manually in the console and the code for the request works, so it's a mystery (see more about the debugging at the end).

Here are the sequence of events:

Upon trying to share files (Active or all):

Screen Shot 2022-10-08 at 14 09 35


The dev console indicates a 404 error:

Screen Shot 2022-10-08 at 14 05 44


Note that the Network tab doesn't show any Authorization header being included:

Screen Shot 2022-10-08 at 14 06 57

Screen Shot 2022-10-08 at 14 07 04


However, if I try it manually from the terminal passing the token, it works:

Screen Shot 2022-10-08 at 14 07 19

How to reproduce ?

  1. install the plugin
  2. configure the plugin with repo, username and token
  3. create a new doc with a simple frontmatter entry containing share: true
  4. try to share the file
  5. you get the error

Configuration

{
  "githubRepo": "blog-markdown-files",
  "githubName": "kurko",
  "GhToken": "ghp_[REDACTED]",
  "shareKey": "share",
  "ExcludedFolder": "",
  "fileMenu": false,
  "editorMenu": false,
  "downloadedFolder": "obsidian",
  "folderDefaultName": "",
  "yamlFolderKey": "",
  "rootFolder": "",
  "workflowName": "",
  "embedImage": true,
  "defaultImageFolder": "",
  "autoCleanUp": false,
  "autoCleanUpExcluded": "",
  "folderNote": false,
  "convertWikiLinks": false,
  "convertForGithub": false,
  "subFolder": "",
  "embedNotes": false,
  "copyLink": false,
  "mainLink": "",
  "linkRemover": "",
  "hardBreak": false,
  "logNotice": false,
  "convertDataview": true,
  "useFrontmatterTitle": false,
  "censorText": [],
  "inlineTags": false,
  "dataviewFields": [],
  "excludeDataviewValue": [],
  "metadataFileFields": [],
  "frontmatterTitleKey": "title",
  "shareExternalModified": false
}

Relevant log output

No response

OS

MacOS

Anything else?

tl;dr from the console, it seems to be working well. Just not from the regular menus.

I've debugged a bit and found out that if I call the code manually from the console, it succeeds in calling Github. I debugged and then did window.octokit = octokit in order to be able to use it outside the debugger, otherwise we can't use async within the debugger because the browser complains about it.

Screen Shot 2022-10-08 at 14 51 03

[FR]: Converting title spaces to dashes for filename

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

No response

What solution do you want to see ?

Great plugin, thanks for making it available.

I'm publishing from Obsidian to a Github pages Jekyll blog. Filenames need the following:

The document's base filename, with every sequence of spaces and non-alphanumeric characters replaced by a hyphen.

At the moment I'm achieving this with this kind of frontmatter:

---
publish: true
filename: 2020-10-01-the-four-stages-of-the-product-lifecycle
---

But it would be better if I was able to specify that when the markdown title is used the escaping is done to make it valid for Jekyll. Thanks.

-Mark

Describe the alternative you've considered

No response

OS

MacOS

Anything else?

No response

[Bug]: Images don't get uploaded

What part of the workflow is concerned ?

Obsidian plugin

Describe the bug

Hi,

Nice plugin, exactly what I was looking for :D

I have managed to get everything working, except that it seems to delete the images from my repository, and doesn't upload the ones from Obsidian.

Maybe I have missed something?

How to reproduce ?

No response

Relevant log output

No response

OS

MacOS, Windows

Anything else?

No response

Clarification: How to convert frontmatter tags

Hello! This is probably a stupid question, but I'm unable to figure out the answer, so in some way I guess I consider it a bug in the documentation.

README.md says the following:

Convert frontmatter/inline field into tags : This will convert the value associated to preconfigured field into frontmatter tags. You can also prevent some value to be converted with the second field. Note: If the value is a link, the converted value will be the filename or the displayed name. You can either exclude the filename or the displayed name.

(However, the relevant setting is not called "Convert frontmatter/inline field into tags", it's called "Convert frontmatter/dataview field to tags". That should probably be fixed.)

The way I interpret this option, my file in Obsidian can have the following frontmatter:

---
jekyll-tags:
  - Foo Bar
  - Baz Quux
---

And then, if I set "Convert frontmatter/dataview field to tags" to "jekyll-tags", the resulting file on GitHub should get the following frontmatter:

---
tags:
  - Foo Bar
  - Baz Quux
---

But that doesn't happen, so I'm clearly misunderstanding what this option does. Can I make it do what I want, or if not, what does this option actually do?

(Background: The reason I want to do this is that I'm trying to publish from Obsidian to GitHub Pages with this plugin, and Jekyll allows spaces in tags while Obsidian does not, so I want to separate Obsidian tags from Jekyll tags in Obsidian but use only Jekyll tags for GitHub Pages.)

Thanks!

[Bug]: failing silently when branch is master, not main

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

tl;dr the plugin expects the repository's branch main to exist and fails silently when it's master.

It took me a good chunk of time to figure out why errors were happening. The popup had a generic error message that didn't help. Upon investigation I found out that when creating a PR, it requires a base branch main, which in my case didn't exist.

Screen Shot 2022-10-08 at 22 32 13

Two problems:

  1. the main one is that it fails silently. I think we should show a more explicit error on the screen.
  2. it's not uncommon for someone to be using master. This repo uses master and is an example.

I think we could:

  1. raise an error message that is explicit so the user knows what's going on.
  2. add to the README the fact that we only support main (or add a settings entry to select a branch).

How to reproduce ?

  1. Create a repo without branch main.
  2. Try to send files to that repo

Configuration

{
  "githubRepo": "blog",
  "githubName": "kurko",
  "GhToken": "ghp_[REDACTED]",
  "shareKey": "share",
  "ExcludedFolder": "",
  "fileMenu": true,
  "editorMenu": true,
  "downloadedFolder": "fixed",
  "folderDefaultName": "obsidian",
  "yamlFolderKey": "",
  "rootFolder": "",
  "workflowName": "",
  "embedImage": true,
  "defaultImageFolder": "images/obsidian",
  "autoCleanUp": true,
  "autoCleanUpExcluded": "",
  "folderNote": false,
  "convertWikiLinks": true,
  "convertForGithub": true,
  "subFolder": "",
  "embedNotes": false,
  "copyLink": false,
  "mainLink": "",
  "linkRemover": "",
  "hardBreak": false,
  "logNotice": false,
  "convertDataview": true,
  "useFrontmatterTitle": true,
  "censorText": [
    {
      "entry": "\\]\\(\\.\\/",
      "replace": "]({% link obsidian/"
    },
    {
      "entry": "\\({% link(.*)\\)",
      "replace": "({% link $1.md %})"
    }
  ],
  "inlineTags": false,
  "dataviewFields": [],
  "excludeDataviewValue": [],
  "metadataFileFields": [
    "obsidian"
  ],
  "frontmatterTitleKey": "filename",
  "shareExternalModified": false
}

Relevant log output

No response

OS

MacOS

Anything else?

No response

[Bug]: I tried to install this plugin from within Obsidian, but it failed

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

I clicked on Install in obsidian and nothing happens. Other plugins work fine

How to reproduce ?

No response

Configuration

not relevant

Relevant log output

No response

OS

MacOS

Anything else?

No response

[Bug]: Wikilink to Markdown link conversion has trailing "]" in filename

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

I noticed the following bug for an image link that was converted to a markdown link: the link should have been "myfile.png", but was "myfile.png%5D", where the %5D is percent encoding for the "]" character.

I believe this bug comes from the convertWikilinks() method in convertText.ts: The fileRegex captures "[[", "|" and "]". A few lines later, "[[" and "|" are replaced by "", but "]" is not replaced.

Best and thanks for the useful plugin!

How to reproduce ?

Create a markdown file which references an image myfile.png via a link ![[myfile.png]].

Push the file to github.

Check if the image link has a trailing "%5D" which prevents it from working.

Configuration

Relevant log output

No response

OS

Linux

Anything else?

No response

[Bug]: Image paths don't get renamed to the image folder on upload

What part of the workflow is concerned ?

Obsidian plugin

Describe the bug

It might not be a bug and more of a feature request.

When uploading the images and rewriting the Wikilinks to MDlinks, it would be nice to have the paths changed to a specified path where the images are uploaded to.

This would allow the Wikilinks to work in Obsidian, and then have the path changed when uploading to git.

How to reproduce ?

No response

Configuration

image

Relevant log output

No response

OS

MacOS, Windows

Anything else?

No response

Workflow doesn't run [Template]

Dear Mara-Li,

I tried everything but the moment I publish a note I get "Error publishing to mt-2022".

I followed your step-by-step instructions

  1. I have github-pro (education) with a repo from your template at https://github.com/jonathan-hase/mt-2022
  2. I installed your obsidian plugin and provided my github-name, my repo name and the api-key
  3. I changed the website url inside mkdocs.yml to https://jonathan-hase.github.io/mt-2022/
  4. I added the share: true frontmatter to the notes I want to publish. I tried to publish them.

What do you mean by "Also, don't forget to delete the documentation folder, the contents in assets and clean the notes folder!" inside the README of the template-repo? And do I have to enable the github-page option inside my repo-settings? I am confused, because you write "The blog will be published through GitHub Page using the gh-page branch. Everything is already configured by the template for that.".

Thanks for your time and help!

[FR]: Support for GitLab

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

I am working on a large software development project with a team of volunteers. I need to share some of my Obsidian notes with them but not all my notes. The project is deeply linked in my existing personal vault. I do not want my whole vault included in the Git repository because I do not want my teammates to have access to my personal notes. All the code for both the mobile and desktop versions of the application are already on GitLab and we'd like to keep the entire ecosystem of work (python program, Android program, database queries, hardware build instructions etc.) in a single location.

What solution do you want to see ?

Option to chose which public Git repo I want to use for syncing a single set of documents.

Describe the alternative you've considered

Moving everything back to GitHub.

But Git lab offers more tools that we like and are using than GitHub does.

OS

IOS, Android, MacOS, Windows, Linux

Anything else?

No response

[BUG]: Relative links broken after conversion with markdown links

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

Hello,

Thanks a lot for this plugin which is a great discovery for me !


When I share my files in Github the relative links start from the category/folder of the current page.
I put a YAML folder on my pages

page week-2

page-source

the hierarchy is well created in GitHub

racine

source

But the relative link starts from the current page

page week

And we lose the file extension ".md".

What solution do you want to see ?

Would it be possible to make the relative link take into account the Yaml categories?

Describe the alternative you've considered

If it is not possible, could the link create the hierarchy after the page?

Example here:

---> Week
------> 2022-42.md
------> source
---------> Système-monde...

OS

Windows

Anything else?

Thanks again for this great plugin, it's really amazing!

[Bug]: map is used on undefined in inlineTagsInText

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

In addInlineTags the plugin doesn't handle the case when there's no inline tags in a note correctly. This prevents the plugin from working properly while uploading all shared notes.

How to reproduce ?

No response

Configuration

``

Relevant log output

No response

OS

Linux

Anything else?

image

[Bug]: plugin fail to launch if language not found in the translation

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Since the update the plugin is impossible to activate

image

How to reproduce ?

No response

Configuration

*MODERATED BECAUSE GITHUB TOKEN

Relevant log output

No response

OS

Windows

Anything else?

No response

[FR]: Option to remove tags after adding them to frontmatter

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

No response

What solution do you want to see ?

When I choose the option to move tags into frontmatter so that they're picked up in Jekyll tag management, this all works perfectly, but the tags remain also inline in the published document. This ends up looking something like this in my Jekyll blog:

image

I'd like an additional option for the tags to be removed from the document when they're added to the frontmatter. Thanks.

-Mark

Describe the alternative you've considered

No response

OS

MacOS

Anything else?

No response

[Bug]:

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

i installed obsidian on my mac. Inside the settings, I found plugins and enabled the ObsidianPublisher plugin, which, as it seemed to me, should synchronize the vault to my repository.

How to reproduce ?

  1. install obsidian
    1.1 Create vault using "quick start"
  2. find the community plugins in the settings and enter ObsidianPublisher in the search
  3. go to the settings of the ObsidianPublisher plugin and enter repository_name, github_name, and github_token
  4. create a note
  5. check if it appeared in the repository
  6. press cmd+p and try to find the sync item.
  7. click on all the items, and after each click, check if the note has been synchronized in the github repository

Configuration

on macos I didn't find the ~/.obsidian folder
instead I found a folder
~/Documents/Obsidian Vault/.obsidian
I am attaching the data.json file. I removed the token from there for security

{
  "githubRepo": "zettel-notes",
  "githubName": "jt3k",
  "GhToken": "<i cut this token before submitting the issue to github>",
  "shareKey": "share",
  "ExcludedFolder": "",
  "fileMenu": false,
  "editorMenu": false,
  "downloadedFolder": "fixed",
  "folderDefaultName": "",
  "yamlFolderKey": "",
  "rootFolder": "",
  "workflowName": "",
  "embedImage": true,
  "defaultImageFolder": "",
  "autoCleanUp": false,
  "autoCleanUpExcluded": "",
  "folderNote": false,
  "convertWikiLinks": false,
  "convertForGithub": false,
  "subFolder": "",
  "embedNotes": false,
  "copyLink": false,
  "mainLink": "",
  "linkRemover": "",
  "hardBreak": false,
  "logNotice": false,
  "convertDataview": true,
  "useFrontmatterTitle": false
}

Relevant log output

Console output

app.js:1 Obsidian Developer Console
plugin:obsidian-mkdocs-publisher:2993 Github Publisher loaded

I opened obsidian and created a new note. then saved it with CMD+S.

I also clicked all the items of the ObsidianPublisher plugin in the command palette (cmd+p)
the console remained unchanged.

OS

Android, MacOS

Anything else?

in addition to macos, I also checked the plugin in android. and also did not succeed.
github_token used separate for android and for macos

[Bug]: Status bar has duplicated entries after error

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

My Obsidian status bar has multiple entries from this plugin.

There's also an error occurring with the plugin, but I'm not sure if that's related.

How to reproduce ?

Unsure.

Configuration

{
  "githubRepo": "blog-test",
  "githubName": "tobiasvl",
  "GhToken": "RETRACTED",
  "githubBranch": "master",
  "shareKey": "published",
  "ExcludedFolder": "",
  "fileMenu": false,
  "editorMenu": false,
  "downloadedFolder": "fixed",
  "folderDefaultName": "_posts",
  "yamlFolderKey": "",
  "rootFolder": "",
  "workflowName": "",
  "embedImage": true,
  "defaultImageFolder": "assets/images",
  "autoCleanUp": false,
  "autoCleanUpExcluded": "",
  "folderNote": false,
  "convertWikiLinks": true,
  "convertForGithub": false,
  "subFolder": "",
  "embedNotes": false,
  "copyLink": false,
  "mainLink": "",
  "linkRemover": "",
  "hardBreak": false,
  "logNotice": true,
  "convertDataview": true,
  "useFrontmatterTitle": false,
  "censorText": [],
  "inlineTags": false,
  "dataviewFields": [
    "jekyll-tags"
  ],
  "excludeDataviewValue": [],
  "metadataFileFields": [],
  "frontmatterTitleKey": "title",
  "shareExternalModified": false
}

Relevant log output

TypeError: Cannot read properties of undefined (reading 'commit')
    at GithubBranch.eval (plugin:obsidian-mkdocs-publisher:2625:40)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-mkdocs-publisher:47:24)

OS

No response

Anything else?

image

[Bug]: <img>'s src aren't getting a base path correctly (attachmentLinks)

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

tl;dr with Default Attachment Folder (defaultImageFolder) set to images/obsidian, dev console shows that convertLinkCitation ignores that and returns images/naming.png instead of images/obsidian/naming.png .

It seemed to be similar to #8, which was supposed to be fixed by 0755d37, but it wasn't.

Upon investigation, I think the culprit is this line. It was supposed to be using the default attachment path and is not. It's returning images/naming.png

Screen Shot 2022-10-08 at 23 46 28

You can see in the generated PR that the image path is correctly images/obsidian/naming.png, but the markdown file itself is not including obsidian/ in src.

How to reproduce ?

  1. Set a default attachment folder (defaultImageFolder)
  2. publish
  3. the image tag doesn't have its path modified to include the attachment folder. It ignores it completely.

Configuration

{
  "githubRepo": "blog",
  "githubName": "kurko",
  "GhToken": "ghp_[REDACTED]",
  "shareKey": "share",
  "ExcludedFolder": "",
  "fileMenu": true,
  "editorMenu": true,
  "downloadedFolder": "fixed",
  "folderDefaultName": "obsidian",
  "yamlFolderKey": "",
  "rootFolder": "",
  "workflowName": "",
  "embedImage": true,
  "defaultImageFolder": "images/obsidian",
  "autoCleanUp": true,
  "autoCleanUpExcluded": "",
  "folderNote": false,
  "convertWikiLinks": true,
  "convertForGithub": true,
  "subFolder": "",
  "embedNotes": false,
  "copyLink": false,
  "mainLink": "",
  "linkRemover": "",
  "hardBreak": false,
  "logNotice": false,
  "convertDataview": true,
  "useFrontmatterTitle": true,
  "censorText": [
    {
      "entry": "\\]\\(\\.\\/",
      "replace": "]({% link obsidian/"
    },
    {
      "entry": "\\({% link(.*)\\)",
      "replace": "({% link $1.md %})"
    }
  ],
  "inlineTags": false,
  "dataviewFields": [],
  "excludeDataviewValue": [],
  "metadataFileFields": [
    "obsidian"
  ],
  "frontmatterTitleKey": "filename",
  "shareExternalModified": false
}

Relevant log output

No response

OS

MacOS

Anything else?

Minor feedback: the lack of tests make it difficult to contribute

[FR]: Option for not automatically merging PR

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

When uploading shared notes from Obsidian, they're committed to a branch, a PR is created, and the PR is automatically merged.

It would be nice if automatically merging the PR was an option, so it could be possible to manually review the PR before merging it.

What solution do you want to see ?

An option for the plugin, "Automatically merge PR".

Describe the alternative you've considered

No response

OS

Windows

Anything else?

No response

[FR]: support vuepress to generate website

Issue validation

Workflow

Obsidian plugin 💠

Is your feature related to a problem ?

No response

What solution do you want to see ?

I imagine the publishing plugin for obsidian is very similar to what you're doing now, but mkdoc doesn't look very prerfect.

So I think using vuepress as a static blog generator would be a better choice because:

  1. theoretically support all features of mkdoc, and now except folder note and hover preview are supported
  2. besides, obsidian chart plugin, obsidian echart plugin, even advanced slide etc. are also supported, but the syntax is different.
  3. most importantly, there is a lot of optimization for blogs, such as seo, article list , timeline, rss and so on

You can check vuepress theme hope to get all features.

In order to adapt obsidian syntax in vuepress, I am going to write a vuepress plugin —— vuepress-plugin-obsidian. The general framework is ready and is expected to be completed in the next few weeks

My general idea is as follows:

image

I would appreciate it if you could do an adaptation of vuepress, depending on your idea of how to do it.

Finally, I can translate this obsidian plugin into Chinese(Currently the plugin does not have i18n, I can also add if you do not mind).

Thanks for any reply!!!

Describe the alternative you've considered

No response

OS

Windows

Anything else?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.