Skip to content

Commit 551a706

Browse files
authored
Merge pull request #1 from afazio1/dev
use sentence case and fix command name
2 parents dc38c9e + 68075ac commit 551a706

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ Get the benefits of composing markdown notes in Obsidian without having to manua
1313
After enabling the plugin, go to Markdown Blogger's settings.
1414
- Set the **Local Project Folder Path**. Must be an **absolute** path.
1515

16-
### Push Markdown command
16+
### Push markdown command
1717
Creates or overwrites a file at location `/PROJECT_PATH/<note_name>.md` with the current note's markdown content.
1818
- Open a markdown note in editing mode
1919
- Open the command palette and search "Push Markdown command"
2020
- If the **Local Project Folder Path** is invalid or does not exist, the note will not be pushed
2121

22-
### Pull Markdown command
22+
### Pull markdown command
2323
Overwrites the current note's markdown content with the file content at location `/PROJECT_PATH/<note_name>.md`
2424
- Open a markdown note in editing mode
2525
- Open the command palette and search "Pull Markdown command"
2626
- If the file at location `/PROJECT_PATH/<note_name>.md` is invalid or does not exist, the content will not be pulled
2727

28-
### Validate Path command
29-
Validates the **Local Project Folder Path** currently in settings.
28+
### Validate path command
29+
Validates the **Local project folder path** currently in settings.
3030
- Open the command palette and search "Validate Path command"
3131
- A message indicating the validity of the path will be displayed
3232

3333
## Tips & Disclaimers
3434
1. This is not a Version Control System like Git. Push and pull commands will overwrite the contents of the file. No history is tracked. I recommend only making changes to one file at any given time and pushing or pulling before editing a file.
35-
2. Triple-check your **Local Project Folder Path**. You can easily copy the **absolute** path from within VS Code by right-clicking the directory where you store your `.md` files.
35+
2. Triple-check your **Local project folder path**. You can easily copy the **absolute** path from within VS Code by right-clicking the directory where you store your `.md` files.
3636
- Ex. `/Users/alexa/Desktop/code-projects/alexa-blog/src/content`
3737
3. Files are paired with each other (in Obsidian vs. in Project) based on their filename. As of now, if you change the filename in one place you must change it in the other.
3838
4. Since the `.md` file in your project will have the same filename as the Obsidian note it was generated from, I recommend using hyphens instead of spaces when naming files.

main.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export default class MarkdownBlogger extends Plugin {
1818
await this.loadSettings();
1919

2020
this.addCommand({
21-
id: 'validate-path-command',
22-
name: 'Validate Path command',
21+
id: 'validate-path',
22+
name: 'Validate path',
2323
editorCallback: (editor: Editor, view: MarkdownView) => {
2424

2525
const { projectFolder } = this.settings;
@@ -32,8 +32,8 @@ export default class MarkdownBlogger extends Plugin {
3232
});
3333

3434
this.addCommand({
35-
id: 'push-md-command',
36-
name: 'Push Markdown command',
35+
id: 'push-md',
36+
name: 'Push markdown',
3737
editorCallback: (editor: Editor, view: MarkdownView) => {
3838

3939
const { projectFolder } = this.settings;
@@ -53,8 +53,8 @@ export default class MarkdownBlogger extends Plugin {
5353
});
5454

5555
this.addCommand({
56-
id: 'pull-md-command',
57-
name: 'Pull Markdown command',
56+
id: 'pull-md',
57+
name: 'Pull markdown',
5858
editorCheckCallback: (checking: boolean, editor: Editor, view: MarkdownView) => {
5959
const projectBlogPath = path.resolve(this.settings.projectFolder, view.file.name);
6060

@@ -97,7 +97,7 @@ class ErrorModal extends Modal {
9797

9898
onOpen() {
9999
const {contentEl} = this;
100-
contentEl.setText("The project folder does not exist. Please create the path or update the current path in Plugin Settings.");
100+
contentEl.setText("The project folder does not exist. Please create the path or update the current path in plugin settings.");
101101
}
102102

103103
onClose() {
@@ -122,7 +122,7 @@ class MarkdownBloggerSettingTab extends PluginSettingTab {
122122
containerEl.createEl('h2', {text: 'Settings for Obsidian Markdown Blogger.'});
123123

124124
new Setting(containerEl)
125-
.setName('Local Project Folder Path')
125+
.setName('Local project folder path')
126126
.setDesc('The local project folder for your blog, portfolio, or static site. Must be an absolute path.')
127127
.addText(text => text
128128
.setPlaceholder('/Users/johnsample/projects/astro-blog/collections/')

0 commit comments

Comments
 (0)