├── .gitignore ├── .template ├── README.md ├── src │ ├── app.css │ ├── cms │ │ └── _README.txt │ ├── lib │ │ ├── cms.ts │ │ ├── sveltecms.config.json │ │ └── sveltecms.config.yml │ └── routes │ │ ├── (cms) │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ ├── [...path] │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ └── admin │ │ │ ├── +layout@.svelte │ │ │ └── [...adminPath] │ │ │ ├── +page.server.ts │ │ │ ├── +page.svelte │ │ │ ├── +page.ts │ │ │ └── +server.ts │ │ └── +layout.svelte └── tailwind.config.cjs ├── README.md ├── dist ├── CMSAdmin.svelte ├── CMSAdmin.svelte.d.ts ├── CMSEditorForm.svelte ├── CMSEditorForm.svelte.d.ts ├── CMSField.svelte ├── CMSField.svelte.d.ts ├── CMSFieldGroup.svelte ├── CMSFieldGroup.svelte.d.ts ├── cli.d.ts ├── cli.js ├── core │ ├── AdminPage.d.ts │ ├── AdminPage.js │ ├── Component.d.ts │ ├── Component.js │ ├── ContentStore.d.ts │ ├── ContentStore.js │ ├── ContentType.d.ts │ ├── ContentType.js │ ├── Display.d.ts │ ├── Display.js │ ├── EntityTemplate.d.ts │ ├── EntityTemplate.js │ ├── Field.d.ts │ ├── Field.js │ ├── Fieldgroup.d.ts │ ├── Fieldgroup.js │ ├── Hook.d.ts │ ├── Hook.js │ ├── Indexer.d.ts │ ├── Indexer.js │ ├── MediaStore.d.ts │ ├── MediaStore.js │ ├── Plugin.d.ts │ ├── Plugin.js │ ├── ScriptFunction.d.ts │ ├── ScriptFunction.js │ ├── Slug.d.ts │ ├── Slug.js │ ├── Transformer.d.ts │ ├── Transformer.js │ ├── Validator.d.ts │ ├── Validator.js │ ├── Widget.d.ts │ └── Widget.js ├── display │ ├── ContentItem.svelte │ ├── ContentItem.svelte.d.ts │ ├── FieldList.svelte │ ├── FieldList.svelte.d.ts │ ├── FieldValue.svelte │ ├── FieldValue.svelte.d.ts │ ├── Wrapper.svelte │ ├── Wrapper.svelte.d.ts │ └── field │ │ ├── Date.svelte │ │ ├── Date.svelte.d.ts │ │ ├── Fieldgroup.svelte │ │ ├── Fieldgroup.svelte.d.ts │ │ ├── File.svelte │ │ ├── File.svelte.d.ts │ │ ├── Image.svelte │ │ ├── Image.svelte.d.ts │ │ ├── Reference.svelte │ │ └── Reference.svelte.d.ts ├── index.d.ts ├── index.js ├── manifest.d.ts ├── manifest.js ├── plugins │ ├── admin │ │ ├── components │ │ │ ├── CMSComponentList.svelte │ │ │ ├── CMSComponentList.svelte.d.ts │ │ │ ├── CMSComponentListOld.svelte │ │ │ ├── CMSComponentListOld.svelte.d.ts │ │ │ ├── CMSConfigDisplays.svelte │ │ │ ├── CMSConfigDisplays.svelte.d.ts │ │ │ ├── CMSConfigEntity.svelte │ │ │ ├── CMSConfigEntity.svelte.d.ts │ │ │ ├── CMSConfigEntityList.svelte │ │ │ ├── CMSConfigEntityList.svelte.d.ts │ │ │ ├── CMSConfigForm.svelte │ │ │ ├── CMSConfigForm.svelte.d.ts │ │ │ ├── CMSConfigSettings.svelte │ │ │ ├── CMSConfigSettings.svelte.d.ts │ │ │ ├── CMSContentEdit.svelte │ │ │ ├── CMSContentEdit.svelte.d.ts │ │ │ ├── CMSContentList.svelte │ │ │ ├── CMSContentList.svelte.d.ts │ │ │ ├── CMSContentTypeList.svelte │ │ │ ├── CMSContentTypeList.svelte.d.ts │ │ │ ├── index.d.ts │ │ │ └── index.js │ │ ├── index.d.ts │ │ ├── index.js │ │ └── widgets │ │ │ ├── CMSWidgetConfigurableEntity.svelte │ │ │ ├── CMSWidgetConfigurableEntity.svelte.d.ts │ │ │ ├── CMSWidgetDefaultValue.svelte │ │ │ ├── CMSWidgetDefaultValue.svelte.d.ts │ │ │ ├── CMSWidgetDisplayList.svelte │ │ │ ├── CMSWidgetDisplayList.svelte.d.ts │ │ │ ├── CMSWidgetEntity.svelte │ │ │ ├── CMSWidgetEntity.svelte.d.ts │ │ │ ├── CMSWidgetEntityList.svelte │ │ │ ├── CMSWidgetEntityList.svelte.d.ts │ │ │ ├── CMSWidgetEntityTypeField.svelte │ │ │ ├── CMSWidgetEntityTypeField.svelte.d.ts │ │ │ ├── CMSWidgetList.svelte │ │ │ └── CMSWidgetList.svelte.d.ts │ ├── audio │ │ ├── CMSWidgetAudio.svelte │ │ ├── CMSWidgetAudio.svelte.d.ts │ │ ├── CMSWidgetAudioPreview.svelte │ │ ├── CMSWidgetAudioPreview.svelte.d.ts │ │ ├── index.d.ts │ │ └── index.js │ ├── checkboxes │ │ ├── CheckboxText.svelte │ │ ├── CheckboxText.svelte.d.ts │ │ ├── index.d.ts │ │ └── index.js │ ├── defaultContent │ │ ├── index.d.ts │ │ └── index.js │ ├── firebaseFirestore │ │ ├── index.d.ts │ │ └── index.js │ ├── firebaseStorage │ │ ├── index.d.ts │ │ └── index.js │ ├── importContent │ │ ├── ImportContent.svelte │ │ ├── ImportContent.svelte.d.ts │ │ ├── index.d.ts │ │ └── index.js │ ├── markdown │ │ ├── index.d.ts │ │ └── index.js │ ├── math │ │ ├── index.d.ts │ │ └── index.js │ └── staticFiles │ │ ├── index.d.ts │ │ └── index.js ├── sveltecms-forms.css ├── ui │ ├── Button.svelte │ ├── Button.svelte.d.ts │ ├── ButtonConfirm.svelte │ ├── ButtonConfirm.svelte.d.ts │ ├── DisplayResult.svelte │ ├── DisplayResult.svelte.d.ts │ ├── EntityListSectionToggle.svelte │ ├── EntityListSectionToggle.svelte.d.ts │ ├── Modal.svelte │ ├── Modal.svelte.d.ts │ ├── Nav.svelte │ ├── Nav.svelte.d.ts │ ├── PowerTable.svelte │ └── PowerTable.svelte.d.ts ├── utils │ ├── config.d.ts │ ├── config.js │ ├── date.d.ts │ ├── date.js │ ├── endpoints.d.ts │ ├── endpoints.js │ ├── formDataHandler.d.ts │ ├── formDataHandler.js │ ├── getLabelFromID.d.ts │ ├── getLabelFromID.js │ ├── index.d.ts │ ├── index.js │ ├── list.d.ts │ ├── list.js │ ├── path.d.ts │ ├── path.js │ ├── reference.d.ts │ ├── reference.js │ ├── splitTags.d.ts │ └── splitTags.js └── widgets │ ├── CMSWidgetCheckbox.svelte │ ├── CMSWidgetCheckbox.svelte.d.ts │ ├── CMSWidgetDate.svelte │ ├── CMSWidgetDate.svelte.d.ts │ ├── CMSWidgetFieldgroup.svelte │ ├── CMSWidgetFieldgroup.svelte.d.ts │ ├── CMSWidgetFile.svelte │ ├── CMSWidgetFile.svelte.d.ts │ ├── CMSWidgetFilePreview.svelte │ ├── CMSWidgetFilePreview.svelte.d.ts │ ├── CMSWidgetImage.svelte │ ├── CMSWidgetImage.svelte.d.ts │ ├── CMSWidgetImagePreview.svelte │ ├── CMSWidgetImagePreview.svelte.d.ts │ ├── CMSWidgetMultiple.svelte │ ├── CMSWidgetMultiple.svelte.d.ts │ ├── CMSWidgetMultiselect.svelte │ ├── CMSWidgetMultiselect.svelte.d.ts │ ├── CMSWidgetNumber.svelte │ ├── CMSWidgetNumber.svelte.d.ts │ ├── CMSWidgetOptions.svelte │ ├── CMSWidgetOptions.svelte.d.ts │ ├── CMSWidgetRange.svelte │ ├── CMSWidgetRange.svelte.d.ts │ ├── CMSWidgetReference.svelte │ ├── CMSWidgetReference.svelte.d.ts │ ├── CMSWidgetSelect.svelte │ ├── CMSWidgetSelect.svelte.d.ts │ ├── CMSWidgetText.svelte │ ├── CMSWidgetText.svelte.d.ts │ ├── CMSWidgetTextarea.svelte │ ├── CMSWidgetTextarea.svelte.d.ts │ ├── CMSWidgetUndefined.svelte │ ├── CMSWidgetUndefined.svelte.d.ts │ ├── CMSWidgetValue.svelte │ ├── CMSWidgetValue.svelte.d.ts │ ├── MediaChooser.svelte │ ├── MediaChooser.svelte.d.ts │ ├── ScriptableButton.svelte │ └── ScriptableButton.svelte.d.ts ├── jest.config.cjs ├── package-lock.json ├── package.json ├── postcss.config.cjs ├── scripts ├── create-sveltecms │ ├── cli.js │ ├── index.js │ ├── package-lock.json │ ├── package.json │ └── types │ │ └── index.d.ts └── postpackage.js ├── src ├── app.css ├── app.html ├── cms │ ├── WrapperStackblitz.svelte │ ├── blockquote.svelte │ ├── content_blog.svelte │ ├── fieldgroup_frontslides.svelte │ └── fieldgroup_hero.svelte ├── content │ ├── __media.index.json │ ├── __media_usage.index.json │ ├── _blog.index.json │ ├── _docs.index.json │ ├── _landingPage.index.json │ ├── _page.index.json │ ├── _tags.index.json │ ├── _tutorials.index.json │ ├── blog │ │ ├── 2022-04-28-happy-birthday-svelte-cms.md │ │ └── 2022-08-05-references-tagging-and-hooks-oh-my.md │ ├── docs │ │ ├── core-concept.md │ │ ├── getting-started.md │ │ ├── introduction.md │ │ └── object-reference.md │ ├── landingPage │ │ └── front.json │ ├── tags │ │ ├── developers.md │ │ └── site-builders.md │ └── tutorials │ │ └── adding-a-custom-widget-type.md ├── install │ ├── +layout.svelte │ ├── README.md │ ├── _README.txt │ ├── app.css │ ├── cms.ts │ ├── sveltecms.config.json │ ├── sveltecms.config.yml │ └── tailwind.config.cjs ├── lib │ ├── CmsMenu.svelte │ ├── DocsContents.svelte │ ├── cms.ts │ ├── md.ts │ ├── stackblitz.ts │ └── sveltecms.config.yml ├── routes │ ├── (cms) │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ ├── [...path] │ │ │ ├── +layout.svelte │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ ├── admin │ │ │ ├── +layout@.svelte │ │ │ └── [...adminPath] │ │ │ │ ├── +page.server.ts │ │ │ │ ├── +page.svelte │ │ │ │ ├── +page.ts │ │ │ │ └── +server.ts │ │ └── docs │ │ │ ├── +layout.svelte │ │ │ ├── +page.svelte │ │ │ ├── default-displays │ │ │ └── +page.svelte │ │ │ ├── introduction │ │ │ ├── +page.server.ts │ │ │ └── +page.svelte │ │ │ ├── object-reference │ │ │ ├── +page.svelte │ │ │ ├── _items.ts │ │ │ └── _object-reference-table.svelte │ │ │ └── ui │ │ │ └── +page.svelte │ ├── +layout.svelte │ └── +layout.ts └── sveltecms │ ├── CMSAdmin.svelte │ ├── CMSEditorForm.svelte │ ├── CMSField.svelte │ ├── CMSFieldGroup.svelte │ ├── cli.ts │ ├── core │ ├── AdminPage.ts │ ├── Component.ts │ ├── ContentStore.ts │ ├── ContentType.ts │ ├── Display.ts │ ├── EntityTemplate.ts │ ├── Field.ts │ ├── Fieldgroup.ts │ ├── Hook.ts │ ├── Indexer.ts │ ├── MediaStore.ts │ ├── Plugin.ts │ ├── ScriptFunction.ts │ ├── Slug.ts │ ├── Transformer.ts │ ├── Validator.ts │ └── Widget.ts │ ├── display │ ├── ContentItem.svelte │ ├── FieldList.svelte │ ├── FieldValue.svelte │ ├── Wrapper.svelte │ └── field │ │ ├── Date.svelte │ │ ├── Fieldgroup.svelte │ │ ├── File.svelte │ │ ├── Image.svelte │ │ └── Reference.svelte │ ├── index.ts │ ├── manifest.js │ ├── plugins │ ├── admin │ │ ├── components │ │ │ ├── CMSComponentList.svelte │ │ │ ├── CMSComponentListOld.svelte │ │ │ ├── CMSConfigDisplays.svelte │ │ │ ├── CMSConfigEntity.svelte │ │ │ ├── CMSConfigEntityList.svelte │ │ │ ├── CMSConfigForm.svelte │ │ │ ├── CMSConfigSettings.svelte │ │ │ ├── CMSContentEdit.svelte │ │ │ ├── CMSContentList.svelte │ │ │ ├── CMSContentTypeList.svelte │ │ │ └── index.ts │ │ ├── index.ts │ │ └── widgets │ │ │ ├── CMSWidgetConfigurableEntity.svelte │ │ │ ├── CMSWidgetDefaultValue.svelte │ │ │ ├── CMSWidgetDisplayList.svelte │ │ │ ├── CMSWidgetEntity.svelte │ │ │ ├── CMSWidgetEntityList.svelte │ │ │ ├── CMSWidgetEntityTypeField.svelte │ │ │ └── CMSWidgetList.svelte │ ├── audio │ │ ├── CMSWidgetAudio.svelte │ │ ├── CMSWidgetAudioPreview.svelte │ │ └── index.ts │ ├── checkboxes │ │ ├── CheckboxText.svelte │ │ └── index.ts │ ├── defaultContent │ │ └── index.ts │ ├── firebaseFirestore │ │ └── index.ts │ ├── firebaseStorage │ │ └── index.ts │ ├── importContent │ │ ├── ImportContent.svelte │ │ └── index.ts │ ├── markdown │ │ └── index.ts │ ├── math │ │ └── index.ts │ └── staticFiles │ │ └── index.ts │ ├── sveltecms-forms.css │ ├── ui │ ├── Button.svelte │ ├── ButtonConfirm.svelte │ ├── DisplayResult.svelte │ ├── EntityListSectionToggle.svelte │ ├── Modal.svelte │ ├── Nav.svelte │ └── PowerTable.svelte │ ├── utils │ ├── config.ts │ ├── date.ts │ ├── endpoints.ts │ ├── formDataHandler.ts │ ├── getLabelFromID.ts │ ├── index.ts │ ├── list.ts │ ├── path.ts │ ├── reference.ts │ └── splitTags.ts │ └── widgets │ ├── CMSWidgetCheckbox.svelte │ ├── CMSWidgetDate.svelte │ ├── CMSWidgetFieldgroup.svelte │ ├── CMSWidgetFile.svelte │ ├── CMSWidgetFilePreview.svelte │ ├── CMSWidgetImage.svelte │ ├── CMSWidgetImagePreview.svelte │ ├── CMSWidgetMultiple.svelte │ ├── CMSWidgetMultiselect.svelte │ ├── CMSWidgetNumber.svelte │ ├── CMSWidgetOptions.svelte │ ├── CMSWidgetRange.svelte │ ├── CMSWidgetReference.svelte │ ├── CMSWidgetSelect.svelte │ ├── CMSWidgetText.svelte │ ├── CMSWidgetTextarea.svelte │ ├── CMSWidgetUndefined.svelte │ ├── CMSWidgetValue.svelte │ ├── MediaChooser.svelte │ └── ScriptableButton.svelte ├── static ├── favicon.png └── images │ ├── Birthday_cake.png │ ├── Screen Shot 2022-08-05 at 5.28.23 PM.png │ ├── icons │ ├── cash-banknote.png │ ├── checkbox-checked.svg │ ├── checkbox-indeterminate.svg │ ├── checkbox.svg │ ├── code.png │ ├── device-desktop.png │ ├── file-description.png │ ├── layout-board.png │ ├── photo.png │ ├── plug-connected.png │ └── server-2.png │ └── pexels-andrea-piacquadio-3861923.jpg ├── svelte.config.js ├── tailwind.config.cjs ├── test └── scriptParser.test.ts ├── tsconfig.json └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | .dccache 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | /temp 12 | -------------------------------------------------------------------------------- /.template/README.md: -------------------------------------------------------------------------------- 1 | # Welcome to SvelteKit and SvelteCMS! 2 | 3 | SvelteCMS is a new kind of CMS that runs in your browser or on serverless functions 4 | as part of your SvelteKit site. 5 | 6 | ## Installation 7 | 8 | 1. `npm create sveltecms` 9 | 10 | Since you're reading this file, you've probably already done this part. 11 | 12 | 2. `npm install` 13 | 14 | You have to do this before anything will work. :) 15 | 16 | 3. (optional) `npx svelte-add tailwindcss --tailwindcss-typography` 17 | 18 | Tailwind CSS cooperates really well with SvelteCMS; if you install it, 19 | you'll be able to use Tailwind classes in your Display configurations 20 | and content files, which is one way to make your pages look the way 21 | you want them to look. 22 | 23 | ## Usage 24 | 25 | 1. `npm run dev` 26 | 27 | You should be able to run your site immediately after installing everything. 28 | -------------------------------------------------------------------------------- /.template/src/app.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --bg-color: white; 3 | --text-color: #222; 4 | background: var(--bg-color); 5 | color: var(--text-color); 6 | } 7 | @media(prefers-color-scheme:dark) { 8 | :root { 9 | --bg-color: #222; 10 | --text-color: white; 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /.template/src/cms/_README.txt: -------------------------------------------------------------------------------- 1 | Any Svelte components in this folder can be used in Display configurations in the CMS. 2 | 3 | e.g. if in this folder you have a file named "Blockquote.svelte" then you will be able 4 | to use "Blockquote" as a Display configuration in the CMS. The names are case-sensitive. -------------------------------------------------------------------------------- /.template/src/lib/cms.ts: -------------------------------------------------------------------------------- 1 | import CMS from 'sveltecms' 2 | import conf from './sveltecms.config.json' 3 | import markdownPlugin from 'sveltecms/plugins/markdown' 4 | import defaultContent from 'sveltecms/plugins/defaultContent' 5 | 6 | const cms = new CMS(conf, [ 7 | markdownPlugin(), 8 | defaultContent 9 | ]) 10 | 11 | export default cms 12 | -------------------------------------------------------------------------------- /.template/src/lib/sveltecms.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configPath": "src/lib/sveltecms.config.json" 3 | } -------------------------------------------------------------------------------- /.template/src/lib/sveltecms.config.yml: -------------------------------------------------------------------------------- 1 | configPath: src/lib/sveltecms.config.yml 2 | -------------------------------------------------------------------------------- /.template/src/routes/(cms)/+layout.svelte: -------------------------------------------------------------------------------- 1 |
cms.use(adminPlugin)
?
49 | {/each}
50 |