Skip to content

Commit

Permalink
Added readability to build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbum committed Dec 14, 2023
1 parent 56599f9 commit 16f0dd7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = function (eleventyConfig) {
let output = [];
collection.getAll().forEach((item) => {
var url = item.url;
console.log("considering "+url);
// console.log("considering "+url);
if (url.match(/^\/((content-design|human-centered-design|product-management)\/)?[\w-]+\/$/)) {
var outputPath = url;
var inputPath = './docs/pages'+url;
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Build Site
run: |
npm install
npm run readability
npm run site:build
- name: Write robots.txt
Expand Down
2 changes: 1 addition & 1 deletion docs/site/_data/readability.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"/how-to-use/":{"readability":{"letterCount":1492,"syllableCount":484,"wordCount":301,"sentenceCount":35,"polysyllabicWordCount":47,"ari":6.22,"timestamp":1702531282281}},"/topic-index-sample-1/":{"readability":{"letterCount":1262,"syllableCount":408,"wordCount":253,"sentenceCount":27,"polysyllabicWordCount":33,"ari":6.75,"timestamp":1702531282281}},"/topic-index-sample-2/":{"readability":{"letterCount":52,"syllableCount":18,"wordCount":10,"sentenceCount":4,"polysyllabicWordCount":1,"ari":4.31,"timestamp":1702531282281}},"/content-design/principles/":{"readability":{"letterCount":353,"syllableCount":111,"wordCount":70,"sentenceCount":21,"polysyllabicWordCount":14,"ari":3.99,"timestamp":1702531282281}},"/human-centered-design/innovation-skills-accelerator/":{"readability":{"letterCount":538,"syllableCount":177,"wordCount":97,"sentenceCount":15,"polysyllabicWordCount":18,"ari":7.93,"timestamp":1702531282281}},"/product-management/run-of-show/":{"readability":{"letterCount":1043,"syllableCount":334,"wordCount":212,"sentenceCount":18,"polysyllabicWordCount":30,"ari":7.63,"timestamp":1702531282281}},"/footnotes/":{"readability":{"letterCount":116,"syllableCount":35,"wordCount":27,"sentenceCount":4,"polysyllabicWordCount":2,"ari":2.18,"timestamp":1702531282281}},"/front-matter/":{"readability":{"letterCount":324,"syllableCount":106,"wordCount":56,"sentenceCount":8,"polysyllabicWordCount":15,"ari":9.32,"timestamp":1702531282281}},"/guides/":{"readability":{"letterCount":11,"syllableCount":3,"wordCount":2,"sentenceCount":2,"polysyllabicWordCount":0,"ari":4.98,"timestamp":1702531282281}},"/markdown/":{"readability":{"letterCount":1956,"syllableCount":612,"wordCount":392,"sentenceCount":56,"polysyllabicWordCount":51,"ari":5.57,"timestamp":1702531282281}},"/page-score-info/":{"readability":{"letterCount":4599,"syllableCount":1477,"wordCount":923,"sentenceCount":102,"polysyllabicWordCount":139,"ari":6.56,"timestamp":1702531282281}},"/structure/":{"readability":{"letterCount":2298,"syllableCount":726,"wordCount":392,"sentenceCount":45,"polysyllabicWordCount":78,"ari":10.54,"timestamp":1702531282281}},"/typography/":{"readability":{"letterCount":2859,"syllableCount":676,"wordCount":731,"sentenceCount":52,"polysyllabicWordCount":83,"ari":4.02,"timestamp":1702531282281}},"/content-design/odi-style-guide/":{"readability":{"letterCount":16196,"syllableCount":5363,"wordCount":3377,"sentenceCount":406,"polysyllabicWordCount":525,"ari":5.32,"timestamp":1702531282281}},"/content-design/plain-language-equity-standard/":{"readability":{"letterCount":1069,"syllableCount":346,"wordCount":194,"sentenceCount":27,"polysyllabicWordCount":44,"ari":8.12,"timestamp":1702531282281}},"/content-design/plain-language-checklist/":{"readability":{"letterCount":1522,"syllableCount":499,"wordCount":313,"sentenceCount":25,"polysyllabicWordCount":48,"ari":7.73,"timestamp":1702531282281}},"/content-design/recommended-reading/":{"readability":{"letterCount":1171,"syllableCount":386,"wordCount":204,"sentenceCount":55,"polysyllabicWordCount":42,"ari":7.46,"timestamp":1702531282281}},"/product-management/product-craft-accessibility/":{"readability":{"letterCount":854,"syllableCount":285,"wordCount":161,"sentenceCount":28,"polysyllabicWordCount":39,"ari":6.43,"timestamp":1702531282281}},"/":{"readability":{"letterCount":608,"syllableCount":196,"wordCount":118,"sentenceCount":18,"polysyllabicWordCount":22,"ari":6.12,"timestamp":1702531282281}}}
{"/":{"readability":{"letterCount":608,"syllableCount":196,"wordCount":118,"sentenceCount":18,"polysyllabicWordCount":22,"ari":6.12,"timestamp":1702531973341}},"/footnotes/":{"readability":{"letterCount":116,"syllableCount":35,"wordCount":27,"sentenceCount":4,"polysyllabicWordCount":2,"ari":2.18,"timestamp":1702531973341}},"/front-matter/":{"readability":{"letterCount":324,"syllableCount":106,"wordCount":56,"sentenceCount":8,"polysyllabicWordCount":15,"ari":9.32,"timestamp":1702531973341}},"/guides/":{"readability":{"letterCount":11,"syllableCount":3,"wordCount":2,"sentenceCount":2,"polysyllabicWordCount":0,"ari":4.98,"timestamp":1702531973341}},"/how-to-use/":{"readability":{"letterCount":1492,"syllableCount":484,"wordCount":301,"sentenceCount":35,"polysyllabicWordCount":47,"ari":6.22,"timestamp":1702531973341}},"/markdown/":{"readability":{"letterCount":1956,"syllableCount":612,"wordCount":392,"sentenceCount":56,"polysyllabicWordCount":51,"ari":5.57,"timestamp":1702531973341}},"/page-score-info/":{"readability":{"letterCount":4599,"syllableCount":1477,"wordCount":923,"sentenceCount":102,"polysyllabicWordCount":139,"ari":6.56,"timestamp":1702531973341}},"/structure/":{"readability":{"letterCount":2298,"syllableCount":726,"wordCount":392,"sentenceCount":45,"polysyllabicWordCount":78,"ari":10.54,"timestamp":1702531973341}},"/topic-index-sample-1/":{"readability":{"letterCount":1262,"syllableCount":408,"wordCount":253,"sentenceCount":27,"polysyllabicWordCount":33,"ari":6.75,"timestamp":1702531973341}},"/topic-index-sample-2/":{"readability":{"letterCount":52,"syllableCount":18,"wordCount":10,"sentenceCount":4,"polysyllabicWordCount":1,"ari":4.31,"timestamp":1702531973341}},"/typography/":{"readability":{"letterCount":2859,"syllableCount":676,"wordCount":731,"sentenceCount":52,"polysyllabicWordCount":83,"ari":4.02,"timestamp":1702531973341}},"/human-centered-design/innovation-skills-accelerator/":{"readability":{"letterCount":538,"syllableCount":177,"wordCount":97,"sentenceCount":15,"polysyllabicWordCount":18,"ari":7.93,"timestamp":1702531973341}},"/product-management/product-craft-accessibility/":{"readability":{"letterCount":854,"syllableCount":285,"wordCount":161,"sentenceCount":28,"polysyllabicWordCount":39,"ari":6.43,"timestamp":1702531973341}},"/product-management/run-of-show/":{"readability":{"letterCount":1043,"syllableCount":334,"wordCount":212,"sentenceCount":18,"polysyllabicWordCount":30,"ari":7.63,"timestamp":1702531973341}},"/content-design/odi-style-guide/":{"readability":{"letterCount":16196,"syllableCount":5363,"wordCount":3377,"sentenceCount":406,"polysyllabicWordCount":525,"ari":5.32,"timestamp":1702531973341}},"/content-design/plain-language-checklist/":{"readability":{"letterCount":1522,"syllableCount":499,"wordCount":313,"sentenceCount":25,"polysyllabicWordCount":48,"ari":7.73,"timestamp":1702531973341}},"/content-design/plain-language-equity-standard/":{"readability":{"letterCount":1069,"syllableCount":346,"wordCount":194,"sentenceCount":27,"polysyllabicWordCount":44,"ari":8.12,"timestamp":1702531973341}},"/content-design/principles/":{"readability":{"letterCount":353,"syllableCount":111,"wordCount":70,"sentenceCount":21,"polysyllabicWordCount":14,"ari":3.99,"timestamp":1702531973341}},"/content-design/recommended-reading/":{"readability":{"letterCount":1171,"syllableCount":386,"wordCount":204,"sentenceCount":55,"polysyllabicWordCount":42,"ari":7.46,"timestamp":1702531973341}}}
2 changes: 1 addition & 1 deletion scoring/readability.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let pageList = JSON.parse(fs.readFileSync('./_site_dist/allFiles.json'));

let parScores = {};
let evaluationTime = new Date().getTime();

console.log("evaluating "+pageList.length+" pages for readability at "+evaluationTime);
pageList.forEach(page => {
let fileBody = fs.readFileSync(page.inputPath,'utf8');

Expand Down

0 comments on commit 16f0dd7

Please sign in to comment.