Add Content

sveltin add content

Add new content to an existing resource.

Synopsis

Command used to create a new markdown file as content and a folder to store the statics used by the content itself.

New file can contain just the frontmatter or a sample content. Use the –template flag to select the right one to you. Valid options: blank or sample

Note: This command needs an existing resource created by running: sveltin new resource .

Example:

  1. You have already created some resource by running
    $ sveltin new resource
  2. run:
    $ sveltin add content welcome --to posts

As result:

  • a new “welcome” folder within “content/posts” is created
  • an index.svx file is placed there
  • a new “posts/welcome” folder created within the “static” folder to store images relative to the content

Usage

sveltin add content [name] [flags]

Aliases

content, c

Flags

  -h, --help        help for content
  -s, --sample      Add sample content to the markdown file
  -t, --to string   Name of the resource the new content is belongs to

SEE ALSO

Last updated: 07-Feb-2023

Apache 2.0 License @ 2021-present Sveltin.io and contributors .

The Sveltin logos are copyright © Mirco Veltri.