Skip to content

Commit

Permalink
Release ready version.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextoumbourou committed Apr 11, 2023
1 parent 41e1178 commit 361c828
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 44 deletions.
56 changes: 21 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
# Title As Link Text


https://user-images.githubusercontent.com/1080552/230809814-ff8bc224-1455-420c-b363-a0d071ff801c.mp4

## WARNING

This software is still being tested and will likely mess up your files. **Only use if you have a backup of your vault.**

## Overview

Title As Link Text is an [Obsidian](https://obsidian.md/) plugin that automatically updates Markdown-style links with the page's title instead of the file name.

## Requirements

1. `[[Wikilinks]]` are turned off.
2. I recommend using either `absolute` or `relative` style links for nested file structures.
For this plugin to be useful, use Markdown links by setting off `Use [[Wikilinks]]`.

## Complementary Plugins

* [Wikilinks To Markdown](https://github.com/agathauy/wikilinks-to-mdlinks-obsidian) to convert existing Wikilinks to Markdown.
* [Front Matter Title](https://github.com/snezhig/obsidian-front-matter-title) to replace the title with filename throughout Obsidian.
- [Wikilinks To Markdown](https://github.com/agathauy/wikilinks-to-mdlinks-obsidian) to convert existing Wikilinks to Markdown.
- [Front Matter Title](https://github.com/snezhig/obsidian-front-matter-title) to replace the title with filename throughout Obsidian.

## Use cases

* Use traditional Zettelkasten-style IDs for filenames **20230408102501.md**
* Allow special characters in the page's title that would otherwise not work in the filename (`?`, `,` etc.)
- Use traditional Zettelkasten-style IDs for filenames **20230408102501.md**
- Allow special characters in the page's title that would otherwise not work in the filename (`?`, `,` etc.)

## Installation

Installation via BRAT (for pre-releases or betas)

* Install [BRAT](https://github.com/TfTHacker/obsidian42-brat).
* Add "Title As Link Text" to BRAT:
* Open "Obsidian42 - BRAT" via Settings → Community Plugins
* Click "Add Beta plugin."
* Use the repository address `lextoumbourou/obsidian-title-as-link-text`
* Enable "Title As Link Text" under Settings → Options → Community Plugins
- Install [BRAT](https://github.com/TfTHacker/obsidian42-brat).
- Add "Title As Link Text" to BRAT:
- Open "Obsidian42 - BRAT" via Settings → Community Plugins
- Click "Add Beta plugin."
- Use the repository address `lextoumbourou/obsidian-title-as-link-text`
- Enable "Title As Link Text" under Settings → Options → Community Plugins

## How It Works

Expand All @@ -53,43 +45,37 @@ The plugin infers the title as follows:

1\. Look for `title` in the frontmatter, if it exists:

* File name: **some-doc.md**
* File contents
- File name: **some-doc.md**
- File contents
```
---
title: Some Doc
---
```
* Link result: `[Some Doc](./some-doc.md)`
- Link result: `[Some Doc](./some-doc.md)`

2\. Use the first `# H1` on the page if it exists.

* File name: **path/to/another-doc.md**
* File contents:
- File name: **path/to/another-doc.md**
- File contents:
```
# Another Doc
```
* Link result: `[Another Doc](path/to/another-doc.md`
- Link result: `[Another Doc](path/to/another-doc.md`

3\. Use the file name.

* File name: **no-title.md**
* File contents:
- File name: **no-title.md**
- File contents:
```
No title in this file.
```
* Link result: `[no-title](no-title.md)`
- Link result: `[no-title](no-title.md)`

## Comands

* `Update All Links` can be used to add the title as link text to all existing Markdown links in your vault.
- `Update All Links` can be used to add the title as link text to all existing Markdown links in your vault.

## License

MIT

## To Do

* [ ] Add command to process a Vault.
* [ ] Add unit tests.
* [ ] Much more testing.
20 changes: 11 additions & 9 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"id": "obsidian-title-as-link-text",
"name": "Title As Link Text",
"version": "1.0.5",
"minAppVersion": "0.15.0",
"description": "This plugin improves the behaviour of Markdown-style links in Obsidian.",
"author": "Lex Toumbourou",
"authorUrl": "https://notesbylex.com",
"fundingUrl": "https://obsidian.md/pricing",
"isDesktopOnly": false
"id": "obsidian-title-as-link-text",
"name": "Title As Link Text",
"version": "1.0.6",
"minAppVersion": "0.15.0",
"description": "Use the title as link text for Markdown links.",
"author": "Lex Toumbourou",
"authorUrl": "https://notesbylex.com",
"fundingUrl": {
"Buy Me a Coffee": "https://www.buymeacoffee.com/lext"
},
"isDesktopOnly": false
}

0 comments on commit 361c828

Please sign in to comment.