Skip to content

Commit

Permalink
fix: image path not converted correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Jul 7, 2022
1 parent 6aebcd8 commit 627172c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions mkdocsPublisher/githubInteraction/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ export default class MkdocsPublish {
const path = getReceiptFolder(file, this.settings, this.metadataCache)
await this.uploadText(file.path, text, path, file.name, ref);
if (linkedImage.length > 0 && this.settings.transferEmbedded) {
new Notice(`Upload ${linkedImage.length} images!`)
let i=0;
for (const image of linkedImage) {
await this.uploadImage(image, ref);
i++;
}
new Notice(`Uploaded successfully ${i} images!`);
}
if (one_file) {
await deleteFromGithub(true, this.settings, this.octokit, ref, shareFiles);
Expand Down
2 changes: 0 additions & 2 deletions mkdocsPublisher/utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ export async function deleteUnsharedDeletedNotes(PublisherManager: GithubBranch,
export async function shareOneNote(branchName: string, PublisherManager: GithubBranch, settings: MkdocsPublicationSettings, file: TFile) {
try {
await PublisherManager.newBranch(branchName);
new Notice('Branch created')
const publishSuccess =
await PublisherManager.publish(file, true, branchName);
new Notice(`${branchName} created and ${publishSuccess}`)
if (publishSuccess) {
const update = await PublisherManager.updateRepository(branchName);
if (update) {
Expand Down

0 comments on commit 627172c

Please sign in to comment.