Skip to content

Commit

Permalink
Add documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Dec 15, 2017
1 parent 2edb17c commit 2bb6933
Show file tree
Hide file tree
Showing 14 changed files with 1,349 additions and 3 deletions.
Empty file added .nojekyll
Empty file.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# metascraper
<h1>
<br>
<img src="/static/logo-banner.png" alt="metascraper">
<br>
<br>
</h1>

![Last version](https://img.shields.io/github/tag/microlinkhq/metascraper.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/microlinkhq/metascraper/master.svg?style=flat-square)](https://travis-ci.org/microlinkhq/metascraper)
Expand Down Expand Up @@ -92,7 +97,7 @@ Here is a list of the metadata that **metascraper** collects by default:
- **`image`** — eg. `https://assets.entrepreneur.com/content/3x2/1300/20160504155601-GettyImages-174457162.jpeg`<br/>
An image URL that best represents the article.

- **`logo`** — eg. `https://entrepreneur.com/favicon180x180.png`<br/>
- **`logo`** — eg. `https://entrepreneur.com/favicon180x180.png`<br/>
An image URL that best represents the publisher brand.

- **`publisher`** — eg. `Fast Company`<br/>
Expand All @@ -106,7 +111,7 @@ Here is a list of the metadata that **metascraper** collects by default:

## Customization

>? Configuration file follow the same approach than projects like Babel or Prettier.
?> Configuration file follow the same approach than projects like Babel or Prettier.

**metascraper** is built out of plugins.

Expand Down
47 changes: 47 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
'use strict'

const strip = require('gulp-strip-css-comments')
const prefix = require('gulp-autoprefixer')
const cssnano = require('gulp-cssnano')
const uglify = require('gulp-uglify')
const concat = require('gulp-concat')
const gulp = require('gulp')

const src = {
css: ['src/css/style.css'],
js: ['src/js/main.js']
}

const dist = {
path: 'static',
name: {
css: 'style',
js: 'main'
}
}

gulp.task('css', () => {
gulp
.src(src.css)
.pipe(concat(`${dist.name.css}.min.css`))
.pipe(prefix())
.pipe(strip({ all: true }))
.pipe(cssnano())
.pipe(gulp.dest(dist.path))
})

gulp.task('js', () => {
gulp
.src(src.js)
.pipe(concat(`${dist.name.js}.min.js`))
.pipe(uglify())
.pipe(gulp.dest(dist.path))
})

gulp.task('build', ['css', 'js'])

gulp.task('default', () => {
gulp.start(['build'])
gulp.watch(src.css, ['css'])
gulp.watch(src.js, ['js'])
})
64 changes: 64 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">

<head>
<!-- Basic -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">

<!-- Search Engine -->
<meta name="description" content="easily scrape metadata from an article on the web.">
<meta name="image" content="https://metascraper.js.org/preview.png">
<link rel="canonical" href="https://metascraper.js.org" />
<title>metascraper, easily scrape metadata from an article on the web.</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">

<!-- Schema.org for Google -->
<meta itemprop="name" content="metascraper, easily scrape metadata from an article on the web.">
<meta itemprop="description" content="easily scrape metadata from an article on the web.">
<meta itemprop="image" content="https://metascraper.js.org/preview.png">

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="metascraper, easily scrape metadata from an article on the web.">
<meta name="twitter:description" content="easily scrape metadata from an article on the web.">
<meta name="twitter:image" content="https://metascraper.js.org/preview.png">
<!-- Open Graph general (Facebook, Pinterest & Google+) -->
<meta name="og:title" content="metascraper, easily scrape metadata from an article on the web.">
<meta name="og:description" content="easily scrape metadata from an article on the web.">
<meta name="og:image" content="https://metascraper.js.org/preview.png">
<meta name="og:url" content="https://metascraper.js.org">
<meta name="og:site_name" content="metascraper, easily scrape metadata from an article on the web.">
<meta name="og:type" content="website">

<!-- Favicon -->
<link rel="icon" type="image/png" href="/static/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="/static/favicon-16x16.png" sizes="16x16" />

<!-- Stylesheet -->
<link href="https://fonts.googleapis.com/css?family=Bitter|Source+Sans+Pro" rel="stylesheet">
<link rel="stylesheet" href="/static/style.min.css">

</head>

<body>
<div id="app"></div>
</body>
<script src="/static/main.min.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/external-script.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-jsx.min.js"></script>
<script src="//unpkg.com/microlinkjs@latest"></script>
<script>
window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
microlink('.demo-link', {
rounded: true
})
}, 250)
})
</script>

</html>
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "metascraper-core",
"private": true,
"devDependencies": {
"gulp": "latest",
"gulp-autoprefixer": "latest",
"gulp-concat": "latest",
"gulp-cssnano": "latest",
"gulp-strip-css-comments": "latest",
"gulp-uglify": "latest",
"eachdir": "latest",
"git-dirty": "latest",
"got": "latest",
Expand All @@ -23,6 +29,7 @@
"node": ">= 8"
},
"scripts": {
"dev": "gulp",
"postinstall": "lerna bootstrap && lerna link --force-local",
"clean": "rm -rf node_modules && cd packages && eachdir rm -rf node_modules",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
Expand Down
Loading

0 comments on commit 2bb6933

Please sign in to comment.