@quartz-community/folder-page 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/FolderContent-DEXAgZWS.d.ts +10 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +2834 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2902 -0
- package/dist/index.js.map +1 -0
- package/dist/types-BatX-IqI.d.ts +12 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +118 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Respect the `file.data.unlisted` convention in both folder discovery (virtual page generation) and folder listings (the page-list inside a folder index). Unlisted pages are never shown in folder listings and never contribute folder/subfolder entries.
|
|
13
|
+
- Exported `pagesFromAllFiles` helper for reuse and testing.
|
|
14
|
+
- Unit tests for `pagesFromAllFiles` covering the unlisted-filter behavior.
|
|
15
|
+
|
|
16
|
+
- Initial Quartz community plugin template.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Quartz Community
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @quartz-community/folder-page
|
|
2
|
+
|
|
3
|
+
Renders folder index pages showing a listing of all pages within that folder. Automatically generates virtual index pages for folders that don't have one.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx quartz plugin add github:quartz-community/folder-page
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```yaml title="quartz.config.yaml"
|
|
14
|
+
plugins:
|
|
15
|
+
- source: github:quartz-community/folder-page
|
|
16
|
+
enabled: true
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
For advanced use cases, you can override in TypeScript:
|
|
20
|
+
|
|
21
|
+
```ts title="quartz.ts (override)"
|
|
22
|
+
import * as ExternalPlugin from "./.quartz/plugins";
|
|
23
|
+
|
|
24
|
+
ExternalPlugin.FolderPage({
|
|
25
|
+
showFolderCount: true,
|
|
26
|
+
showSubfolders: true,
|
|
27
|
+
prefixFolders: false,
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
| Option | Type | Default | Description |
|
|
34
|
+
| ----------------- | --------- | ----------- | -------------------------------------------------------------------------------------- |
|
|
35
|
+
| `showFolderCount` | `boolean` | `undefined` | Whether to show the number of items in the folder. |
|
|
36
|
+
| `showSubfolders` | `boolean` | `undefined` | Whether to show subfolders in the listing. |
|
|
37
|
+
| `sort` | `SortFn` | `undefined` | A function to sort the pages in the folder. |
|
|
38
|
+
| `prefixFolders` | `boolean` | `false` | Whether to prefix generated folder page titles with "Folder: " (e.g. "Folder: notes"). |
|
|
39
|
+
|
|
40
|
+
## Documentation
|
|
41
|
+
|
|
42
|
+
See the [Quartz documentation](https://quartz.jzhao.xyz/plugins/FolderPage) for more information.
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SortFn, QuartzComponent } from '@quartz-community/types';
|
|
2
|
+
|
|
3
|
+
interface FolderContentOptions {
|
|
4
|
+
showFolderCount: boolean;
|
|
5
|
+
showSubfolders: boolean;
|
|
6
|
+
sort?: SortFn;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: (opts?: Partial<FolderContentOptions>) => QuartzComponent;
|
|
9
|
+
|
|
10
|
+
export { _default as _ };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { _ as FolderContent } from '../FolderContent-DEXAgZWS.js';
|
|
2
|
+
import { QuartzComponent, SortFn } from '@quartz-community/types';
|
|
3
|
+
export { SortFn } from '@quartz-community/types';
|
|
4
|
+
export { byDateAndAlphabetical } from '@quartz-community/utils/sort';
|
|
5
|
+
|
|
6
|
+
declare function byDateAndAlphabeticalFolderFirst(_cfg: unknown): SortFn;
|
|
7
|
+
declare const PageList: QuartzComponent;
|
|
8
|
+
|
|
9
|
+
export { PageList, byDateAndAlphabeticalFolderFirst };
|