@sveltia/cms 0.106.3 → 0.107.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/README.md +21 -15
- package/dist/sveltia-cms.js +247 -257
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +247 -257
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +803 -466
- package/types/public.d.ts +269 -160
package/types/public.d.ts
CHANGED
|
@@ -247,9 +247,9 @@ export type MediaLibraries = {
|
|
|
247
247
|
stock_assets?: StockAssetMediaLibrary;
|
|
248
248
|
};
|
|
249
249
|
/**
|
|
250
|
-
*
|
|
250
|
+
* Common field properties that are shared among all field types.
|
|
251
251
|
*/
|
|
252
|
-
export type
|
|
252
|
+
export type CommonFieldProps = {
|
|
253
253
|
/**
|
|
254
254
|
* Unique identifier for the field. It cannot include periods and spaces.
|
|
255
255
|
*/
|
|
@@ -281,11 +281,6 @@ export type BaseFieldProps = {
|
|
|
281
281
|
*/
|
|
282
282
|
i18n?: boolean | "duplicate" | "translate" | "none";
|
|
283
283
|
};
|
|
284
|
-
/**
|
|
285
|
-
* Common field properties. We have to allow arbitrary properties because custom widgets can have
|
|
286
|
-
* any properties. This is also required to enable schema autocomplete for the fields in IDEs.
|
|
287
|
-
*/
|
|
288
|
-
export type CommonFieldProps = BaseFieldProps & Record<string, any>;
|
|
289
284
|
/**
|
|
290
285
|
* Standard field properties for a built-in widget.
|
|
291
286
|
*/
|
|
@@ -1119,12 +1114,12 @@ export type CustomFieldProps = {
|
|
|
1119
1114
|
/**
|
|
1120
1115
|
* Widget name.
|
|
1121
1116
|
*/
|
|
1122
|
-
widget: Exclude<string, BuiltInWidgetName>;
|
|
1117
|
+
widget: Exclude<string, BuiltInWidgetName | "">;
|
|
1123
1118
|
};
|
|
1124
1119
|
/**
|
|
1125
1120
|
* Entry field using a custom widget.
|
|
1126
1121
|
*/
|
|
1127
|
-
export type CustomField = CommonFieldProps & CustomFieldProps
|
|
1122
|
+
export type CustomField = CommonFieldProps & CustomFieldProps & Record<string, any>;
|
|
1128
1123
|
/**
|
|
1129
1124
|
* Entry field.
|
|
1130
1125
|
*/
|
|
@@ -1484,10 +1479,9 @@ export type CollectionDivider = {
|
|
|
1484
1479
|
divider: boolean;
|
|
1485
1480
|
};
|
|
1486
1481
|
/**
|
|
1487
|
-
*
|
|
1488
|
-
* called an entry collection.
|
|
1482
|
+
* Common collection properties.
|
|
1489
1483
|
*/
|
|
1490
|
-
export type
|
|
1484
|
+
export type CommonCollectionProps = {
|
|
1491
1485
|
/**
|
|
1492
1486
|
* Unique identifier for the collection.
|
|
1493
1487
|
*/
|
|
@@ -1513,28 +1507,6 @@ export type Collection = {
|
|
|
1513
1507
|
* list.
|
|
1514
1508
|
*/
|
|
1515
1509
|
icon?: string;
|
|
1516
|
-
/**
|
|
1517
|
-
* Field name to be used as the title and slug of an
|
|
1518
|
-
* entry. Entry collection only. Default: `title`.
|
|
1519
|
-
*/
|
|
1520
|
-
identifier_field?: FieldKeyPath;
|
|
1521
|
-
/**
|
|
1522
|
-
* A set of files. File collection only.
|
|
1523
|
-
*/
|
|
1524
|
-
files?: CollectionFile[];
|
|
1525
|
-
/**
|
|
1526
|
-
* Base folder path relative to the project root. Entry collection only.
|
|
1527
|
-
*/
|
|
1528
|
-
folder?: string;
|
|
1529
|
-
/**
|
|
1530
|
-
* Set of fields to be included in entries. Entry collection only.
|
|
1531
|
-
*/
|
|
1532
|
-
fields?: Field[];
|
|
1533
|
-
/**
|
|
1534
|
-
* File path relative to `folder`, without a file extension. Entry
|
|
1535
|
-
* collection only.
|
|
1536
|
-
*/
|
|
1537
|
-
path?: string;
|
|
1538
1510
|
/**
|
|
1539
1511
|
* Internal media folder path for the collection. This overrides
|
|
1540
1512
|
* the global `media_folder` option. It can be a relative path from the project root if it starts
|
|
@@ -1549,33 +1521,15 @@ export type Collection = {
|
|
|
1549
1521
|
* overrides the global `public_folder` option. Default: `media_folder` option value.
|
|
1550
1522
|
*/
|
|
1551
1523
|
public_folder?: string;
|
|
1552
|
-
/**
|
|
1553
|
-
* Entry filter. Entry collection only.
|
|
1554
|
-
*/
|
|
1555
|
-
filter?: CollectionFilter;
|
|
1556
1524
|
/**
|
|
1557
1525
|
* Whether to hide the collection in the UI. Default: `false`.
|
|
1558
1526
|
*/
|
|
1559
1527
|
hide?: boolean;
|
|
1560
|
-
/**
|
|
1561
|
-
* Whether to allow users to create entries in the collection. Entry
|
|
1562
|
-
* collection only. Default: `false`.
|
|
1563
|
-
*/
|
|
1564
|
-
create?: boolean;
|
|
1565
|
-
/**
|
|
1566
|
-
* Whether to allow users to delete entries in the collection. Entry
|
|
1567
|
-
* collection only. Default: `true`.
|
|
1568
|
-
*/
|
|
1569
|
-
delete?: boolean;
|
|
1570
1528
|
/**
|
|
1571
1529
|
* Whether to show the publishing control UI for Editorial Workflow.
|
|
1572
1530
|
* Default: `true`.
|
|
1573
1531
|
*/
|
|
1574
1532
|
publish?: boolean;
|
|
1575
|
-
/**
|
|
1576
|
-
* File extension. Entry collection only. Default: `md`.
|
|
1577
|
-
*/
|
|
1578
|
-
extension?: FileExtension;
|
|
1579
1533
|
/**
|
|
1580
1534
|
* File format. It should match the file extension. Default:
|
|
1581
1535
|
* `yaml-frontmatter`.
|
|
@@ -1587,97 +1541,154 @@ export type Collection = {
|
|
|
1587
1541
|
*/
|
|
1588
1542
|
frontmatter_delimiter?: string | string[];
|
|
1589
1543
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
*
|
|
1595
|
-
|
|
1544
|
+
* I18n options. Default: `false`.
|
|
1545
|
+
*/
|
|
1546
|
+
i18n?: I18nOptions | boolean;
|
|
1547
|
+
/**
|
|
1548
|
+
* Preview URL path template.
|
|
1549
|
+
*/
|
|
1550
|
+
preview_path?: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Date field name used for `preview_path`.
|
|
1553
|
+
*/
|
|
1554
|
+
preview_path_date_field?: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* Editor view options.
|
|
1557
|
+
*/
|
|
1558
|
+
editor?: EditorOptions;
|
|
1559
|
+
/**
|
|
1560
|
+
* Whether to double-quote all the strings values if the YAML
|
|
1561
|
+
* format is used for file output. Default: `false`.
|
|
1562
|
+
* @deprecated Use the global YAML format options. `yaml_quote: true` is equivalent to `quote:
|
|
1563
|
+
* double`. See our README https://github.com/sveltia/sveltia-cms#controlling-data-output for
|
|
1564
|
+
* details.
|
|
1565
|
+
*/
|
|
1566
|
+
yaml_quote?: boolean;
|
|
1567
|
+
};
|
|
1568
|
+
/**
|
|
1569
|
+
* Entry collection properties.
|
|
1570
|
+
*/
|
|
1571
|
+
export type EntryCollectionProps = {
|
|
1572
|
+
/**
|
|
1573
|
+
* Base folder path relative to the project root.
|
|
1574
|
+
*/
|
|
1575
|
+
folder: string;
|
|
1576
|
+
/**
|
|
1577
|
+
* Set of fields to be included in entries.
|
|
1578
|
+
*/
|
|
1579
|
+
fields: Field[];
|
|
1580
|
+
/**
|
|
1581
|
+
* File path relative to `folder`, without a file extension.
|
|
1582
|
+
*/
|
|
1583
|
+
path?: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* Entry filter.
|
|
1586
|
+
*/
|
|
1587
|
+
filter?: CollectionFilter;
|
|
1588
|
+
/**
|
|
1589
|
+
* Whether to allow users to create entries in the collection. Default:
|
|
1590
|
+
* `false`.
|
|
1591
|
+
*/
|
|
1592
|
+
create?: boolean;
|
|
1593
|
+
/**
|
|
1594
|
+
* Whether to allow users to delete entries in the collection. Default:
|
|
1595
|
+
* `true`.
|
|
1596
|
+
*/
|
|
1597
|
+
delete?: boolean;
|
|
1598
|
+
/**
|
|
1599
|
+
* File extension. Default: `md`.
|
|
1600
|
+
*/
|
|
1601
|
+
extension?: FileExtension;
|
|
1602
|
+
/**
|
|
1603
|
+
* Field name to be used as the title and slug of an
|
|
1604
|
+
* entry. Default: `title`.
|
|
1605
|
+
*/
|
|
1606
|
+
identifier_field?: FieldKeyPath;
|
|
1607
|
+
/**
|
|
1608
|
+
* Item slug template. Default: `identifier_field` option value. It’s
|
|
1609
|
+
* possible to [localize the slug](https://github.com/sveltia/sveltia-cms#localizing-entry-slugs) or
|
|
1610
|
+
* [use a random ID](https://github.com/sveltia/sveltia-cms#using-a-random-id-for-an-entry-slug).
|
|
1611
|
+
* Also, it’s possible to show a special slug editor field in initial entry drafts by using
|
|
1612
|
+
* `{{fields._slug}}` (with an underscore prefix) or `{{fields._slug | localize}}` (to localize the
|
|
1613
|
+
* slug).
|
|
1596
1614
|
*/
|
|
1597
1615
|
slug?: string;
|
|
1598
1616
|
/**
|
|
1599
1617
|
* The maximum number of characters allowed for an entry slug.
|
|
1600
|
-
*
|
|
1618
|
+
* Default: `Infinity`.
|
|
1601
1619
|
*/
|
|
1602
1620
|
slug_length?: number;
|
|
1603
1621
|
/**
|
|
1604
|
-
* Entry summary template.
|
|
1605
|
-
* `identifier_field`.
|
|
1622
|
+
* Entry summary template. Default: `identifier_field`.
|
|
1606
1623
|
*/
|
|
1607
1624
|
summary?: string;
|
|
1608
1625
|
/**
|
|
1609
|
-
* Custom sortable fields.
|
|
1610
|
-
*
|
|
1611
|
-
*
|
|
1626
|
+
* Custom sortable fields. Default:
|
|
1627
|
+
* `title`, `name`, `date`, `author` and `description`. For a Git backend, commit author and commit
|
|
1628
|
+
* date are also included by default. See our
|
|
1612
1629
|
* [README](https://github.com/sveltia/sveltia-cms#specifying-default-sort-field-and-direction) for
|
|
1613
1630
|
* details.
|
|
1614
1631
|
*/
|
|
1615
1632
|
sortable_fields?: FieldKeyPath[] | SortableFields;
|
|
1616
1633
|
/**
|
|
1617
1634
|
* View filters to be used in the entry list.
|
|
1618
|
-
* Entry collection only.
|
|
1619
1635
|
*/
|
|
1620
1636
|
view_filters?: ViewFilter[] | ViewFilters;
|
|
1621
1637
|
/**
|
|
1622
1638
|
* View groups to be used in the entry list.
|
|
1623
|
-
* Entry collection only.
|
|
1624
1639
|
*/
|
|
1625
1640
|
view_groups?: ViewGroup[] | ViewGroups;
|
|
1626
1641
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
*/
|
|
1629
|
-
i18n?: I18nOptions | boolean;
|
|
1630
|
-
/**
|
|
1631
|
-
* Preview URL path template.
|
|
1632
|
-
*/
|
|
1633
|
-
preview_path?: string;
|
|
1634
|
-
/**
|
|
1635
|
-
* Date field name used for `preview_path`.
|
|
1636
|
-
*/
|
|
1637
|
-
preview_path_date_field?: string;
|
|
1638
|
-
/**
|
|
1639
|
-
* Editor view options.
|
|
1640
|
-
*/
|
|
1641
|
-
editor?: EditorOptions;
|
|
1642
|
-
/**
|
|
1643
|
-
* Options for a nested collection. Entry collection
|
|
1644
|
-
* only.
|
|
1642
|
+
* Options for a nested collection.
|
|
1645
1643
|
*/
|
|
1646
1644
|
nested?: NestedCollectionOptions;
|
|
1647
1645
|
/**
|
|
1648
|
-
* Meta data for a nested collection.
|
|
1646
|
+
* Meta data for a nested collection.
|
|
1649
1647
|
*/
|
|
1650
1648
|
meta?: CollectionMetaData;
|
|
1651
1649
|
/**
|
|
1652
|
-
* Index file inclusion options.
|
|
1653
|
-
*
|
|
1654
|
-
* special index file. See our
|
|
1650
|
+
* Index file inclusion options. If `true`,
|
|
1651
|
+
* the default index file name is `_index`, which is used for Hugo’s special index file. See our
|
|
1655
1652
|
* [README](https://github.com/sveltia/sveltia-cms#including-hugos-special-index-file-in-a-folder-collection)
|
|
1656
1653
|
* for details.
|
|
1657
1654
|
*/
|
|
1658
1655
|
index_file?: CollectionIndexFile | boolean;
|
|
1659
|
-
/**
|
|
1660
|
-
* Whether to double-quote all the strings values if the YAML
|
|
1661
|
-
* format is used for file output. Default: `false`.
|
|
1662
|
-
* @deprecated Use the global YAML format options. `yaml_quote: true` is equivalent to `quote:
|
|
1663
|
-
* double`. See our README https://github.com/sveltia/sveltia-cms#controlling-data-output for
|
|
1664
|
-
* details.
|
|
1665
|
-
*/
|
|
1666
|
-
yaml_quote?: boolean;
|
|
1667
1656
|
/**
|
|
1668
1657
|
* A field key path to be used to find an
|
|
1669
1658
|
* entry thumbnail displayed on the entry list. A nested field can be specified using dot notation,
|
|
1670
1659
|
* e.g. `heroImage.src`. A wildcard in the key path is also supported, e.g. `images.*.src`. Multiple
|
|
1671
1660
|
* key paths can be specified as an array for fallbacks. If this option is omitted, the `name` of
|
|
1672
|
-
* any non-nested, non-empty field using the Image or File widget is used.
|
|
1661
|
+
* any non-nested, non-empty field using the Image or File widget is used.
|
|
1673
1662
|
*/
|
|
1674
1663
|
thumbnail?: FieldKeyPath | FieldKeyPath[];
|
|
1675
1664
|
/**
|
|
1676
1665
|
* The maximum number of entries that can be created in the collection.
|
|
1677
|
-
*
|
|
1666
|
+
* Default: `Infinity`.
|
|
1678
1667
|
*/
|
|
1679
1668
|
limit?: number;
|
|
1680
1669
|
};
|
|
1670
|
+
/**
|
|
1671
|
+
* Entry collection definition. In Netlify/Decap CMS, an entry collection is called a folder
|
|
1672
|
+
* collection.
|
|
1673
|
+
*/
|
|
1674
|
+
export type EntryCollection = CommonCollectionProps & EntryCollectionProps;
|
|
1675
|
+
/**
|
|
1676
|
+
* File collection properties.
|
|
1677
|
+
*/
|
|
1678
|
+
export type FileCollectionProps = {
|
|
1679
|
+
/**
|
|
1680
|
+
* A set of files.
|
|
1681
|
+
*/
|
|
1682
|
+
files: CollectionFile[];
|
|
1683
|
+
};
|
|
1684
|
+
/**
|
|
1685
|
+
* File collection definition.
|
|
1686
|
+
*/
|
|
1687
|
+
export type FileCollection = CommonCollectionProps & FileCollectionProps;
|
|
1688
|
+
/**
|
|
1689
|
+
* Collection definition.
|
|
1690
|
+
*/
|
|
1691
|
+
export type Collection = EntryCollection | FileCollection;
|
|
1681
1692
|
/**
|
|
1682
1693
|
* Supported Git backend name.
|
|
1683
1694
|
*/
|
|
@@ -1716,109 +1727,207 @@ export type CommitMessages = {
|
|
|
1716
1727
|
openAuthoring?: string;
|
|
1717
1728
|
};
|
|
1718
1729
|
/**
|
|
1719
|
-
*
|
|
1730
|
+
* Git backend properties.
|
|
1720
1731
|
*/
|
|
1721
|
-
export type
|
|
1732
|
+
export type GitBackendProps = {
|
|
1722
1733
|
/**
|
|
1723
|
-
*
|
|
1734
|
+
* Git branch name. If omitted, the default branch, usually `main` or
|
|
1735
|
+
* `master`, will be automatically detected and used.
|
|
1724
1736
|
*/
|
|
1725
|
-
|
|
1737
|
+
branch?: string;
|
|
1726
1738
|
/**
|
|
1727
|
-
*
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1739
|
+
* Site domain used for OAuth, which will be included in the
|
|
1740
|
+
* `site_id` param to be sent to the API endpoint. Default: [current
|
|
1741
|
+
* hostname](https://developer.mozilla.org/en-US/docs/Web/API/Location/hostname) (or
|
|
1742
|
+
* `cms.netlify.com` on `localhost`).
|
|
1730
1743
|
*/
|
|
1731
|
-
|
|
1744
|
+
site_domain?: string;
|
|
1732
1745
|
/**
|
|
1733
|
-
*
|
|
1734
|
-
* `master`, will be used. Git backends only.
|
|
1746
|
+
* Custom commit messages.
|
|
1735
1747
|
*/
|
|
1736
|
-
|
|
1748
|
+
commit_messages?: CommitMessages;
|
|
1737
1749
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
*
|
|
1740
|
-
* `
|
|
1741
|
-
* `
|
|
1750
|
+
* Whether to enable or disable automatic deployments
|
|
1751
|
+
* with any connected CI/CD provider. Default: `undefined`.
|
|
1752
|
+
* @deprecated Use the new `skip_ci` option instead, which is more intuitive.
|
|
1753
|
+
* `automatic_deployments: false` is equivalent to `skip_ci: true`, and `automatic_deployments:
|
|
1754
|
+
* true` is equivalent to `skip_ci: false`. See our README
|
|
1755
|
+
* https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments for details.
|
|
1742
1756
|
*/
|
|
1743
|
-
|
|
1757
|
+
automatic_deployments?: boolean;
|
|
1744
1758
|
/**
|
|
1745
|
-
*
|
|
1746
|
-
*
|
|
1759
|
+
* Whether to enable or disable automatic deployments with any
|
|
1760
|
+
* connected CI/CD provider, such as GitHub Actions or Cloudflare Pages. If `true`, the `[skip ci]`
|
|
1761
|
+
* prefix will be added to commit messages. Default: `undefined`. See our
|
|
1762
|
+
* [README](https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments) for details.
|
|
1747
1763
|
*/
|
|
1748
|
-
|
|
1764
|
+
skip_ci?: boolean;
|
|
1765
|
+
};
|
|
1766
|
+
/**
|
|
1767
|
+
* GitHub backend properties.
|
|
1768
|
+
*/
|
|
1769
|
+
export type GitHubBackendProps = {
|
|
1749
1770
|
/**
|
|
1750
|
-
*
|
|
1751
|
-
* `site_id` param to be sent to the API endpoint. Git backends only. Default:
|
|
1752
|
-
* [`location.hostname`](https://developer.mozilla.org/en-US/docs/Web/API/Location/hostname).
|
|
1771
|
+
* Backend name.
|
|
1753
1772
|
*/
|
|
1754
|
-
|
|
1773
|
+
name: "github";
|
|
1774
|
+
/**
|
|
1775
|
+
* Repository identifier: organization/user name and repository name joined
|
|
1776
|
+
* by a slash, e.g. `owner/repo`.
|
|
1777
|
+
*/
|
|
1778
|
+
repo: string;
|
|
1779
|
+
/**
|
|
1780
|
+
* REST API endpoint for the backend. Required when using GitHub
|
|
1781
|
+
* Enterprise Server. Default: `https://api.github.com`.
|
|
1782
|
+
*/
|
|
1783
|
+
api_root?: string;
|
|
1755
1784
|
/**
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1758
|
-
|
|
1759
|
-
|
|
1785
|
+
* GraphQL API endpoint for the backend. Default: inferred
|
|
1786
|
+
* from `api_root` option value.
|
|
1787
|
+
*/
|
|
1788
|
+
graphql_api_root?: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* OAuth base URL origin. Required when using an OAuth client other
|
|
1791
|
+
* than Netlify, including [Sveltia CMS Authenticator](https://github.com/sveltia/sveltia-cms-auth).
|
|
1792
|
+
* Default: `https://api.netlify.com`.
|
|
1760
1793
|
*/
|
|
1761
1794
|
base_url?: string;
|
|
1762
1795
|
/**
|
|
1763
|
-
* OAuth base URL path.
|
|
1764
|
-
* (GitHub) or `oauth/authorize` (GitLab).
|
|
1796
|
+
* OAuth base URL path. Default: `auth`.
|
|
1765
1797
|
*/
|
|
1766
1798
|
auth_endpoint?: string;
|
|
1767
1799
|
/**
|
|
1768
|
-
*
|
|
1769
|
-
* `
|
|
1800
|
+
* Pull request label prefix for Editorial Workflow. Default:
|
|
1801
|
+
* `sveltia-cms/`.
|
|
1802
|
+
*/
|
|
1803
|
+
cms_label_prefix?: string;
|
|
1804
|
+
/**
|
|
1805
|
+
* Whether to use squash marge for Editorial Workflow. Default:
|
|
1806
|
+
* `false`.
|
|
1807
|
+
*/
|
|
1808
|
+
squash_merges?: boolean;
|
|
1809
|
+
/**
|
|
1810
|
+
* Deploy preview link context.
|
|
1811
|
+
*/
|
|
1812
|
+
preview_context?: string;
|
|
1813
|
+
/**
|
|
1814
|
+
* Whether to use Open Authoring. Default: `false`.
|
|
1815
|
+
*/
|
|
1816
|
+
open_authoring?: boolean;
|
|
1817
|
+
/**
|
|
1818
|
+
* Authentication scope for Open Authoring.
|
|
1819
|
+
*/
|
|
1820
|
+
auth_scope?: "repo" | "public_repo";
|
|
1821
|
+
};
|
|
1822
|
+
/**
|
|
1823
|
+
* GitHub backend.
|
|
1824
|
+
*/
|
|
1825
|
+
export type GitHubBackend = GitBackendProps & GitHubBackendProps;
|
|
1826
|
+
/**
|
|
1827
|
+
* GitLab backend properties.
|
|
1828
|
+
*/
|
|
1829
|
+
export type GitLabBackendProps = {
|
|
1830
|
+
/**
|
|
1831
|
+
* Backend name.
|
|
1832
|
+
*/
|
|
1833
|
+
name: "gitlab";
|
|
1834
|
+
/**
|
|
1835
|
+
* Repository identifier: namespace and project name joined by a slash, e.g.
|
|
1836
|
+
* `group/project` or `group/subgroup/project`.
|
|
1837
|
+
*/
|
|
1838
|
+
repo: string;
|
|
1839
|
+
/**
|
|
1840
|
+
* REST API endpoint for the backend. Required when using a
|
|
1841
|
+
* self-hosted GitLab instance. Default: `https://gitlab.com/api/v4`.
|
|
1842
|
+
*/
|
|
1843
|
+
api_root?: string;
|
|
1844
|
+
/**
|
|
1845
|
+
* GraphQL API endpoint for the backend. Default: inferred
|
|
1846
|
+
* from `api_root` option value.
|
|
1847
|
+
*/
|
|
1848
|
+
graphql_api_root?: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* OAuth base URL origin. Required when using an OAuth client other
|
|
1851
|
+
* than Netlify, including [Sveltia CMS Authenticator](https://github.com/sveltia/sveltia-cms-auth).
|
|
1852
|
+
* Default: `https://gitlab.com`.
|
|
1853
|
+
*/
|
|
1854
|
+
base_url?: string;
|
|
1855
|
+
/**
|
|
1856
|
+
* OAuth authorization method. Default: `pkce`.
|
|
1770
1857
|
*/
|
|
1771
1858
|
auth_type?: "pkce" | "implicit";
|
|
1772
1859
|
/**
|
|
1773
|
-
* OAuth
|
|
1774
|
-
|
|
1860
|
+
* OAuth base URL path. Default: `oauth/authorize`.
|
|
1861
|
+
*/
|
|
1862
|
+
auth_endpoint?: string;
|
|
1863
|
+
/**
|
|
1864
|
+
* OAuth application ID. Required when using PKCE authorization.
|
|
1775
1865
|
*/
|
|
1776
1866
|
app_id?: string;
|
|
1777
1867
|
/**
|
|
1778
|
-
*
|
|
1868
|
+
* Pull request label prefix for Editorial Workflow. Default:
|
|
1869
|
+
* `sveltia-cms/`.
|
|
1779
1870
|
*/
|
|
1780
|
-
|
|
1871
|
+
cms_label_prefix?: string;
|
|
1872
|
+
};
|
|
1873
|
+
/**
|
|
1874
|
+
* GitLab backend.
|
|
1875
|
+
*/
|
|
1876
|
+
export type GitLabBackend = GitBackendProps & GitLabBackendProps;
|
|
1877
|
+
/**
|
|
1878
|
+
* Gitea/Forgejo backend properties.
|
|
1879
|
+
*/
|
|
1880
|
+
export type GiteaBackendProps = {
|
|
1781
1881
|
/**
|
|
1782
|
-
*
|
|
1882
|
+
* Backend name.
|
|
1783
1883
|
*/
|
|
1784
|
-
|
|
1884
|
+
name: "gitea";
|
|
1785
1885
|
/**
|
|
1786
|
-
*
|
|
1787
|
-
*
|
|
1886
|
+
* Repository identifier: organization/user name and repository name joined
|
|
1887
|
+
* by a slash, e.g. `owner/repo`.
|
|
1788
1888
|
*/
|
|
1789
|
-
|
|
1889
|
+
repo: string;
|
|
1790
1890
|
/**
|
|
1791
|
-
*
|
|
1792
|
-
*
|
|
1891
|
+
* REST API endpoint for the backend. Required when using a
|
|
1892
|
+
* self-hosted Gitea/Forgejo instance. Default: `https://gitea.com/api/v1`.
|
|
1793
1893
|
*/
|
|
1794
|
-
|
|
1894
|
+
api_root?: string;
|
|
1795
1895
|
/**
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1896
|
+
* OAuth base URL origin. Required when using an OAuth client other
|
|
1897
|
+
* than Netlify, including [Sveltia CMS Authenticator](https://github.com/sveltia/sveltia-cms-auth).
|
|
1898
|
+
* Default: `https://gitea.com/`.
|
|
1798
1899
|
*/
|
|
1799
|
-
|
|
1900
|
+
base_url?: string;
|
|
1800
1901
|
/**
|
|
1801
|
-
*
|
|
1802
|
-
* backends only.
|
|
1902
|
+
* OAuth base URL path. Default: `login/oauth/authorize`.
|
|
1803
1903
|
*/
|
|
1804
|
-
|
|
1904
|
+
auth_endpoint?: string;
|
|
1805
1905
|
/**
|
|
1806
|
-
*
|
|
1807
|
-
* with any connected CI/CD provider. Default: `undefined`.
|
|
1808
|
-
* @deprecated Use the new `skip_ci` option instead, which is more intuitive.
|
|
1809
|
-
* `automatic_deployments: false` is equivalent to `skip_ci: true`, and `automatic_deployments:
|
|
1810
|
-
* true` is equivalent to `skip_ci: false`. See our README
|
|
1811
|
-
* https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments for details.
|
|
1906
|
+
* OAuth application ID.
|
|
1812
1907
|
*/
|
|
1813
|
-
|
|
1908
|
+
app_id: string;
|
|
1909
|
+
};
|
|
1910
|
+
/**
|
|
1911
|
+
* Gitea/Forgejo backend.
|
|
1912
|
+
*/
|
|
1913
|
+
export type GiteaBackend = GitBackendProps & GiteaBackendProps;
|
|
1914
|
+
/**
|
|
1915
|
+
* Git-based backend.
|
|
1916
|
+
*/
|
|
1917
|
+
export type GitBackend = GitHubBackend | GitLabBackend | GiteaBackend;
|
|
1918
|
+
/**
|
|
1919
|
+
* Test backend.
|
|
1920
|
+
*/
|
|
1921
|
+
export type TestBackend = {
|
|
1814
1922
|
/**
|
|
1815
|
-
*
|
|
1816
|
-
* connected CI/CD provider, such as GitHub Actions or Cloudflare Pages. If `true`, the `[skip ci]`
|
|
1817
|
-
* prefix will be added to commit messages. Git backends only. Default: `undefined`. See our
|
|
1818
|
-
* [README](https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments) for details.
|
|
1923
|
+
* Backend name.
|
|
1819
1924
|
*/
|
|
1820
|
-
|
|
1925
|
+
name: "test-repo";
|
|
1821
1926
|
};
|
|
1927
|
+
/**
|
|
1928
|
+
* Backend options.
|
|
1929
|
+
*/
|
|
1930
|
+
export type Backend = GitBackend | TestBackend;
|
|
1822
1931
|
/**
|
|
1823
1932
|
* Global media library options.
|
|
1824
1933
|
*/
|
|
@@ -1916,7 +2025,7 @@ export type SiteConfig = {
|
|
|
1916
2025
|
/**
|
|
1917
2026
|
* Backend options.
|
|
1918
2027
|
*/
|
|
1919
|
-
backend:
|
|
2028
|
+
backend: Backend;
|
|
1920
2029
|
/**
|
|
1921
2030
|
* Publish mode. An empty string is
|
|
1922
2031
|
* the same as `simple`. Default: `simple`.
|