forked from segmentio/segment-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xavier Agostini
authored
Dec 6, 2019
1 parent
9260e52
commit f2c8c6e
Showing
14 changed files
with
4,354 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"plugins": [ | ||
"remark-preset-lint-recommended", | ||
["remark-lint-list-item-indent", "space"], | ||
["remark-lint-list-item-bullet-indent", "space"], | ||
["remark-lint-no-literal-urls", false] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,11 @@ | |
"author": "Jeff Knight <[email protected]>", | ||
"license": "UNLICENSED", | ||
"private": true, | ||
"remarkConfig": { | ||
"plugins": [ | ||
"remark-preset-lint-recommended" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "7.6.0", | ||
"@babel/core": "7.6.0", | ||
|
@@ -18,9 +23,17 @@ | |
"front-matter": "3.0.2", | ||
"glob": "7.1.4", | ||
"js-yaml": "3.13.1", | ||
"markdown-link-extractor": "^1.2.2", | ||
"markdown-spellcheck": "^1.3.1", | ||
"remark": "^11.0.2", | ||
"remark-cli": "^7.0.1", | ||
"remark-lint": "^6.0.5", | ||
"remark-preset-lint-markdown-style-guide": "^2.1.3", | ||
"remark-preset-lint-recommended": "^3.0.3", | ||
"superagent": "5.1.0", | ||
"webpack": "4.40.2", | ||
"webpack-cli": "3.3.9" | ||
"webpack-cli": "3.3.9", | ||
"yaml-lint": "^1.2.4" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "7.7.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const fs = require('fs') | ||
const glob = require('glob') | ||
const markdownLinkExtractor = require('markdown-link-extractor') | ||
|
||
// Find all external links in our docs | ||
const files = glob.sync('src/**/*.md') | ||
const externalLinkPattern = /^https?\:\/\/(?!segment)/ | ||
files.reduce((accum, file) => { | ||
let markdown = fs.readFileSync(file, 'utf8').toString() | ||
const links = markdownLinkExtractor(markdown) | ||
links.forEach(function (link) { | ||
if (externalLinkPattern.test(link)) console.log(link) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# used for validating external links from docs | ||
|
||
list=$(node tests/externalLinks/getExternalLinks.js) | ||
|
||
check_link () { | ||
output=`curl -sS -H -v -o /dev/null -IL -w "%{http_code}" $1` | ||
if [ "$output" != "200" ]; then | ||
echo $1 $output | ||
fi | ||
} | ||
|
||
echo "Testing redirects..." | ||
while read -r p; do | ||
check_link $p & | ||
done <<< "$list" | ||
|
||
wait | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const fs = require('fs') | ||
const glob = require('glob') | ||
|
||
// Find all external links in our docs | ||
const images = glob.sync('src/**/images/*') | ||
var imageSizeArr = [] | ||
let i = 0 | ||
images.reduce((accum, image) => { | ||
let stats = fs.statSync(image) | ||
let fileSizeInBytes = stats["size"] | ||
// console.log(image, fileSizeInBytes) | ||
imageSizeArr.push({image, fileSizeInBytes}) | ||
i++ | ||
}) | ||
|
||
|
||
imageSizeArr = imageSizeArr.sort(function (a, b) { | ||
return a.fileSizeInBytes - b.fileSizeInBytes; | ||
}); | ||
|
||
console.log('Total Number of Images:', i) | ||
console.log('Top 10 Largest Images (MB)') | ||
const top10Images = imageSizeArr.slice(imageSizeArr.length-10,imageSizeArr.length) | ||
top10Images.reduce((accum, image) => { | ||
console.log(`${image.image}: ${image.fileSizeInBytes/1000000} MB`) | ||
}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,25 +5,14 @@ | |
/docs/connections/destinations/catalog/iron.io/ | ||
/docs/connections/destinations/catalog/keen-io | ||
/docs/connections/destinations/catalog/keen-io/ | ||
/docs/connections/destinations/catalog/optimizely-full-stack/index.md | ||
/docs/connections/destinations/catalog/optimizely/ | ||
/docs/connections/destinations/catalog/optimizelyx/ | ||
/docs/connections/destinations/catalog/optimizelyx/index.md | ||
/docs/connections/destinations/catalog/promoter.io/ | ||
/docs/connections/destinations/catalog/survicate/[email protected] | ||
/docs/connections/destinations/catalog/trak.io/ | ||
/docs/connections/destinations/catalog/tray.io/ | ||
/docs/connections/destinations/catalog/webengage/[email protected] | ||
/docs/connections/sources/catalog/cloud-apps/aircall/[email protected] | ||
/docs/connections/sources/catalog/cloud-apps/appboy/ | ||
/docs/connections/sources/catalog/cloud-apps/delighted/[email protected] | ||
/docs/connections/sources/catalog/libraries/mobile/ios/install-the-sdk | ||
/docs/connections/sources/catalog/libraries/server | ||
/docs/connections/sources/catalog/libraries/website/analytics.js | ||
/docs/connections/sources/catalog/libraries/website/cross-domain | ||
/docs/connections/sources/catalog/libraries/website/pixel/ | ||
/docs/connections/sources/catalog/libraries/website/plugins/ | ||
/docs/connections/sources/catalog/libraries/website/tracking-api | ||
/docs/connections/sources/catalog/mobile/android/quickstart/ | ||
/docs/connections/sources/catalog/mobile/ios/quickstart/ | ||
/docs/connections/sources/catalog/server/go/quickstart/ | ||
|
@@ -34,9 +23,7 @@ | |
/docs/connections/sources/catalog/server/python/quickstart/ | ||
/docs/connections/sources/catalog/server/ruby/quickstart/ | ||
/docs/connections/sources/catalog/server/rust/quickstart/ | ||
/docs/connections/sources/custom/ | ||
/docs/connections/sources/iterable/ | ||
/docs/connections/spec/reset/ | ||
/docs/connections/warehouses/add-users/ | ||
/docs/connections/warehouses/catalog/azuresqldb/ | ||
/docs/connections/warehouses/warehouse-faqs/ | ||
|
@@ -61,7 +48,6 @@ | |
/docs/destinations/radiumone-connect | ||
/docs/destinations/spinnakr | ||
/docs/destinations/stitch-data | ||
/docs/destinations/survicate/[email protected] | ||
/docs/destinations/tapstream | ||
/docs/destinations/trak.io/ | ||
/docs/destinations/xplenty | ||
|
@@ -95,24 +81,17 @@ | |
/docs/guides/warehouses/source-slug/ | ||
/docs/guides/warehouses/whitelist-ip-addresses | ||
/docs/guides/warehouses/whitelist-ip-addresses/ | ||
/docs/integrations/autosend/ | ||
/docs/integrations/chartio/ | ||
/docs/integrations/customer.io/ | ||
/docs/integrations/freshdesk/ | ||
/docs/integrations/keen-io/ | ||
/docs/integrations/knowtify/ | ||
/docs/integrations/looker/ | ||
/docs/integrations/marketo/ | ||
/docs/integrations/mode/ | ||
/docs/integrations/mojn/ | ||
/docs/integrations/periscope.io/ | ||
/docs/integrations/tableau/ | ||
/docs/legal/[email protected] | ||
/docs/personas/trait-and-audience-building/ | ||
/docs/asdfasdfasdf/asdf | ||
/docs/protcols/ecommerce-tracking-plan/ | ||
/docs/segment.com | ||
/docs/sources/cloud-apps/aircall/[email protected] | ||
/docs/sources/cloud-apps/delighted/[email protected] | ||
/docs/sources/website/guides/ | ||
/docs/sources/website/guides/magento | ||
/docs/sources/website/guides/magento/ | ||
|
Oops, something went wrong.