Coder Social home page Coder Social logo

naderbhrr / fiddly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saravieira/fiddly

0.0 0.0 0.0 1.92 MB

Create beautiful and simple HTML pages from your Readme.md files

Home Page: https://fiddly.netlify.com

License: MIT License

JavaScript 55.12% CSS 44.88%

fiddly's Introduction

Fiddly

Create beautiful and simple HTML pages from your Readme.md files

  • πŸ›  No config
  • πŸ‘©β€πŸ’» Code Highlighting
  • πŸ’―Emoji Support
  • ✨Creates Static files (only JS is prism)
  • πŸ³οΈβ€πŸŒˆ Pretty Pages
  • πŸ¦„ Customizable
  • πŸ–Ό Image minification
  • πŸ‡³πŸ‡± CodeSandbox and iframe Support
yarn add fiddly --dev
npm install fiddly --save-dev

Usage

{
  ...
  "scripts": {
    "build:demo": "fiddly",
    ....
  }

Deploy automatically to netlify πŸŽ‰

This Readme on Netlify

This Readme with white theme

Usage with npx

If you just want a quick fancy HTML page from the Readme but don't care about running this in continuous deployment you can also use npx to run it as a one time thing.

  npx fiddly

By running this in the root folder you will also get a public folder

Options

Options are placed in a .fiddly.config.json or as a fiddly key in package.json. It can contain the following options:

Option Default Description
file Readme.md, readme.md, or README.md Your Readme.md name
name name in package.json The project name that is in the title and the header
logo '' The project logo that is in the header
shareCard '' URL to social media preview image for meta tags (recommended size: 1200x628, URL cannot be relative)
description description in package.json The project description for meta tags
homepage null The project homepage for meta tags
noHeader false Show no header and just the markdown content
darkTheme false Dark theme ofc πŸŽ‰
favicon '' Favicon url or local path
dist public To what folder to render your HTML
styles {} Styles to apply to the page. Object or path to css/scss file
additionalFiles [] Any other pages to create. It expects an array of paths of markdown files
repo null Link to point the github corner
pathPrefix Environment var PATH_PREFIX or '/' Host your fiddly files at e.g. /my-fiddly-project
deployment {} Deployment options for github pages. Accepts all options here

Example of styles

For styles you can either use a style object like so and that will override the default styles applied. Like so:

{
  "styles": {
    "h1": {
      "color": "blue",
      "backgroundColor": "red"
    }
  }
}

Another option is to give the path to a local css or scss file. In this case you need to override any specificity issues. You can by using the #fiddly id. Example:

body {
  background: #fff;
}

#fiddly {
  h1 {
    text-transform: uppercase;
  }
}

Images

Any images linked in your markdown that are local will be minified and copied to your dist folder. If some image is not found it will be ignored.

GitHub Corner

The GitHub corner comes from either the repo option in your .fiddly.config.json or from the repository url in your package.json. If none is present it will not be shown.

Lint

Fiddly also exports a command to let you lint all the markdown files you specified.

You can run this by using the lint command

"lint:md" : "fiddly lint"

Deploy

Fiddly also exports a command to let you deploy your new site to GitHub pages

You can run this by using the deploy command

"deploy" : "fiddly deploy"

Options for this can be passed in a deployment key in your config file. All options can be found here: https://github.com/tschaub/gh-pages#options

Acknowledgements

Contributors


Sara Vieira

πŸ’» 🎨 πŸ€”

Bruno Scheufler

πŸ’»

Siddharth Kshetrapal

πŸ’»

Jamon Holmgren

πŸ’»

Timothy

πŸ’»

Andrew Cherniavskii

πŸ’»

timkolberger

πŸ’»

License

MIT - see LICENSE

fiddly's People

Contributors

saravieira avatar timothyis avatar cherniavskii avatar m0nica avatar timkolberger avatar brunoscheufler avatar saeris avatar eduplessis avatar jamonholmgren avatar sw-saturn avatar siddharthkp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.