feat: get footer from cdn (#47174)

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: scissorsneedfoodtoo <scissorsneedfoodtoo@gmail.com>
This commit is contained in:
Tom
2022-12-01 08:23:17 -06:00
committed by GitHub
parent 2325cc5ee9
commit 60d15e4631
19 changed files with 1926 additions and 6916 deletions

1
.gitignore vendored
View File

@@ -211,6 +211,7 @@ curriculum/build
client/static/_redirects
client/static/mobile
client/static/curriculum-data
client/i18n/locales/**/trending.json
### UI Components ###
tools/ui-components/dist

View File

@@ -1,6 +1,7 @@
**/.cache
**/public
client/static
client/**/trending.json
**/*fixtures*
curriculum/challenges/_meta/*/*
curriculum/challenges/**/*

View File

@@ -11,9 +11,6 @@ const filesThatShouldExist = [
{
name: 'motivation.json'
},
{
name: 'trending.json'
},
{
name: 'intro.json'
},

View File

@@ -1,62 +0,0 @@
{
"article0title": "Learn JavaScript",
"article0link": "https://www.freecodecamp.org/news/learn-javascript-free-js-courses-for-beginners/",
"article1title": "Linux ln Example",
"article1link": "https://www.freecodecamp.org/news/linux-ln-how-to-create-a-symbolic-link-in-linux-example-bash-command",
"article2title": "JS document.ready()",
"article2link": "https://www.freecodecamp.org/news/javascript-document-ready-jquery-example/",
"article3title": "Delete a Row in SQL",
"article3link": "https://www.freecodecamp.org/news/how-to-delete-a-row-in-sql-example-query/",
"article4title": "Python Round to Int",
"article4link": "https://www.freecodecamp.org/news/how-to-round-numbers-up-or-down-in-python/",
"article5title": "What is msmpeng.exe?",
"article5link": "https://www.freecodecamp.org/news/what-is-antimalware-service-executable-why-is-it-high-cpu-disk-usage/",
"article6title": "Queue Data Structure",
"article6link": "https://www.freecodecamp.org/news/queue-data-structure-definition-and-java-example-code/",
"article7title": "Learn Web Development",
"article7link": "https://www.freecodecamp.org/news/learn-web-development-free-full-stack-developer-courses-for-beginners/",
"article8title": "Install Node on Windows",
"article8link": "https://www.freecodecamp.org/news/how-to-install-node-js-and-npm-on-windows-2/",
"article9title": "Remove Char from String",
"article9link": "https://www.freecodecamp.org/news/python-remove-character-from-a-string-how-to-delete-characters-from-strings/",
"article10title": "Rust Lang",
"article10link": "https://www.freecodecamp.org/news/rust-in-replit/",
"article11title": "Python Sets",
"article11link": "https://www.freecodecamp.org/news/python-set-operations-explained-with-examples/",
"article12title": "C++ Strings",
"article12link": "https://www.freecodecamp.org/news/c-string-std-string-example-in-cpp/",
"article13title": "Python map()",
"article13link": "https://www.freecodecamp.org/news/python-map-explained-with-examples/",
"article14title": "Python .pop()",
"article14link": "https://www.freecodecamp.org/news/python-pop-how-to-pop-from-a-list-or-an-array-in-python/",
"article15title": "Python arrays",
"article15link": "https://www.freecodecamp.org/news/python-array-tutorial-define-index-methods/",
"article16title": "npm Uninstall",
"article16link": "https://www.freecodecamp.org/news/npm-uninstall-how-to-remove-a-package/",
"article17title": "Insertion Sort",
"article17link": "https://www.freecodecamp.org/news/insertion-sort-algorithm-example-in-java-and-c/",
"article18title": "Python If-Else",
"article18link": "https://www.freecodecamp.org/news/python-if-else-python-conditional-syntax-example/",
"article19title": "All Caps in CSS",
"article19link": "https://www.freecodecamp.org/news/all-caps-in-css-how-to-uppercase-text-with-style/",
"article20title": "Open Task Manager on Mac",
"article20link": "https://www.freecodecamp.org/news/how-to-open-task-manager-on-mac-apple-shortcut-tutorial/",
"article21title": "parseInt() in JavaScript",
"article21link": "https://www.freecodecamp.org/news/parseint-in-javascript-js-string-to-int-example/",
"article22title": "Print statement in Python",
"article22link": "https://www.freecodecamp.org/news/print-statement-in-python-how-to-print-with-example-syntax-command/",
"article23title": "Remove Directory in Linux",
"article23link": "https://www.freecodecamp.org/news/remove-directory-in-linux-how-to-delete-a-folder-from-the-command-line/",
"article24title": "Python str.lower() Example",
"article24link": "https://www.freecodecamp.org/news/python-to-lowercase-a-string-str-lower-example/",
"article25title": "Second Monitor Not Detected",
"article25link": "https://www.freecodecamp.org/news/second-monitor-not-detected-fixed-windows10/",
"article26title": "How to Declare Strings in C",
"article26link": "https://www.freecodecamp.org/news/c-string-how-to-declare-strings-in-the-c-programming-language/",
"article27title": "How to Use .len() in Python",
"article27link": "https://www.freecodecamp.org/news/what-is-len-in-python-how-to-use-the-len-function-to-find-the-length-of-a-string/",
"article28title": "Python Convert String to Int",
"article28link": "https://www.freecodecamp.org/news/python-convert-string-to-int-how-to-cast-a-string-in-python/",
"article29title": "How to create a free website",
"article29link": "https://www.freecodecamp.org/news/how-to-create-a-website-free-of-cost-website-builder-platform-guide/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "about:blank 是什麼意思",
"article0link": "https://chinese.freecodecamp.org/news/about-blank-what-does-about-blank-mean-and-why-is-it-blocked-in-chrome-and-firefox/",
"article1title": "打開 .dat 文件",
"article1link": "https://chinese.freecodecamp.org/news/dat-file-how-to-open-the-dat-file-format-extension/",
"article2title": "Node 最新版本",
"article2link": "https://chinese.freecodecamp.org/news/how-to-update-node-and-npm-to-the-latest-version/",
"article3title": "反惡意軟件服務",
"article3link": "https://chinese.freecodecamp.org/news/what-is-antimalware-service-executable-why-is-it-high-cpu-disk-usage/",
"article4title": "Windows10 產品密鑰",
"article4link": "https://chinese.freecodecamp.org/news/how-to-find-a-windows-10-product-key/",
"article5title": "Git 切換分支",
"article5link": "https://chinese.freecodecamp.org/news/git-switch-branch/",
"article6title": "AppData 文件夾",
"article6link": "https://chinese.freecodecamp.org/news/where-to-find-the-appdata-folder-in-windows-10/",
"article7title": "Windows 10 屏幕亮度",
"article7link": "https://chinese.freecodecamp.org/news/how-to-change-screen-brightness-on-windows-10/",
"article8title": "JSON 註釋",
"article8link": "https://chinese.freecodecamp.org/news/json-comment/",
"article9title": "MongoDB Atlas 教程",
"article9link": "https://chinese.freecodecamp.org/news/get-started-with-mongodb-atlas/",
"article10title": "Python 字符串轉數字",
"article10link": "https://chinese.freecodecamp.org/news/python-convert-string-to-int-how-to-cast-a-string-in-python/",
"article11title": "Git 命令",
"article11link": "https://chinese.freecodecamp.org/news/how-to-use-basic-git-and-github-commands/",
"article12title": "更新 NPM 依賴",
"article12link": "https://chinese.freecodecamp.org/news/how-to-update-npm-dependencies/",
"article13title": "谷歌恐龍遊戲",
"article13link": "https://chinese.freecodecamp.org/news/do-you-know-the-chrome-dino-game-millions-of-people-are-playing/",
"article14title": "毛玻璃效果",
"article14link": "https://chinese.freecodecamp.org/news/glassmorphism-design-effect-with-html-css/",
"article15title": "Python 獲取時間",
"article15link": "https://chinese.freecodecamp.org/news/how-to-get-the-current-time-in-python-with-datetime/",
"article16title": "Git Clone 指定分支",
"article16link": "https://chinese.freecodecamp.org/news/git-clone-branch-how-to-clone-a-specific-branch/",
"article17title": "JS 字符串反轉",
"article17link": "https://chinese.freecodecamp.org/news/how-to-reverse-a-string-in-javascript-in-3-different-ways/",
"article18title": "React 個人作品網站",
"article18link": "https://chinese.freecodecamp.org/news/portfolio-app-using-react/",
"article19title": "媒體查詢範圍",
"article19link": "https://chinese.freecodecamp.org/news/media-queries-width-ranges/",
"article20title": "forEach 遍歷數組",
"article20link": "https://chinese.freecodecamp.org/news/javascript-foreach-how-to-loop-through-an-array-in-js/",
"article21title": "撤銷 Git Add",
"article21link": "https://chinese.freecodecamp.org/news/how-to-undo-a-git-add/",
"article22title": "OSI 七層網絡",
"article22link": "https://chinese.freecodecamp.org/news/osi-model-networking-layers/",
"article23title": "Event Loop 執行順序",
"article23link": "https://chinese.freecodecamp.org/news/node-js-event-loop/",
"article24title": "CMD 刪除文件",
"article24link": "https://chinese.freecodecamp.org/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/",
"article25title": "Git 刪除分支",
"article25link": "https://chinese.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/",
"article26title": "HTML 表格代碼",
"article26link": "https://chinese.freecodecamp.org/news/html-tables-table-tutorial-with-css-example-code/",
"article27title": "如何學習 Python",
"article27link": "https://chinese.freecodecamp.org/news/learning-python-from-zero-to-hero/",
"article28title": "REST API 教程",
"article28link": "https://chinese.freecodecamp.org/news/rest-api-tutorial-rest-client-rest-service-and-api-calls-explained-with-code-examples/",
"article29title": "C 語言入門",
"article29link": "https://chinese.freecodecamp.org/news/the-c-beginners-handbook/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "about:blank 是什么意思",
"article0link": "https://chinese.freecodecamp.org/news/about-blank-what-does-about-blank-mean-and-why-is-it-blocked-in-chrome-and-firefox/",
"article1title": "打开 .dat 文件",
"article1link": "https://chinese.freecodecamp.org/news/dat-file-how-to-open-the-dat-file-format-extension/",
"article2title": "Node 最新版本",
"article2link": "https://chinese.freecodecamp.org/news/how-to-update-node-and-npm-to-the-latest-version/",
"article3title": "反恶意软件服务",
"article3link": "https://chinese.freecodecamp.org/news/what-is-antimalware-service-executable-why-is-it-high-cpu-disk-usage/",
"article4title": "Windows10 产品密钥",
"article4link": "https://chinese.freecodecamp.org/news/how-to-find-a-windows-10-product-key/",
"article5title": "Git 切换分支",
"article5link": "https://chinese.freecodecamp.org/news/git-switch-branch/",
"article6title": "AppData 文件夹",
"article6link": "https://chinese.freecodecamp.org/news/where-to-find-the-appdata-folder-in-windows-10/",
"article7title": "Windows 10 屏幕亮度",
"article7link": "https://chinese.freecodecamp.org/news/how-to-change-screen-brightness-on-windows-10/",
"article8title": "JSON 注释",
"article8link": "https://chinese.freecodecamp.org/news/json-comment/",
"article9title": "MongoDB Atlas 教程",
"article9link": "https://chinese.freecodecamp.org/news/get-started-with-mongodb-atlas/",
"article10title": "Python 字符串转数字",
"article10link": "https://chinese.freecodecamp.org/news/python-convert-string-to-int-how-to-cast-a-string-in-python/",
"article11title": "Git 命令",
"article11link": "https://chinese.freecodecamp.org/news/how-to-use-basic-git-and-github-commands/",
"article12title": "更新 NPM 依赖",
"article12link": "https://chinese.freecodecamp.org/news/how-to-update-npm-dependencies/",
"article13title": "谷歌恐龙游戏",
"article13link": "https://chinese.freecodecamp.org/news/do-you-know-the-chrome-dino-game-millions-of-people-are-playing/",
"article14title": "毛玻璃效果",
"article14link": "https://chinese.freecodecamp.org/news/glassmorphism-design-effect-with-html-css/",
"article15title": "Python 获取时间",
"article15link": "https://chinese.freecodecamp.org/news/how-to-get-the-current-time-in-python-with-datetime/",
"article16title": "Git Clone 指定分支",
"article16link": "https://chinese.freecodecamp.org/news/git-clone-branch-how-to-clone-a-specific-branch/",
"article17title": "JS 字符串反转",
"article17link": "https://chinese.freecodecamp.org/news/how-to-reverse-a-string-in-javascript-in-3-different-ways/",
"article18title": "React 个人作品网站",
"article18link": "https://chinese.freecodecamp.org/news/portfolio-app-using-react/",
"article19title": "媒体查询范围",
"article19link": "https://chinese.freecodecamp.org/news/media-queries-width-ranges/",
"article20title": "forEach 遍历数组",
"article20link": "https://chinese.freecodecamp.org/news/javascript-foreach-how-to-loop-through-an-array-in-js/",
"article21title": "撤销 Git Add",
"article21link": "https://chinese.freecodecamp.org/news/how-to-undo-a-git-add/",
"article22title": "OSI 七层网络",
"article22link": "https://chinese.freecodecamp.org/news/osi-model-networking-layers/",
"article23title": "Event Loop 执行顺序",
"article23link": "https://chinese.freecodecamp.org/news/node-js-event-loop/",
"article24title": "CMD 删除文件",
"article24link": "https://chinese.freecodecamp.org/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/",
"article25title": "Git 删除分支",
"article25link": "https://chinese.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/",
"article26title": "HTML 表格代码",
"article26link": "https://chinese.freecodecamp.org/news/html-tables-table-tutorial-with-css-example-code/",
"article27title": "如何学习 Python",
"article27link": "https://chinese.freecodecamp.org/news/learning-python-from-zero-to-hero/",
"article28title": "REST API 教程",
"article28link": "https://chinese.freecodecamp.org/news/rest-api-tutorial-rest-client-rest-service-and-api-calls-explained-with-code-examples/",
"article29title": "C 语言入门",
"article29link": "https://chinese.freecodecamp.org/news/the-c-beginners-handbook/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "Python Comment Block",
"article0link": "https://www.freecodecamp.org/news/python-comment-block-how-to-comment-out-code-in-python/",
"article1title": "Python Code Examples",
"article1link": "https://www.freecodecamp.org/news/python-code-examples-simple-python-program-example/",
"article2title": "Types of Hard Drives",
"article2link": "https://www.freecodecamp.org/news/types-of-hard-drives-sata-pata-scsi-and-more-2/",
"article3title": "Python List .remove()",
"article3link": "https://www.freecodecamp.org/news/python-list-remove-how-to-remove-an-item-from-a-list-in-python/",
"article4title": "Python Concat Strings",
"article4link": "https://www.freecodecamp.org/news/python-concatenate-strings-how-to-combine-and-append-strings-in-python/",
"article5title": "pip Command Not Found",
"article5link": "https://www.freecodecamp.org/news/pip-command-not-found-mac-and-linux-error-solved/",
"article6title": "Sort a List in Python",
"article6link": "https://www.freecodecamp.org/news/python-sort-how-to-sort-a-list-in-python/",
"article7title": "502 Bad Gateway Error",
"article7link": "https://www.freecodecamp.org/news/502-bad-gateway-error-solved/",
"article8title": "Resize Image Tutorial",
"article8link": "https://www.freecodecamp.org/news/how-to-resize-an-image-without-losing-quality/",
"article9title": "Python Compare Strings",
"article9link": "https://www.freecodecamp.org/news/python-compare-strings-how-to-check-for-string-equality/",
"article10title": "Python Sleep",
"article10link": "https://www.freecodecamp.org/news/python-sleep-time-sleep-in-python/",
"article11title": "HTTP Error 504",
"article11link": "https://www.freecodecamp.org/news/http-error-504-gateway-timeout-status-code-explained/",
"article12title": "Git Undo Merge",
"article12link": "https://www.freecodecamp.org/news/git-undo-merge-how-to-revert-the-last-merge-commit-in-git/",
"article13title": "Python Datetime",
"article13link": "https://www.freecodecamp.org/news/how-to-get-the-current-time-in-python-with-datetime/",
"article14title": "Comment Out HTML",
"article14link": "https://www.freecodecamp.org/news/comment-out-html-code-example/",
"article15title": "Else-If in Python",
"article15link": "https://www.freecodecamp.org/news/else-if-in-python-python-if-statement-example-syntax/",
"article16title": "Design Principles",
"article16link": "https://www.freecodecamp.org/news/design-principles-a-list-of-the-principles-of-design/",
"article17title": "SQL Contains String",
"article17link": "https://www.freecodecamp.org/news/sql-contains-string-sql-regex-example-query/",
"article18title": "Extern in C and C++",
"article18link": "https://www.freecodecamp.org/news/extern-keyword-function-tutorial/",
"article19title": "Frontend vs Backend",
"article19link": "https://www.freecodecamp.org/news/frontend-vs-backend-whats-the-difference/",
"article20title": "Send Large Video Files",
"article20link": "https://www.freecodecamp.org/news/how-to-send-large-video-files-share-a-big-file-with-email/",
"article21title": "Create a Dict in Python",
"article21link": "https://www.freecodecamp.org/news/create-a-dictionary-in-python-python-dict-methods/",
"article22title": "Create a List in Python",
"article22link": "https://www.freecodecamp.org/news/create-a-list-in-python-lists-in-python-syntax/",
"article23title": "Python Break & Continue",
"article23link": "https://www.freecodecamp.org/news/python-break-and-python-continue-how-to-skip-to-the-next-function/",
"article24title": "Python Multiline Comment",
"article24link": "https://www.freecodecamp.org/news/python-multiline-comment-how-to-comment-out-multiple-lines-in-python/",
"article25title": "Whats a Full Stack Dev?",
"article25link": "https://www.freecodecamp.org/news/what-is-a-full-stack-developer-full-stack-engineer-guide/",
"article26title": "How to Flush DNS on a Mac",
"article26link": "https://www.freecodecamp.org/news/how-to-flush-dns-on-mac-macos-clear-dns-cache/",
"article27title": "Remove Duplicates in Excel",
"article27link": "https://www.freecodecamp.org/news/how-to-remove-duplicates-in-excel-delete-duplicate-rows-tutorial/",
"article28title": "Hanging Indent Google Docs",
"article28link": "https://www.freecodecamp.org/news/how-to-do-a-hanging-indent-in-google-docs/",
"article29title": "How to Find Remote Work Jobs",
"article29link": "https://www.freecodecamp.org/news/remote-work-how-to-find-remote-working-jobs-from-home/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "Git Clone",
"article0link": "https://www.freecodecamp.org/espanol/news/como-clonar-una-branch-en-git/",
"article1title": "Métodos Agile",
"article1link": "https://www.freecodecamp.org/espanol/news/metodologia-agile/",
"article2title": "Python Main",
"article2link": "https://www.freecodecamp.org/espanol/news/python-if-name-main/",
"article3title": "Callback",
"article3link": "https://www.freecodecamp.org/news/javascript-callback-functions-what-are-callbacks-in-js-and-how-to-use-them/",
"article4title": "Debounce",
"article4link": "https://www.freecodecamp.org/espanol/news/curso-debounce-javascript-como-hacer-que-tu-js-espere/",
"article5title": "URL Encode",
"article5link": "https://www.freecodecamp.org/espanol/news/url-codificacion-como-utilizar-encodeuricomponent-javascript/",
"article6title": "Blink HTML",
"article6link": "https://www.freecodecamp.org/news/make-it-blink-html-tutorial-how-to-use-the-blink-tag-with-code-examples/",
"article7title": "Python Tupla",
"article7link": "https://www.freecodecamp.org/espanol/news/tuplas-listas-python/",
"article8title": "JavaScript Push",
"article8link": "https://www.freecodecamp.org/espanol/news/como-agregar-elementos-a-un-arreglo/",
"article9title": "Java List",
"article9link": "https://www.freecodecamp.org/news/java-list-tutorial-util-list-api-example/",
"article10title": "UX",
"article10link": "https://www.freecodecamp.org/espanol/news/diseno-ux-convertirse-en-un-disenador-de-experiencia-de-usuario/",
"article11title": "Proceso de Diseño",
"article11link": "https://www.freecodecamp.org/espanol/news/pensamiento-de-diseno-emprendedores-desarrolladores/",
"article12title": "Números Primos",
"article12link": "https://www.freecodecamp.org/espanol/news/lista-de-numeros-primos-una-grafica-con-todos-los/",
"article13title": "Diseño de Producto",
"article13link": "https://www.freecodecamp.org/espanol/news/product-design-explicado-en-un-espanol-sencillo/",
"article14title": "Digital Design",
"article14link": "https://www.freecodecamp.org/news/what-is-digital-design-and-why-does-it-matter/",
"article15title": "Juegos de Código",
"article15link": "https://www.freecodecamp.org/espanol/news/los-mejores-juegos-online-para-aprender-programar/",
"article16title": "SVM",
"article16link": "https://www.freecodecamp.org/news/svm-machine-learning-tutorial-what-is-the-support-vector-machine-algorithm-explained-with-code-examples/",
"article17title": "JavaScript forEach",
"article17link": "https://www.freecodecamp.org/news/javascript-foreach-how-to-loop-through-an-array-in-js/",
"article18title": "Google BERT",
"article18link": "https://www.freecodecamp.org/news/google-bert-nlp-machine-learning-tutorial/",
"article19title": "Create Table SQL",
"article19link": "https://www.freecodecamp.org/espanol/news/create-table-sql-server-con-ejemplo/",
"article20title": "Diseño Web Responsive",
"article20link": "https://www.freecodecamp.org/espanol/news/diseno-web-responsive-como-hacer-que-un-sitio-web-se-vea-bien-en-telefonos-y-tabletas/",
"article21title": "¿Qué es un archivo SVG?",
"article21link": "https://www.freecodecamp.org/espanol/news/que-es-svg-explicacion-de-etiquetas-imagenes/",
"article22title": "PDF Password Remover",
"article22link": "https://www.freecodecamp.org/news/pdf-password-remover-guide-how-to-remove-password-protection-from-a-pdf/",
"article23title": "¿Qué es un Archivo PDF?",
"article23link": "https://www.freecodecamp.org/espanol/news/que-es-un-archivo-pdf-como-lo-abres/",
"article24title": "What Is Python?",
"article24link": "https://www.freecodecamp.org/news/what-is-python-used-for-10-coding-uses-for-the-python-programming-language/",
"article25title": "¿Qué es TLS?",
"article25link": "https://www.freecodecamp.org/espanol/news/que-is-tls-explicado-en-espanol-simple/",
"article26title": "¿Qué es una red LAN?",
"article26link": "https://www.freecodecamp.org/espanol/news/que-es-una-red-lan-explicada-en-espanol/",
"article27title": "¿Qué es npm?",
"article27link": "https://www.freecodecamp.org/espanol/news/node-js-npm-tutorial/",
"article28title": "Ejemplos de RSync",
"article28link": "https://www.freecodecamp.org/espanol/news/rsync-ejemplos-opciones-y-copiar-archivos-atraves-ssh/",
"article29title": "Random Forest",
"article29link": "https://www.freecodecamp.org/news/how-to-use-the-tree-based-algorithm-for-machine-learning/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "Discord Won't Open",
"article0link": "https://www.freecodecamp.org/news/discord-wont-open-on-my-pc-solved-in-windows-10/",
"article1title": "Learn Java Courses",
"article1link": "https://www.freecodecamp.org/news/learn-java-free-java-courses-for-beginners/",
"article2title": "SQL Like Statement",
"article2link": "https://www.freecodecamp.org/news/sql-like-statement-how-to-query-sql-with-wildcard/",
"article3title": "File Explorer Error",
"article3link": "https://www.freecodecamp.org/news/file-explorer-not-responding-fixed-on-windows-10-pc/",
"article4title": "Python Find in List",
"article4link": "https://www.freecodecamp.org/news/python-find-in-list-how-to-find-the-index-of-an-item-or-element-in-a-list/",
"article5title": "Functions in Python",
"article5link": "https://www.freecodecamp.org/news/python-functions-define-and-call-a-function/",
"article6title": "Python Reverse List",
"article6link": "https://www.freecodecamp.org/news/python-reverse-list-how-to-reverse-a-range-or-array/",
"article7title": "Create a Table in SQL",
"article7link": "https://www.freecodecamp.org/news/how-to-create-a-table-in-sql-postgres-and-mysql-example-query/",
"article8title": "List Index Out of Range",
"article8link": "https://www.freecodecamp.org/news/list-index-out-of-range-python-error-message-solved/",
"article9title": "Python String.Replace()",
"article9link": "https://www.freecodecamp.org/news/python-string-replace-function-in-python-for-substring-substitution/",
"article10title": "C vs C++",
"article10link": "https://www.freecodecamp.org/news/c-vs-cpp-whats-the-difference/",
"article11title": "Python JSON",
"article11link": "https://www.freecodecamp.org/news/python-json-how-to-convert-a-string-to-json/",
"article12title": "What is a PC?",
"article12link": "https://www.freecodecamp.org/news/what-is-a-pc-computer-definition-and-computer-basics-for-beginners/",
"article13title": "What is Coding?",
"article13link": "https://www.freecodecamp.org/news/computer-coding-computer-program-definition-and-code-meaning/",
"article14title": "Text Box in HTML",
"article14link": "https://www.freecodecamp.org/news/text-box-in-html-the-input-field-html-tag/",
"article15title": "Meta Tag in HTML",
"article15link": "https://www.freecodecamp.org/news/meta-tag-in-html-what-is-metadata-and-meta-description-example/",
"article16title": "Append in Python",
"article16link": "https://www.freecodecamp.org/news/append-in-python-how-to-append-to-a-list-or-an-array/",
"article17title": "Python Not Equal",
"article17link": "https://www.freecodecamp.org/news/python-not-equal-how-to-use-the-does-not-equal-operator/",
"article18title": "Linux awk Command",
"article18link": "https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/",
"article19title": "JS String Contains",
"article19link": "https://www.freecodecamp.org/news/javascript-string-contains-how-to-use-js-includes/",
"article20title": "How to Open Task Manager",
"article20link": "https://www.freecodecamp.org/news/how-to-open-task-manager-in-windows-10/",
"article21title": "Design Thinking Explained",
"article21link": "https://www.freecodecamp.org/news/the-design-thinking-process-explained/",
"article22title": "Learn Programming Courses",
"article22link": "https://www.freecodecamp.org/news/learn-programming-free-software-development-courses-for-beginners/",
"article23title": "Make a Transparent Taskbar",
"article23link": "https://www.freecodecamp.org/news/transparent-taskbar-how-to-make-a-task-bar-transparent-in-windows-10-pc-2/",
"article24title": "Install Ethernet Driver PC",
"article24link": "https://www.freecodecamp.org/news/windows-10-network-adapter-missing-how-to-install-ethernet-driver-on-pc/",
"article25title": "Default Constructor in Java",
"article25link": "https://www.freecodecamp.org/news/default-constructor-in-java/",
"article26title": "Stuck Win 10 Hard Drive",
"article26link": "https://www.freecodecamp.org/news/scanning-and-repairing-drive-how-to-fix-stuck-windows-10-pc-hard-drive/",
"article27title": "Color Codes for Grey Palette",
"article27link": "https://www.freecodecamp.org/news/color-shades-hex-code-and-rgb-for-gray-color-palette/",
"article28title": "Binary Search Tree Traversal",
"article28link": "https://www.freecodecamp.org/news/binary-search-tree-traversal-inorder-preorder-post-order-for-bst/",
"article29title": "RTC Connecting Discord Fix",
"article29link": "https://www.freecodecamp.org/news/rtc-connecting-discord-how-to-fix-the-server-error/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "Unire CSV con Python",
"article0link": "https://www.freecodecamp.org/italian/news/come-combinare-file-multipli-in-formato-csv-con-8-righe-di-codice/",
"article1title": "Il comando Git push",
"article1link": "https://www.freecodecamp.org/italian/news/il-comando-git-push-spiegato/",
"article2title": "Centrare immagini in CSS",
"article2link": "https://www.freecodecamp.org/italian/news/come-centrare-un-immagine-usando/",
"article3title": "I codici Alt",
"article3link": "https://www.freecodecamp.org/italian/news/codici-alt/",
"article4title": "Tenere a bada il footer",
"article4link": "https://www.freecodecamp.org/italian/news/come-mantenere-il-footer-al-suo-posto/",
"article5title": "Cosa è un'API?",
"article5link": "https://www.freecodecamp.org/italian/news/cose-un-api-in-italiano-per-favore/",
"article6title": "Chiave licenza Windows10",
"article6link": "https://www.freecodecamp.org/italian/news/come-trovare-la-tua-chiave-di-licenza-di-windows-10/",
"article7title": "Live Server non funziona",
"article7link": "https://www.freecodecamp.org/italian/news/live-server-di-visual-studio-code-non-funzionante-2/",
"article8title": "Formattare in Markdown",
"article8link": "https://www.freecodecamp.org/italian/news/come-formattare-il-codice-in-markdown/",
"article9title": "Guida allo stile di fCC",
"article9link": "https://www.freecodecamp.org/italian/news/la-guida-allo-stile-di-pubblicazione-di-freecodecamp/",
"article10title": "Valori unici Python",
"article10link": "https://www.freecodecamp.org/italian/news/lista-con-valori-unici-come-ottenere-una-lista-di-valori-unici-in-python/",
"article11title": "Array.find() in JS",
"article11link": "https://www.freecodecamp.org/italian/news/tutorial-array-find-in-javascript/",
"article12title": "position in CSS",
"article12link": "https://www.freecodecamp.org/italian/news/come-usare-la-proprieta-position-in-css-per-allineare-elementi/",
"article13title": "Destrutturazione in JS",
"article13link": "https://www.freecodecamp.org/italian/news/destrutturazione-in-javascript-come-destrutturare-array-e-oggetti/",
"article14title": ".length in JS",
"article14link": "https://www.freecodecamp.org/italian/news/verificare-se-un-array-javascrit-e-vuoto/",
"article15title": "Boilerplate HTML5",
"article15link": "https://www.freecodecamp.org/italian/news/template-base-html5/",
"article16title": "Manuale JS",
"article16link": "https://www.freecodecamp.org/italian/news/manuale-javascript-per-principianti-edizione-2020/",
"article17title": "Git e GitHub",
"article17link": "https://www.freecodecamp.org/italian/news/come-usare-git-e-github-in-un-team-come-un-professionista-con-la-partecipazione-di-harry-e-hermione/",
"article18title": "Cos'è about:blank",
"article18link": "https://www.freecodecamp.org/italian/news/cosa-e-about-blank-e-come-liberartene/",
"article19title": "LS in Linux",
"article19link": "https://www.freecodecamp.org/italian/news/il-comando-ls-in-linux-come-elencare-file-e-cartelle-le-flag-di-opzione/",
"article20title": "Immagine di sfondo REACT",
"article20link": "https://www.freecodecamp.org/italian/news/come-impostare-una-immagine-di-background-in-react-usando-il-css-in-linea/",
"article21title": "Vim su Windows in PowerShell",
"article21link": "https://www.freecodecamp.org/italian/news/vim-guida-di-installazione-su-windows-come-eseguire-leditor-di-testo-vim-in-powershell-sul-tuo-pc/",
"article22title": "Processi Child di Node.js",
"article22link": "https://www.freecodecamp.org/italian/news/processi-child-di-node-js-tutto-cio-che-devi-sapere/",
"article23title": "Algoritmi di forza bruta",
"article23link": "https://www.freecodecamp.org/italian/news/algoritmi-di-forza-bruta/",
"article24title": "@property in Python",
"article24link": "https://www.freecodecamp.org/italian/news/il-decoratore-property-in-python-utilizzo-vantaggi-e-sintassi/",
"article25title": "L'algoritmo di Dijkstra",
"article25link": "https://www.freecodecamp.org/italian/news/lalgoritmo-dei-cammini-minimi-di-dijkstra-una-dettagliata-introduzione-grafica/",
"article26title": "Come annullare un Git Add",
"article26link": "https://www.freecodecamp.org/italian/news/come-annullare-un-git-add/",
"article27title": "Ripristinare schede su Chrome",
"article27link": "https://www.freecodecamp.org/italian/news/come-ripristinare-schede-su-chrome/",
"article28title": "Link nuova scheda in HTML",
"article28link": "https://www.freecodecamp.org/italian/news/html-per-aprire-un-link-in-una-nuova-scheda/",
"article29title": "Eliminare un branch di Git",
"article29link": "https://www.freecodecamp.org/italian/news/eliminare-branch-git-locale-e-remoto/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "Google Doodle ゲーム",
"article0link": "https://www.freecodecamp.org/japanese/news/google-doodle-games-baseball-pacman-and-more/",
"article1title": "git ブランチ削除",
"article1link": "https://www.freecodecamp.org/japanese/news/how-to-delete-a-git-branch-both-locally-and-remotely/",
"article2title": "CSS センタリング",
"article2link": "https://www.freecodecamp.org/japanese/news/how-to-center-anything-with-css-align-a-div-text-and-more/",
"article3title": "新しいタブで開く",
"article3link": "https://www.freecodecamp.org/japanese/news/how-to-use-html-to-open-link-in-new-tab/",
"article4title": "全絵文字リスト",
"article4link": "https://www.freecodecamp.org/japanese/news/all-emojis-emoji-list-for-copy-and-paste/",
"article5title": "C のコンパイル",
"article5link": "https://www.freecodecamp.org/japanese/news/how-to-compile-your-c-code-in-visual-studio-code/",
"article6title": "Python の改行",
"article6link": "https://www.freecodecamp.org/japanese/news/python-new-line-and-how-to-python-print-without-a-newline/",
"article7title": "Windows フォルダ削除",
"article7link": "https://www.freecodecamp.org/japanese/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/",
"article8title": "Discord ボット",
"article8link": "https://www.freecodecamp.org/japanese/news/create-a-discord-bot-with-python/",
"article9title": "about:blank とは",
"article9link": "https://www.freecodecamp.org/japanese/news/about-blank-what-does-about-blank-mean-and-why-is-it-blocked-in-chrome-and-firefox/",
"article10title": "Python + SQL DB",
"article10link": "https://www.freecodecamp.org/japanese/news/connect-python-with-sql/",
"article11title": "var, let, const",
"article11link": "https://www.freecodecamp.org/japanese/news/var-let-and-const-whats-the-difference/",
"article12title": "Java の文字列と数値",
"article12link": "https://www.freecodecamp.org/japanese/news/java-string-to-int-how-to-convert-a-string-to-an-integer/",
"article13title": "React と Axios",
"article13link": "https://www.freecodecamp.org/japanese/news/how-to-use-axios-with-react/",
"article14title": "Node.js + Ubuntu",
"article14link": "https://www.freecodecamp.org/japanese/news/how-to-install-node-js-on-ubuntu-and-update-npm-to-the-latest-version/",
"article15title": "SVG 画像",
"article15link": "https://www.freecodecamp.org/japanese/news/use-svg-images-in-css-html/",
"article16title": "JS オブジェクト配列",
"article16link": "https://www.freecodecamp.org/japanese/news/javascript-array-of-objects-tutorial-how-to-create-update-and-loop-through-objects-using-js-array-methods/",
"article17title": "サブネットマスク",
"article17link": "https://www.freecodecamp.org/japanese/news/subnet-cheat-sheet-24-subnet-mask-30-26-27-29-and-other-ip-address-cidr-network-references/",
"article18title": "Python の空リスト",
"article18link": "https://www.freecodecamp.org/japanese/news/python-empty-list-tutorial-how-to-create-an-empty-list-in-python/",
"article19title": "JS 配列が空かどうか",
"article19link": "https://www.freecodecamp.org/japanese/news/check-if-javascript-array-is-empty-or-not-with-length/",
"article20title": "CSS フルページ表示",
"article20link": "https://www.freecodecamp.org/japanese/news/html-page-width-height/",
"article21title": "git ブランチの clone",
"article21link": "https://www.freecodecamp.org/japanese/news/git-clone-branch-how-to-clone-a-specific-branch/",
"article22title": "スタートメニュー",
"article22link": "https://www.freecodecamp.org/japanese/news/windows-10-start-menu-not-working-solved/",
"article23title": "Windows ISO",
"article23link": "https://www.freecodecamp.org/japanese/news/how-make-a-windows-10-usb-using-your-mac-build-a-bootable-iso-from-your-macs-terminal/",
"article24title": "Python % 演算子",
"article24link": "https://www.freecodecamp.org/japanese/news/the-python-modulo-operator-what-does-the-symbol-mean-in-python-solved/",
"article25title": "学位取得プログラム",
"article25link": "https://www.freecodecamp.org/japanese/news/freecodecamp-math-computer-science-degree-update/",
"article26title": "C の書式指定子",
"article26link": "https://www.freecodecamp.org/japanese/news/format-specifiers-in-c/",
"article27title": "Python 部分文字列",
"article27link": "https://www.freecodecamp.org/japanese/news/how-to-substring-a-string-in-python/",
"article28title": "git add の取り消し",
"article28link": "https://www.freecodecamp.org/japanese/news/how-to-undo-a-git-add/",
"article29title": "Python の for ループ",
"article29link": "https://www.freecodecamp.org/japanese/news/python-for-loop-for-i-in-range-example/"
}

View File

@@ -1,62 +0,0 @@
{
"article0title": "Nova aba em HTML",
"article0link": "https://www.freecodecamp.org/portuguese/news/como-usar-o-html-para-abrir-um-link-em-uma-nova-aba/",
"article1title": "Máscaras de sub-rede",
"article1link": "https://www.freecodecamp.org/portuguese/news/ficha-informativa-de-sub-redes-mascara-de-sub-rede-24-30-26-27-29/",
"article2title": "40 projetos em JavaScript",
"article2link": "https://www.freecodecamp.org/portuguese/news/40-projetos-em-javascript-para-iniciantes-ideias-simples-para-comecar-a-programar-em-js/",
"article3title": "Tutorial de button onClick",
"article3link": "https://www.freecodecamp.org/portuguese/news/tutorial-sobre-button-onclick-em-html-e-evento-de-clique-em-javascript/",
"article4title": "Bot do Discord",
"article4link": "https://www.freecodecamp.org/portuguese/news/tutorial-de-criacao-de-bot-para-o-discord-em-python/",
"article5title": "Centralizar em CSS",
"article5link": "https://www.freecodecamp.org/portuguese/news/como-centralizar-tudo-com-css/",
"article6title": "Excluir pastas com o cmd",
"article6link": "https://www.freecodecamp.org/portuguese/news/excluir-pastas-no-cmd-como-remover-arquivos-e-pastas-no-windows/",
"article7title": "Imagens em CSS",
"article7link": "https://www.freecodecamp.org/portuguese/news/como-centralizar-uma-imagem-na-vertical-e-na-horizontal-com-css/",
"article8title": "25 projetos em Python",
"article8link": "https://www.freecodecamp.org/portuguese/news/25-projetos-em-python-para-iniciantes-ideias-faceis-para-comecar-a-programar-em-python/",
"article9title": "Excluir branches",
"article9link": "https://www.freecodecamp.org/portuguese/news/como-excluir-branches-locais-e-remotos-do-git/",
"article10title": "Jogo do dinossauro",
"article10link": "https://www.freecodecamp.org/portuguese/news/como-jogar-o-jogo-do-dinossauro-do-google-chrome-sem-internet-on-line-e-off-line/",
"article11title": "Menu iniciar",
"article11link": "https://www.freecodecamp.org/portuguese/news/menu-iniciar-do-windows-10-nao-funciona-resolvido/",
"article12title": "Arrays vazios em JS",
"article12link": "https://www.freecodecamp.org/portuguese/news/como-ver-se-um-array-em-javascript-esta-vazio-ou-sem-length/",
"article13title": "Caracteres especiais",
"article13link": "https://www.freecodecamp.org/portuguese/news/codigos-alt-como-digitar-caracteres-especiais-e-simbolos-do-teclado-no-windows-usando-as-teclas-alt/",
"article14title": "Python para iniciantes",
"article14link": "https://www.freecodecamp.org/portuguese/news/exemplos-de-codigo-em-python-tutorial-de-programacao-com-scripts-de-exemplo-para-iniciantes/",
"article15title": "Provedores de e-mail",
"article15link": "https://www.freecodecamp.org/portuguese/news/os-melhores-provedores-de-email-gratuitos-guia-de-servicos-de-contas-de-email-online/",
"article16title": "15 portfólios",
"article16link": "https://www.freecodecamp.org/portuguese/news/15-portfolios-de-desenvolvimento-para-a-web-inspiradores/",
"article17title": "Node.js no Ubuntu",
"article17link": "https://www.freecodecamp.org/portuguese/news/como-instalar-o-nodejs-no-ubuntu-e-atualizar-o-npm-para-a-versao-mais-recente/",
"article18title": "10 sites de desafios",
"article18link": "https://www.freecodecamp.org/portuguese/news/os-10-sites-da-web-mais-populares-com-desafios-de-programacao/",
"article19title": "Clonar branches",
"article19link": "https://www.freecodecamp.org/portuguese/news/git-clone-branch-como-clonar-um-branch-especifico/",
"article20title": "Date now em JavaScript",
"article20link": "https://www.freecodecamp.org/portuguese/news/date-now-em-javascript-como-obter-a-data-atual-em-javascript/",
"article21title": "Var, let e const em JavaScript",
"article21link": "https://www.freecodecamp.org/portuguese/news/var-let-e-const-qual-e-a-diferenca/",
"article22title": "Axios em React",
"article22link": "https://www.freecodecamp.org/portuguese/news/como-usar-o-axios-com-o-react-o-guia-definitivo-2021/",
"article23title": "ForEach em JavaScript",
"article23link": "https://www.freecodecamp.org/portuguese/news/foreach-em-javascript-como-percorrer-um-array-em-js/",
"article24title": "Fotos do Instagram",
"article24link": "https://www.freecodecamp.org/portuguese/news/como-baixar-fotos-do-instagram-salve-imagens-no-pc-ou-no-mac-a-partir-do-chrome-sem-precisar-de-ferramentas/",
"article25title": "Media queries do CSS",
"article25link": "https://www.freecodecamp.org/portuguese/news/tutorial-de-media-queries-do-css-resolucoes-padrao-breakpoints-do-css-e-tamanhos-de-telefone/",
"article26title": "Fix do Live Server no VS Code",
"article26link": "https://www.freecodecamp.org/portuguese/news/o-que-fazer-quando-o-live-server-do-visual-studio-code-nao-funciona/",
"article27title": "SQL em Python",
"article27link": "https://www.freecodecamp.org/portuguese/news/como-criar-e-manipular-bancos-de-dados-sql-com-python/",
"article28title": "Interpretadas x compiladas",
"article28link": "https://www.freecodecamp.org/portuguese/news/linguagens-de-programacao-interpretadas-x-compiladas-qual-e-a-diferenca/",
"article29title": "Imagens SVG em HTML e CSS",
"article29link": "https://www.freecodecamp.org/portuguese/news/como-usar-imagens-svg-no-css-e-no-html-um-tutorial-for-beginners/"
}

View File

@@ -1,62 +0,0 @@
{
"article0link": "https://www.freecodecamp.org/news/what-is-javascript-javascript-code-explained-in-plain-english/",
"article0title": "What is JavaScript?",
"article1link": "https://www.freecodecamp.org/news/linux-list-processes-how-to-check-running-processes/",
"article1title": "Linux List Processes",
"article2link": "https://www.freecodecamp.org/news/web-page-text-editor-how-to-open-html-code-in-mac-textedit/",
"article2title": "Web Page Text Editor",
"article3link": "https://www.freecodecamp.org/news/what-is-open-source-software-explained-in-plain-english/",
"article3title": "What is Open Source?",
"article4link": "https://www.freecodecamp.org/news/protect-yourself-against-sim-swapping-attacks/",
"article4title": "Sim Swapping Attacks",
"article5link": "https://www.freecodecamp.org/news/rng-meaning-what-does-rng-stand-for-in-gaming/",
"article5title": "RNG Meaning in Gaming",
"article6link": "https://www.freecodecamp.org/news/the-model-view-controller-pattern-mvc-architecture-and-frameworks-explained/",
"article6title": "Model View Controller",
"article7link": "https://www.freecodecamp.org/news/front-end-developer-what-is-front-end-development-explained-in-plain-english/",
"article7title": "Front End Development",
"article8link": "https://www.freecodecamp.org/news/what-is-a-full-stack-developer-back-end-front-end-full-stack-engineer/",
"article8title": "Full Stack Developer?",
"article9link": "https://www.freecodecamp.org/news/javascript-switch-case-js-switch-statement-example/",
"article9title": "JavaScript Switch Case",
"article10link": "https://www.freecodecamp.org/news/bash-sleep-how-to-make-a-shell-script-wait-n-seconds-example-command/",
"article10title": "Bash Sleep",
"article11link": "https://www.freecodecamp.org/news/bash-array-how-to-declare-an-array-of-strings-in-a-bash-script/",
"article11title": "Bash Array",
"article12link": "https://www.freecodecamp.org/news/what-is-a-cv-and-how-is-it-different-from-a-resume/",
"article12title": "What is a CV?",
"article13link": "https://www.freecodecamp.org/news/coding-programs-101-ways-to-learn-to-code-for-free/",
"article13title": "Coding Programs",
"article14link": "https://www.freecodecamp.org/news/how-to-exit-vim/",
"article14title": "How to Exit Vim",
"article15link": "https://www.freecodecamp.org/news/html-line-break-how-to-break-a-line-with-the-html-br-tag/",
"article15title": "HTML Line Break",
"article16link": "https://www.freecodecamp.org/news/how-to-convert-a-string-to-an-int-in-c-tutorial-with-example-code/",
"article16title": "C# String to Int",
"article17link": "https://www.freecodecamp.org/news/logical-fallacies-definition-fallacy-examples/",
"article17title": "Logical fallacies",
"article18link": "https://www.freecodecamp.org/news/javascript-online-html-css-js-code-editor-list-browser-ide-tools/",
"article18title": "JavaScript Online",
"article19link": "https://www.freecodecamp.org/news/sql-case-statement-tutorial-with-when-then-clause-example-queries/",
"article19title": "SQL Case Statement",
"article20link": "https://www.freecodecamp.org/news/javascript-tolowercase-how-to-convert-a-string-to-lowercase-and-uppercase-in-js/",
"article20title": "JavaScript toLowerCase",
"article21link": "https://www.freecodecamp.org/news/angular-ngclass-example/",
"article21title": "Angular NgClass Example",
"article22link": "https://www.freecodecamp.org/news/sql-aggregate-functions-with-example-data-queries-for-beginners/",
"article22title": "SQL Aggregate Functions",
"article23link": "https://www.freecodecamp.org/news/what-is-web-development-how-to-become-a-web-developer-career-path/",
"article23title": "What is Web Development?",
"article24link": "https://www.freecodecamp.org/news/the-best-way-to-learn-python-python-programming-tutorial-for-beginners/",
"article24title": "Best Way to Learn Python",
"article25link": "https://www.freecodecamp.org/news/word-count-in-google-docs-tutorial-counting-words-and-characters-in-a-google-doc-or-word-file/",
"article25title": "Word Count in Google Docs",
"article26link": "https://www.freecodecamp.org/news/how-to-use-node-environment-variables-with-a-dotenv-file-for-node-js-and-npm/",
"article26title": "Node Environment Variables",
"article27link": "https://www.freecodecamp.org/news/event-viewer-how-to-access-the-windows-10-activity-log/",
"article27title": "Event Viewer in Windows 10",
"article28link": "https://www.freecodecamp.org/news/combine-first-last-names-excel/",
"article28title": "Combine 1st/Last Name Excel",
"article29link": "https://www.freecodecamp.org/news/javascript-if-else-and-if-then-js-conditional-statements/",
"article29title": "JavaScript if-else & if-then"
}

View File

@@ -6,7 +6,6 @@ import linksSchema from './locales/english/links.json';
import metaTagsSchema from './locales/english/meta-tags.json';
import motivationSchema from './locales/english/motivation.json';
import translationsSchema from './locales/english/translations.json';
import trendingSchema from './locales/english/trending.json';
type MotivationalQuotes = { quote: string; author: string }[];
@@ -113,7 +112,6 @@ const noEmptyObjectValues = (
* fetching within iterative function.
*/
const translationSchemaKeys = Object.keys(flattenAnObject(translationsSchema));
const trendingSchemaKeys = Object.keys(flattenAnObject(trendingSchema));
const motivationSchemaKeys = Object.keys(flattenAnObject(motivationSchema));
const introSchemaKeys = Object.keys(flattenAnObject(introSchema));
const metaTagsSchemaKeys = Object.keys(flattenAnObject(metaTagsSchema));
@@ -137,19 +135,6 @@ const translationSchemaValidation = (languages: string[]) => {
});
};
/**
* Function that checks the trending.json file
* for each available client language.
* @param {String[]} languages List of languages to test
*/
const trendingSchemaValidation = (languages: string[]) => {
languages.forEach(language => {
void readJsonFile(language, 'trending').then(fileJson => {
schemaValidation(language, 'trending', fileJson, trendingSchemaKeys);
});
});
};
/**
* Function that checks the motivation.json file
* for each available client language.
@@ -253,7 +238,6 @@ const readJsonFile = async (language: string, fileName: string) => {
const translatedLangs = availableLangs.client.filter(x => x !== 'english');
translationSchemaValidation(translatedLangs);
trendingSchemaValidation(translatedLangs);
motivationSchemaValidation(translatedLangs);
introSchemaValidation(translatedLangs);
metaTagsSchemaValidation(translatedLangs);

View File

@@ -0,0 +1,68 @@
import Joi from 'joi';
const schema = Joi.object().keys({
article0title: Joi.string().required(),
article0link: Joi.string().uri({ scheme: 'https' }).required(),
article1title: Joi.string().required(),
article1link: Joi.string().uri({ scheme: 'https' }).required(),
article2title: Joi.string().required(),
article2link: Joi.string().uri({ scheme: 'https' }).required(),
article3title: Joi.string().required(),
article3link: Joi.string().uri({ scheme: 'https' }).required(),
article4title: Joi.string().required(),
article4link: Joi.string().uri({ scheme: 'https' }).required(),
article5title: Joi.string().required(),
article5link: Joi.string().uri({ scheme: 'https' }).required(),
article6title: Joi.string().required(),
article6link: Joi.string().uri({ scheme: 'https' }).required(),
article7title: Joi.string().required(),
article7link: Joi.string().uri({ scheme: 'https' }).required(),
article8title: Joi.string().required(),
article8link: Joi.string().uri({ scheme: 'https' }).required(),
article9title: Joi.string().required(),
article9link: Joi.string().uri({ scheme: 'https' }).required(),
article10title: Joi.string().required(),
article10link: Joi.string().uri({ scheme: 'https' }).required(),
article11title: Joi.string().required(),
article11link: Joi.string().uri({ scheme: 'https' }).required(),
article12title: Joi.string().required(),
article12link: Joi.string().uri({ scheme: 'https' }).required(),
article13title: Joi.string().required(),
article13link: Joi.string().uri({ scheme: 'https' }).required(),
article14title: Joi.string().required(),
article14link: Joi.string().uri({ scheme: 'https' }).required(),
article15title: Joi.string().required(),
article15link: Joi.string().uri({ scheme: 'https' }).required(),
article16title: Joi.string().required(),
article16link: Joi.string().uri({ scheme: 'https' }).required(),
article17title: Joi.string().required(),
article17link: Joi.string().uri({ scheme: 'https' }).required(),
article18title: Joi.string().required(),
article18link: Joi.string().uri({ scheme: 'https' }).required(),
article19title: Joi.string().required(),
article19link: Joi.string().uri({ scheme: 'https' }).required(),
article20title: Joi.string().required(),
article20link: Joi.string().uri({ scheme: 'https' }).required(),
article21title: Joi.string().required(),
article21link: Joi.string().uri({ scheme: 'https' }).required(),
article22title: Joi.string().required(),
article22link: Joi.string().uri({ scheme: 'https' }).required(),
article23title: Joi.string().required(),
article23link: Joi.string().uri({ scheme: 'https' }).required(),
article24title: Joi.string().required(),
article24link: Joi.string().uri({ scheme: 'https' }).required(),
article25title: Joi.string().required(),
article25link: Joi.string().uri({ scheme: 'https' }).required(),
article26title: Joi.string().required(),
article26link: Joi.string().uri({ scheme: 'https' }).required(),
article27title: Joi.string().required(),
article27link: Joi.string().uri({ scheme: 'https' }).required(),
article28title: Joi.string().required(),
article28link: Joi.string().uri({ scheme: 'https' }).required(),
article29title: Joi.string().required(),
article29link: Joi.string().uri({ scheme: 'https' }).required()
});
export const trendingSchemaValidator = trendingObj => {
return schema.validate(trendingObj);
};

8081
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@
"clean:curriculum": "npx --yes rimraf ./config/curriculum.json",
"clean:packages": "npx --yes rimraf ./**/node_modules",
"clean:server": "npx --yes rimraf ./api-server/lib",
"create:config": "tsc -p config && npm run ensure-env",
"create:config": "tsc -p config && npm run ensure-env && npm run download-trending",
"create:utils": "tsc -p utils",
"precypress": "node ./cypress-install.js",
"cypress": "cypress",
@@ -71,6 +71,7 @@
"e2e:dev:watch": "start-test develop ':3000/status/ping|8000' cypress:dev:watch",
"e2e:prd:run": "npm run build && start-test ':3000/status/ping|8000' cypress:dev:run",
"e2e:prd:watch": "npm run build && start-test ':3000/status/ping|8000' cypress:dev:watch",
"download-trending": "ts-node ./tools/scripts/build/download-trending.ts",
"ensure-env": "cross-env DEBUG=fcc:* ts-node ./tools/scripts/build/ensure-env.ts",
"format": "run-s format:eslint format:prettier",
"format:curriculum": "run-s format:curriculum:eslint format:curriculum:prettier",

View File

@@ -0,0 +1,47 @@
import { writeFileSync } from 'fs';
import fetch from 'node-fetch';
import yaml from 'js-yaml';
import { trendingSchemaValidator } from '../../../client/i18n/schema/trendingSchema';
import envData from '../../../config/env.json';
const { clientLocale } = envData;
const createCdnUrl = (lang: string) =>
`https://cdn.freecodecamp.org/universal/trending/${lang}.yaml`;
const download = async () => {
const url = createCdnUrl(clientLocale);
const res = await fetch(url);
if (!res.ok) {
throw new Error(
`
----------------------------------------------------
Error: The CDN is missing the trending YAML file.
----------------------------------------------------
Unable to fetch the ${clientLocale} footer: ${res.statusText}
`
);
}
const data = await res.text();
const trendingJSON = JSON.stringify(yaml.load(data));
const trendingLocation = `./client/i18n/locales/${clientLocale}/trending.json`;
writeFileSync(trendingLocation, trendingJSON);
const trendingObject = JSON.parse(trendingJSON) as Record<string, string>;
const validationError =
(trendingSchemaValidator(trendingObject).error as Error) || null;
if (validationError) {
throw new Error(
`
----------------------------------------------------
Error: The trending JSON is invalid.
----------------------------------------------------
Unable to validate the ${clientLocale} trending JSON schema: ${validationError.message}
`
);
}
};
void download();

View File

@@ -19,8 +19,10 @@
"author": "freeCodeCamp <team@freecodecamp.org>",
"main": "none",
"devDependencies": {
"@types/js-yaml": "4.0.5",
"debug": "4.3.2",
"dotenv": "16.0.3",
"js-yaml": "4.1.0",
"readdirp": "3.6.0"
}
}