diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index e7833f0..09e092d 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -13,7 +13,7 @@ export default defineConfig({ { text: 'Settings', link: '/settings' }, { text: 'Commands', link: '/commands' }, ], - outline: [1,2], + outline: [2,3], sidebar: [ { text: '', diff --git a/docs/changelog.md b/docs/changelog.md index 69df4d4..7123db2 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,107 +1,109 @@ -# [2.4.4](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.4) (15.03.2024) +# Changelog + +## [2.4.4](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.4) (15.03.2024) - Tweaks the auto cleanup for some more edge cases. -# [2.4.3](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.3) (07.03.2024) +## [2.4.3](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.3) (07.03.2024) - Fixes a forbidden characters in file name bug. (#30) - Fixes a bug with the directory search in the settings with the forced `/`. (#27) -# [2.4.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.2) (07.03.2024) +## [2.4.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.2) (07.03.2024) - Adds the `{thumbnailUrl}` option for the template strings. -# [2.4.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.1) (23.02.2024) +## [2.4.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.1) (23.02.2024) - Fixes a bug where a template still uses the specified template file without creating a note - Improves the auto-cleanup feature to also parse the LaTeX of a Wikipedia articles intro. -# [2.4.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.0) (17.12.2023) +## [2.4.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.4.0) (17.12.2023) - Fixes a big bug that made using template files with the link article command impossible. (#25) - Adds the option to use the parent folder of the currently active note to create new notes in. (#24) -# [2.3.3](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.3) (02.12.2023) +## [2.3.3](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.3) (02.12.2023) - Adds the template file option. - Adds the `Override files` setting - Fixes some bugs. -# [2.3.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.2) (27.11.2023) +## [2.3.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.2) (27.11.2023) - Adds the `Create article note` command. - Adds the `Open created article notes` setting. -# [2.3.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.1) (18.11.2023) +## [2.3.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.1) (18.11.2023) - Introduces the new documentation and links it from the settings page. -# [2.3.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.0) (18.11.2023) +## [2.3.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.3.0) (18.11.2023) - Fixes article redirect bugs and adds intro auto cleanup. -# [2.2.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.2.1) (14.11.2023) +## [2.2.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.2.1) (14.11.2023) - Fixes an IOS bug (#20). - Fixes typos and stuff. -# [2.2.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.2.0) (16.10.2023) +## [2.2.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.2.0) (16.10.2023) - Adds note creation for articles and improves a bunch of stuff. -# [2.1.4](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.4) (29.09.2023) +## [2.1.4](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.4) (29.09.2023) - Fixes a mobile bug with the surfing integration. -# [2.1.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.2) (20.08.2023) +## [2.1.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.2) (20.08.2023) - Adds the `{thumbnail}` option for the templates. -# [2.1.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.1) (03.08.2023) +## [2.1.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.1) (03.08.2023) - Small styling and functionality patch. -# [2.1.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.0) (03.08.2023) +## [2.1.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/2.1.0) (03.08.2023) - Changes `Open article` to use the surfing plugin. -# [1.9.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.9.2) (19.07.2023) +## [1.9.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.9.2) (19.07.2023) - Fixes links opening when offline. -# [1.9.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.9.1) (12.07.2023) +## [1.9.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.9.1) (12.07.2023) - Fixes file navigation bug (#14). -# [1.9.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.9.0) (10.07.2023) +## [1.9.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.9.0) (10.07.2023) - Adds an `Open article` command. -# [1.8.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.8.1) (25.06.2023) +## [1.8.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.8.1) (25.06.2023) - Fixes a small intro language bug. -# [1.8.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.8.0) (14.06.2023) +## [1.8.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.8.0) (14.06.2023) - Adds the option for multiple templates. - Adds a {language} and {languageCode} parameter for the templates. - Some smaller tweaks. -# [1.7.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.7.1) (25.05.2023) +## [1.7.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.7.1) (25.05.2023) - Adds a setting for choosing whether or not to use the articles title instead of the selected text for '{title}' parameter when hyperlinking. -# [1.7.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.7.0) (25.05.2023) +## [1.7.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.7.0) (25.05.2023) - Implements the option for the cursor placement (#7) - Adds the option to auto-select single response queries (#8) -# [1.6.3](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.3) (21.04.2023) +## [1.6.3](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.3) (21.04.2023) - Removes an unnecessary check. - Update the funding url. -# [1.6.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.2) (15.04.2023) +## [1.6.2](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.2) (15.04.2023) - Fixes a bug with some queries messing up the urls and therefore showing wrong descriptions. -# [1.6.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.1) (31.03.2023) +## [1.6.1](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.1) (31.03.2023) - Improves the offline error handling. A missing internet connection gets caught right away now. -# [1.6.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.0) (31.03.2023) +## [1.6.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.6.0) (31.03.2023) - Adds `{intro}` for the templates. - Improve the UX with better setting descriptions and so on. -# [1.5.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.5.0) (31.03.2023) +## [1.5.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.5.0) (31.03.2023) - Added quicksearching different languages. -# [1.4.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.4.0) (31.03.2023) +## [1.4.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.4.0) (31.03.2023) - Added hyperlinking. -# [1.3.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.3.0) (29.03.2023) +## [1.3.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.3.0) (29.03.2023) - Improve search with articles description. -# [1.2.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.2.0) (23.03.2023) +## [1.2.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.2.0) (23.03.2023) - Minor code and meta data changes. -# [1.1.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.1.0) (20.03.2023) +## [1.1.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.1.0) (20.03.2023) - Improved error handling when the user is offline. -# [1.0.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.0.0) (15.03.2023) +## [1.0.0](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases/tag/1.0.0) (15.03.2023) - Birth \ No newline at end of file diff --git a/docs/commands.md b/docs/commands.md index de7a520..82ee462 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -1,13 +1,15 @@ +# Commands + The plugin comes with the following two commands. You can access these commands over the command palette (`CTRL+P`). The `Open Article` command also has its own little button in the ribbon menu on the left (the Wikipedia Logo). Of course you can also set custom hotkeys for the commands in your settings. -# `Link Article` +## `Link Article` The `Link Article` command can be used in the edit mode of any markdown file in your vault. It lets you link articles. At first you have to search for and select the Wikipedia article you want to link using the [search pop-up](#shared-search-modal) that appears. After you selected the article you were looking for you have to choose which template to use for the insert. For this another pop-up appears for you to select one of the ones you configured in the settings. If you don't have any [additional templates](settings.md#template-settings) this step is skipped and the default template is used. When you picked the template the magic is happening. The insert is created using the templates [template string](settings.md#template-string) and is inserted inline at the cursors position or into a newly created note based on your [settings](settings.md#creates-note--custom-note-path). Now the ["Cursor placement" setting](settings.md#cursor-placement) comes into play and everything is done! -# `Open Article` +## `Open Article` The `Open Article` command can be used everywhere. It lets you open articles to read. At first you have to search for and select the Wikipedia article you want to open using the [search pop-up](#shared-search-modal) that appears. Now the articles website gets opened either in your default browser or obsidian directly which depends on a few factors. On mobile articles always get opened in the browser. On desktop it depends on your ["Open article in browser" setting](settings.md#open-article-in-browser) and whether or not you have the [Surfing plugin](https://github.com/PKM-er/Obsidian-Surfing) enabled. The Surfing plugin allows you to browse the web and open websites within Obsidian. You can install it [here](obsidian://show-plugin?id=surfing). The Wikipedia Search plugin integrates with the Surfing plugin. By default will Wikipedia Search create a new Surfing web tab and make it open the url of your article selection if you have the plugin enabled. -# `Create Article Note` +## `Create Article Note` The `Create Article Note` command can be used everywhere but you have to have at least one [note template](settings.md#creates-note--custom-note-path) configured to use it. It lets you create notes in your vault for Wikipedia articles. At first you have to search for and select the Wikipedia article you want to open using the [search pop-up](#shared-search-modal) that appears. After you selected the article you were looking for you have to choose one of the [note template](settings.md#creates-note--custom-note-path) you configured in the settings to use for the insert. If there is only one template to choose from it gets selected automatically. This will create the articles note in your vault. -# Shared search modal +## Shared search modal The search modal gets used by both the `Link Article` and `Open Article` command. It lets you search the Wikipedia for the article you are looking for and lets you select one. If you had some text selected while calling one of the commands your selection is automatically pasted into the search bar. The search modal shows you the search results for articles that fit to your query (see the [search limit setting](settings.md#search-limit) to change to maximum number of results shown). Each article gets shown with it's title and description (if available). By default the Wikipedia set in your [settings](settings.md#language) will be searched for any given input. If your query starts with a language code followed by a semicolon the Wikipedia of the language code will be used temporarily for this query (for example `nl: Albert Einstein` to search for the dutch Wikipedia article of Albert Einstein). This let's you easily **quicksearch different languages**. When you found what you were looking for just select it. This is also where [this](settings.md#auto-select-single-response-queries) setting might come in handy. \ No newline at end of file diff --git a/docs/getting-started.md b/docs/getting-started.md index 82ed44a..d12eb73 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,3 +1,5 @@ +# Getting Started + 1. Install the plugin and enable it. → [Installation](installation.md) 2. Configure the settings to your liking. → [Settings](settings.md) 3. Start searching/linking/reading :) → [Commands](commands.md) diff --git a/docs/help.md b/docs/help.md index 8653eca..f1502e0 100644 --- a/docs/help.md +++ b/docs/help.md @@ -1 +1,3 @@ +# Help + If you tried finding an answer to your question in this documentation but still need help with something feel free to ask the community and me for help in the [Q&A in the GitHub Discussions Tab](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/discussions/categories/q-a). \ No newline at end of file diff --git a/docs/installation.md b/docs/installation.md index c9d9450..7e822e5 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,10 +1,12 @@ -# From the community plugins list +# Installation + +## From the community plugins list 1. Search under the Community Plugins in the settings for it and click install. 2. Enable the plugin by using its toggle in the installed plugin list. ![plugin list entry](./public/plugin.png) -# Manual Installation +## Manual Installation 1. Create the directory `[path-to-vault]/.obsidian/plugins/wikipedia-search`. 2. Download the `main.js` and `mainfest.json` from the [latest release](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/releases) and put them in the created directory. diff --git a/docs/license.md b/docs/license.md index 3b8eeec..5644eeb 100644 --- a/docs/license.md +++ b/docs/license.md @@ -1 +1,3 @@ +# License + This project and documentation is licensed under the [Humane Software License](https://github.com/StrangeGirlMurph/The-Humane-Software-License) see [LICENSE](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/blob/master/LICENSE). \ No newline at end of file diff --git a/docs/roadmap.md b/docs/roadmap.md index 0c9eb94..94fc210 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1 +1,3 @@ +# Roadmap + For now this project is done. As long as there aren't any new ideas from the community or bugs found there isn't really anything to do. I am simply out of ideas and pretty happy with how everything is right now. If you have anything that needs to be done create an issue! \ No newline at end of file diff --git a/docs/settings.md b/docs/settings.md index 05193bc..e76a39c 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -1,31 +1,35 @@ -# General settings +# Settings + +A list of all the available settings including detailed explanations for each one. + +## General settings ::: details Screenshot ![general settings screenshot](/general-settings.png) ::: -## Language +### Language Select the default Wikipedia (as in language of the Wikipedia) to search. See [languages.ts](https://github.com/StrangeGirlMurph/obsidian-wikipedia-search/blob/master/src/utils/languages.ts) for a list of all available languages. Note: Some features might not work with all languages. (Some APIs might not have all the necessary functionality.) Default: `en - English` -## Search limit +### Search limit The maximum number of search results to return and show for any given query. The value must be between (and including) 1 and 500 and a number. Otherwise the last valid value will be kept. Default: `10` -## Thumbnail width +### Thumbnail width The width of the inserted thumbnails in pixels. Leave this field empty to use the original size. Any other input must be a valid number. Otherwise the last valid value will be kept. The width will be inserted into the thumbnail embed like this: `![... Thumbnail | ](...)`. The `|` followed by the width tells obsidian to show that image with the specified width. Default: `‎` (empty) -## Default note path +### Default note path The default vault folder where articles notes should be created. This only gets used when there is a template which creates notes and it's custom path empty i.e. not set. If set to `[current folder]` the parent folder of the currently active note will be used. Default: `/` (the root folder) -# Template settings +## Template settings Each user has a list of templates for the inserts that this plugin creates when [linking articles](commands.md#link-article) or [creating article notes](commands.md#create-article-note). The templates can be separated into one default template and multiple additional templates. Templates can be deleted with the `-` button at the end. The default template can't be deleted. You can create new templates with the `+` button at the bottom right. The settings for a template can be separated into the following three parts: @@ -34,19 +38,19 @@ The settings for a template can be separated into the following three parts: ![template settings screenshot](/template-settings.png) ::: -## Template name +### Template name The first field of each template sets the name of the template. The name of the default template can't be changed (that's why that field is disabled) while the additional templates can have any name. Default: `Additional Template` -## Creates note & Custom note path +### Creates note & Custom note path The middle part of a templates settings is all about note creation. It consist of a toggle and a text field that appears when the "creates a note" toggle is in the "on" state. The toggle controls whether or not the template should create a new note with the articles title as its name, paste the insert in there and link the newly created note instead of directly pasting the insert into the current note. This allows for creating notes for wikipedia articles. We call templates that create new notes "note templates" and templates that doesn't "inline templates". By default all the notes will be created at the [default note path](#default-note-path). The appearing text field lets you customize the location for any given template. Leave it empty to use the default note path or set it to `[current folder]` to use the parent folder of the currently active note. Note that this means you always have to make sure you have an active note when using [`Create article note`](commands.md#create-article-note). Default: `false` as in "inline" for the toggle and `‎` (empty) for the custom note path -## Template string +### Template string The last and most important part of any template is its template string. The template string is the blueprint for the insert. This last section consists of a toggle and an input field which is either a big text or a file search field. The toggle sets whether or not the template string is declared directly in the settings tab in the big text field or separately in a file which the file search field references instead. Template files are only supported for note templates. That's why the toggle disappears and the input automatically switches to the text field once you switch to an inline template. The template string can be any kind of string containing line breaks and whatever you can think of. The plugin recognizes the following character sequences and replaces all occurrences with the corresponding data: @@ -68,28 +72,28 @@ You can also use [Templater](https://github.com/SilentVoid13/Templater) Syntax i ![Templater Setting](/templater-setting.png) ::: -# Workflow optimization settings +## Workflow optimization settings ::: details Screenshot ![workflow optimization settings screenshot](/workflow-optimizations.png) ::: -## Cursor placement +### Cursor placement Whether or not the cursor is placed infront of the insert instead of after it. For longer inserts it might make it easier to keep the cursor at the start of the insert. Default: `false` -## Auto-select single response queries +### Auto-select single response queries Whether or not to automatically select the response to a query when there is only one article to choose from. For example when you select someones name and want to hyperlink it to the persons Wikipedia article this feature will automatically select the article when there is only one article related to that name. Default: `false` -## Use article title instead of selection +### Use article title instead of selection Whether or not to use the articles title instead of the selected text for the '{title}' parameter of your template when hyperlinking. Default: `false` -## Stop auto-cleanup of intros +### Stop auto-cleanup of intros Whether or not to stop auto-cleaning/parsing the articles intros for better readability. Many articles intros and mostly intros that contain any math are very poorly formatted the way the Wikipedia API returns them in plain-text. For example the intro of the [Total order](https://en.wikipedia.org/w/api.php?format=json&redirects=1&action=query&prop=extracts&exintro&explaintext&titles=Total%20order) with lots of weirdly placed empty spaces and linebreakes. Therefor every response gets cleaned up a bit for better readability with the following code: ```ts intro @@ -117,22 +121,22 @@ gets turned into Default: `false` (really recommended) -## Open article in browser +### Open article in browser Whether or not to always open articles in the browser instead of in-app even if the Surfing plugin is installed and enabled. Default: `false` -## Article tab placement +### Article tab placement Whether or not to open articles in a fullscreen tab instead of a split view when using the Surfing plugin to [open the articles directly in Obsidian](commands.md#open-article) or [opening newly created article notes](#open-created-article-notes). Default: `false` -## Open created article notes +### Open created article notes Whether or not to open the newly created article notes directly after creating them. Follows the [article tab placement setting](#article-tab-placement). Default: `false` -## Override files +### Override files Whether or not to override existing files when creating article notes. Default: `false` \ No newline at end of file diff --git a/docs/support.md b/docs/support.md index 935a25e..ccfdbd5 100644 --- a/docs/support.md +++ b/docs/support.md @@ -1,3 +1,5 @@ +# Support + If you want to support this project you can do so by creating issues with feature request, bug reports and so on, by creating pull requests with fixes and new features and by [supporting me financially](https://www.murphy-in.space/support) by buying me some cake for example :) Please tell me if this documentation needs further elaboration for some topics! [](https://ko-fi.com/murph)