0.4.2 • Published 6 months ago

codefolio v0.4.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Codefolio

logo

Codefolio is a basic portfolio object builder for your projects.

Features

  • Follow simple conventions to produce a standard Portfolio object from a Markdown Readme.
  • Or bring your own conventions, and just use Codefolio to produce standard Portfolio objects.

For example, given this markdown in a README.md file:

# Hi I'm a level one heading

![img](./img.png)

Here's the body!

When passed into Codefolio:

const codefolio = require('codefolio');


const portfolios = await codefolio.promisePortfolios(['README.md']);

Produces a Portfolio object like this:

{
  body: "# Hi I'm a level one heading\n\nHere's the body!",
  image: {
    url: "./img.png",
    alt: "img",
    title: "img"
  },
  examples: []
}

Installation

npm install --save-dev codefolio

Example Usage

Codefolio has a convention for reading a basic body and image from a project's README.md (or README.markdown, README):

  • The first level one heading (# Hi I'm a level one heading) is where the body of the portfolio begins.
  • The text after that heading is the body, until the next level one heading is hit - not including any images.
  • The first image before the second level one heading in the document is considered the main image for the project.
  • All other images before the second level are used as example images.

If following this convention, given this markdown in a README.md file:

# Hi I'm a level one heading

![img](./img.png)

Here's the body!

When passed into Codefolio:

const codefolio = require('codefolio');


const portfolios = await codefolio.promisePortfolios(['README.md']);

Produces a Portfolio object like this:

{
  body: "# Hi I'm a level one heading\n\nHere's the body!",
  image: {
    url: "./img.png",
    alt: "img",
    title: "img"
  },
  examples: []
}

Contributing

Contributions to Codefolio are welcome. All pull requests must pass the automatic checks - and must be approved by the maintainer of the project. Please file issues and make feature requests through the issues UI at Github.

0.3.0

7 months ago

0.2.7

7 months ago

0.4.1

6 months ago

0.4.0

6 months ago

0.4.2

6 months ago

0.2.1

4 years ago

0.2.6

4 years ago

0.2.3

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago