Skip to content

Commit

Permalink
Merge pull request #133 from Andrei-Sager/back-to-top
Browse files Browse the repository at this point in the history
Added "Back To Top" internal links to advanced-README.md.
  • Loading branch information
SebastianMC authored Feb 25, 2024
2 parents 8d9ccdd + dfc6022 commit f1bced1
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion docs/advanced-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Take full control of the order of your notes and folders:
- folders not set up for the custom order remain on the standard Obsidian sorting
- support for imposing inheritance of order specifications with flexible exclusion and overriding logic

## Table of contents
## Table of Contents

- [TL;DR Usage](#tldr-usage)
- [Simple case 1: in root folder sort entries alphabetically treating folders and files equally](#simple-case-1-in-root-folder-sort-entries-alphabetically-treating-folders-and-files-equally)
Expand Down Expand Up @@ -104,6 +104,8 @@ Click the [ribbon icon](#ribbon_icon) again to disable custom sorting and switch
The [ribbon icon](#ribbon_icon) acts also as the visual indicator of the current state of the plugin - see
the [ribbon icon](#ribbon_icon) section for details

[🔼 Back To Top](#table-of-contents)

### Simple case 1: in root folder sort entries alphabetically treating folders and files equally

The specified rule is to sort items alphabetically in the root folder of the vault
Expand All @@ -129,6 +131,8 @@ which can result in:

![Simplest example](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/simplest-example.svg)

[🔼 Back To Top](#table-of-contents)

### Simple case 2: impose manual order of some items in root folder

The specification here lists items (files and folders) by name in the desired order
Expand All @@ -151,6 +155,8 @@ produces:

![Simplest example](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/simplest-example-2.svg)

[🔼 Back To Top](#table-of-contents)

### Example 3: In root folder, let files go first and folders get pushed to the bottom

Files go first, sorted by modification date descending (newest note in the top)
Expand Down Expand Up @@ -179,6 +185,8 @@ will order items as:

![Files go first example](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/files-go-first.svg)

[🔼 Back To Top](#table-of-contents)

### Example 4: In root folder, pin a focus note, then Inbox folder, and push archive to the bottom

The specification below says:
Expand Down Expand Up @@ -215,6 +223,8 @@ folder which contains the note with the specification_.
> If the `target-folder:` line is omitted, the specification will be applied to the parent folder of the note, which has
> the same effect as `target-folder: .`
[🔼 Back To Top](#table-of-contents)

### Example 5: P.A.R.A. method example

The P.A.R.A. system for organizing digital information is based on the four specifically named folders ordered as in the
Expand All @@ -239,6 +249,8 @@ which will have the effect of:

![Result of the example](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/p_a_r_a.svg)

[🔼 Back To Top](#table-of-contents)

### Example 6: P.A.R.A. example with smart syntax

Instead of listing full names of folders or notes, you can use the prefix or suffix of prefix+suffix notation with the
Expand All @@ -263,6 +275,8 @@ It will give exactly the same order as in previous example:
REMARK: the wildcard expression '...' can be used only once per line
```

[🔼 Back To Top](#table-of-contents)

### Example 7: Apply the same sorting rules to two folders

Let's tell a few folders to sort their child notes and child folders by created date reverse order (newer go first)
Expand All @@ -279,6 +293,8 @@ sorting-spec: |

No visualization for this example needed

[🔼 Back To Top](#table-of-contents)

### Example 8: Specify rules for multiple folders

The specification can contain rules and orders for more than one folder
Expand All @@ -305,6 +321,8 @@ will have the effect of:

![Result of the example](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/multi-folder.svg)

[🔼 Back To Top](#table-of-contents)

### Example 9: Sort by numerical suffix

This is interesting.
Expand Down Expand Up @@ -332,6 +350,8 @@ The effect is:

![Order by numerical suffix](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/by-suffix.svg)

[🔼 Back To Top](#table-of-contents)

### Example 10: Sample book structure with Roman numbered chapters

Roman numbers are also supported. This example uses the `\R+` token in connection with the wildcard `...`
Expand All @@ -354,6 +374,8 @@ it gives:

![Book - Roman chapters](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/roman-chapters.svg)

[🔼 Back To Top](#table-of-contents)

### Example 11: Sample book structure with compound Roman number suffixes

Roman compound numbers are also supported. This example uses the `\.R+` token (a Roman compound number with '.' as separator) in connection with the wildcard `...` (and the important SPACE inbetween).
Expand All @@ -374,6 +396,8 @@ the result is:

![Book - Roman compound suffixes](https://github.com/SebastianMC/obsidian-custom-sort/blob/master/docs/svg/roman-suffix.svg)

[🔼 Back To Top](#table-of-contents)

### Example 12: Apply same sorting to all folders in the vault

Apply the same advanced modified date sorting to all folders in the Vault. The advanced modified sorting treats the folders
Expand All @@ -393,6 +417,8 @@ sorting-spec: |
---
```

[🔼 Back To Top](#table-of-contents)

### Example 13: Sorting rules inheritance by subfolders

A more advanced example showing finetuned options of manipulating of sorting rules inheritance:
Expand Down Expand Up @@ -429,6 +455,8 @@ sorting-spec: |
---
```

[🔼 Back To Top](#table-of-contents)

### Example 14: Grouping and sorting by metadata value

Notes can contain metadata, let me use the example inspired by the [Feature Request #23](https://github.com/SebastianMC/obsidian-custom-sort/issues/23).
Expand Down Expand Up @@ -509,6 +537,8 @@ Then the remaining notes (not having the `Pages` metadata) are sorted by modific
> The `with-metadata:` keyword can be used with other specifiers like `/:files with-metadata: Pages` or `/folders with-metadata: Pages`
> If the metadata name is omitted, the default `sort-index-value` metadata name is assumed.
[🔼 Back To Top](#table-of-contents)

## Alphabetical, Natural and True Alphabetical sorting orders

The 'A-Z' sorting (visible in Obsidian UI of file explorer) at some point before the 1.0.0 release of Obsidian actually became the so-called 'natural' sort order.
Expand Down Expand Up @@ -538,6 +568,8 @@ sorting-spec: |
< true a-z
```

[🔼 Back To Top](#table-of-contents)

## Location of sorting specification YAML entry

You can keep the custom sorting specifications in any of the following locations (or in all of them):
Expand Down Expand Up @@ -566,6 +598,8 @@ reference.

<a name="ribbon_icon"></a>

[🔼 Back To Top](#table-of-contents)

## Ribbon icon

Click the ribbon icon to toggle the plugin between enabled and suspended states.
Expand Down Expand Up @@ -600,6 +634,8 @@ On small-screen mobile devices (phones) the icon is static:
- Click to enable and apply custom sorting or to disable custom sorting
- To get notified about custom sort plugin state, enable the mobile-specific notifications in plugin settings

[🔼 Back To Top](#table-of-contents)

## Installing the plugin

### From the official Obsidian Community Plugins page
Expand All @@ -608,6 +644,8 @@ The plugin could and should be installed from the official Obsidian Community Pl
or directly in the Obsidian app itself.
Search the plugin by its name 'CUSTOM FILE EXPLORER SORTING'

[🔼 Back To Top](#table-of-contents)

### Installing the plugin using BRAT

> NOTE
Expand All @@ -625,6 +663,8 @@ Search the plugin by its name 'CUSTOM FILE EXPLORER SORTING'
3. Specify this repository: `SebastianMC/obsidian-custom-sort`
3. Enable the `Custom File Explorer sorting` plugin (`Settings` -> `Community Plugins`)

[🔼 Back To Top](#table-of-contents)

### Manually installing the plugin

> NOTE
Expand All @@ -644,8 +684,11 @@ Search the plugin by its name 'CUSTOM FILE EXPLORER SORTING'
> Note: The `.obsidian` folder may be hidden.
> On macOS, you should be able to press Command+Shift+Dot to show the folder in Finder.
[🔼 Back To Top](#table-of-contents)

## Credits

Thanks to [Nothingislost](https://github.com/nothingislost) for the monkey-patching ideas of File Explorer
in [obsidian-bartender](https://github.com/nothingislost/obsidian-bartender)

[🔼 Back To Top](#table-of-contents)

0 comments on commit f1bced1

Please sign in to comment.