npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sveltecms

v0.0.50

Published

A content manager built with sveltekit, for sveltekit projects. Sensible and extensible, with declarative configuration.

Downloads

13

Readme

What is SvelteCMS?

SvelteCMS is an attempt at creating a new kind of Content Management System that builds fast SvelteKit websites with content models from a configurable CMS but doesn't require running a server or subscribing to a content SAAS. SvelteCMS...

  • [x] is software, not a product or service.
  • [x] runs as part of the site, not on a separate system.
  • [x] builds performant web apps, with minimal code on content pages, SSR and prerendering.[^1]
  • [x] builds sites that work without Javascript, so no more blank white screens.
  • [x] is database agnostic: store content in any server, repository, or database provider[^2].
  • [x] supports data portability: mix, match, and migrate content between storage solutions[^3].
  • [] supports community interaction: manage user accounts from install[^4].
  • [x] supports serverless architecture: deploy CMS endpoints to any serverless provider[^5].
  • [x] supports static site generation: build locally and deploy to any web host.
  • [x] works in the browser: go truly "serverless" with Web Containers or isomorphic git.
  • [x] supports complex content models: conditional, nested, and calculated fields.
  • [x] manages the full content cycle: entry, storage, retrieval and display.
  • [x] enables code-free site building: go from data architecture to display with no code.
  • [x] is extensible: extend CMS functionality with components, plugins and hooks.
  • [x] is free for any number of sites, users, content types, plugins, etc.

[^1]: Server-side rendering and prerendering work, and it is possible to produce static pages without javascript, but for the pages rendered client-side there is a lot of optimization still to be done. [^2]: Requires plugins. [^3]: Requires plugins. [^4]: Requires plugins and a new bit of API. [^5]: Theoretically any serverless host that supports SvelteKit should work with SvelteCMS.


Installation

You can create a new SvelteCMS project, including the SvelteKit setup, using npm:


> npm create sveltecms@latest
> npm run dev

Optional: Use TailwindCSS

SvelteCMS works very well with TailwindCSS (and likely with similar utility css frameworks like WindyCSS) for display of elements and ad-hoc styles in content. TailwindCSS can parse classes in the SvelteCMS config file and in locally stored content, but it needs to be told where to look for the files and how to recognize the classes. Luckily SvelteCMS comes with the proper functions already in the tailwind.config.cjs file. However, you still need to install and configure Tailwind and PostCSS:

  • Install Tailwind (and any plugins):

    You can either do this manually or with a svelte-add command, e.g. npx svelte-add@latest tailwindcss --tailwindcss-typography

  • Afterward, don't forget to run npm install!

Optional: Setup YAML for configuration

If you want to use YAML instead of JSON for storing SvelteCMS configuration, you will want to install and configure @rollup/plugin-yaml.

  • Install the plugin:
    npm install @rollup/plugin-yaml

  • Configure Vite to use the plugin in vite.config.js:

    import yaml from '@rollup/plugin-yaml'
    ...
    const config = {
        plugins: [
            ...
            yaml(),
        ]
    };
  • Configure SvelteCMS to use the correct file in src/lib/cms.ts:
    ~~import conf from './sveltecms.config.json'~~
    import conf from './sveltecms.config.yml'

  • Add type for .yml files in src/app.d.ts \

    declare global {
        // other stuff...
        module "*.yml" {
            const value: any;
            export default value;
        }
    }

Usage

You should have a new SvelteKit project with SvelteCMS included You will find SvelteCMS-specific files in the src/routes/(cms) folder.

For local development, you can start SvelteKit as you normally would:

npm run dev

...Why?

What is this? A center for ANTS!? It needs to be at least ... three times bigger!
- Derek Zoolander

SvelteCMS was made to demonstrate and jump-start my vision for what a Content Management System could be in 2023. I want to build fast modern websites with content models from a configurable CMS, but I don't want to run a server or subscribe to a paid SAAS API. Hopefully this helps to move things forward.