astro-paper-new-article

0.4.0 • Public • Published

astro-paper-new-article

Scaffold new blog post for Astro-based blog using theme Astro Paper.

Installation

In your blog project, install package using npm:

npm install astro-paper-new-article --save-dev

Configuration

Scaffolding uses custom configuration in root-level package.json. Add the following configuration block:

"astroNewArticle": {
  "blogPath": "src/content/blog",
  "contentPath": "src/assets",
  "contentSubDirectory": "slug",
  "author": "Demo Writer",
  "defaultOgImage": "http://[domain-here]/demo.jpg",
  "proposedTags": [
    "Azure",
    "AWS",
    "Node.js",
    "Python",
    "serverless"
  ]
}

Parameters:

  • blogPath: Path to markdown files for blog (this should not require changes).
  • contentPath: Path to local images etc. for blog articles (this should not require changes). Scaffolding will create a directory in here, defaulting to date (see below parameter)
  • contentSubDirectory: date or slug. Option date will create 2023-04-08 and slug will use the article name slug as directory name (e.g. "Demo article" > demo-article).
  • author: Author's name.
  • defaultOgImage: Default OG image to be used.
  • proposedTags: Which tags are selectable while scaffolding.

Most of these will affect to generated frontmatter.

Usage

After installing the package and adding the required configuration, on the project root-level run & follow the prompt:

npx new-article

Optionally you can add this also to scripts in package.json, for example "new": "new-article". Then you can run npm run new.

Changelog

CHANGELOG

MIT License. Copyright janik6n.

Dependents (0)

Package Sidebar

Install

npm i astro-paper-new-article

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

8.78 kB

Total Files

4

Last publish

Collaborators

  • janik6n