Skip to content

Commit 3b2b45a

Browse files
committed
feat: added news API
1 parent ffa373c commit 3b2b45a

12 files changed

Lines changed: 534 additions & 0 deletions

File tree

next.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ const nextConfig = {
88
output: isE2E ? undefined : 'export',
99
reactStrictMode: true,
1010
trailingSlash: true,
11+
async rewrites() {
12+
return [
13+
{
14+
source: '/api/news/:path',
15+
destination: '/api/news/:path.json',
16+
},
17+
];
18+
},
1119
};
1220

1321
export default nextConfig;

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7+
"prebuild": "npm run generate:news-api",
78
"build": "next build",
89
"postbuild": "cp -f static/.htaccess out/.htaccess || true",
910
"lint": "eslint .",
@@ -18,6 +19,7 @@
1819
"test:e2e:headed": "PLAYWRIGHT_TEST=1 playwright test --headed",
1920
"fetch:versions": "npx tsx scripts/fetch-versions.ts",
2021
"fetch:downloads": "npx tsx scripts/fetch-downloads.ts",
22+
"generate:news-api": "npx tsx scripts/generate-news-api.ts",
2123
"update:data": "npm run fetch:versions && npm run fetch:downloads",
2224
"prepare": "husky",
2325
"format": "prettier --write .",

public/api/news/2020.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"generated": "2026-02-06T13:30:02.464Z",
3+
"year": "2020",
4+
"total": 12,
5+
"news": [
6+
{
7+
"date": "2020-12-23",
8+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.0.7](/download) and\n[phpMyFAQ 3.1.0-alpha.3](/download), the \"Valéry Giscard d’Estaing\" releases. phpMyFAQ 3.0.7 fixes a XSS vulnerability\nand adds the TOC plugin for TinyMCE. We removed support for deprecated data-vocabulary.org schema and the Travis CI\nbuild and we switched to Github Actions. We updated our dependencies and we fixed all reported issues. In\nphpMyFAQ 3.1.0-alpha.3 we added the possibility to login via email address and mail notifications for new FAQs in admin\nsection. We also improved the build of our application. We updated our dependencies and we fixed all reported issues.\nHappy holidays, stay healthy and take care of yourself and families!"
9+
},
10+
{
11+
"date": "2020-11-27",
12+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.6](/download), the \"Diego Armando Maradona\" release. This release\nsupports PHP 8.0 and we fixed all reported issues. Stay healthy and take care of yourself and families!"
13+
},
14+
{
15+
"date": "2020-11-15",
16+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.0-alpha.2](/download), the \"Four Seasons\nTotal Landscaping\" release. We fixed some blocking issues in the install and update scripts. Stay healthy and take care\nof yourself and families!"
17+
},
18+
{
19+
"date": "2020-11-12",
20+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.1.0-alpha](/download), the \"Sean Connery\" release. We changed the\nPHP requirement to PHP 7.3+, and we added support for PHP 8.0. We added support for Elasticsearch v6+, drag and drop\nsorting for main categories, the possibility to add users without a password, export of all users as CSV, and a opt-in\nfor displaying user data. We switched to ChartJS as new charting library, and a added new REST API v2.1 to register\nusers and add FAQs via API client tokens. We removed several deprecated and rarely used functionality like the REST API\nv1, the RSS support, the rewrite support for IIS, password hashing with MD5 and SHA-1 and the OpenSearch support. Stay\nhealthy and take care of yourself and families!"
21+
},
22+
{
23+
"date": "2020-10-17",
24+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.0.5](/download), the \"Ruth Bader Ginsburg\"\nrelease. We updated the bundled third party dependencies, and we fixed all reported issues. Stay healthy and take care\nof yourself and families!"
25+
},
26+
{
27+
"date": "2020-07-26",
28+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.4](/download), the \"Peter Green\" release. We extended the default\nsession timeout for the administration backend, we updated our dependencies, and we fixed all reported issues. Stay\nhealthy and take care of yourself and families!"
29+
},
30+
{
31+
"date": "2020-05-21",
32+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.0.3](/download), the \"Michel Piccoli\" release.\nWe improved the editing of FAQs in the admin backend and updated to Bootstrap v4.5. We updated our dependencies and\nwe fixed all reported issues. Stay healthy and take care of yourself and families!"
33+
},
34+
{
35+
"date": "2020-03-17",
36+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.0.1](/download), the \"Max von Sydow\" release.\nWe re-added tag cloud on several pages, we fixed some minor bugs and especially issues for PostgreSQL. We updated all of\nour bundled dependencies. Stay save!"
37+
},
38+
{
39+
"date": "2020-02-16",
40+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.0](/download), the \"李文亮 (Li Wenliang)\" release. This new major\nversion after more than 3 years adds several improvements and new features. We changed PHP requirement to PHP 7.2 or\nlater, we added PHP namespaces, Docker support, support for Elasticsearch v5+, a LDAP configuration frontend, a\nconfiguration for enable/disable XML sitemap, support for category images, support for categories on homepage, a filter\nfunctionality in templates, an improved attachment overview, HTML5 export, support for EU General Data Protection\nRegulation, a multiple attachment upload, a 404 page template, a Mongolian translation, support for adding own meta\ncontent in templates and we added new REST API v2 (including login). We improved sticky records and the brute force\nprotection handling. We switched the CSS development from LESS to SCSS and the template variable syntax is now\ncompatible with Twig/Handlebars. We updated the Turkish translation and all bundled dependencies. With v3.0 we\ndeprecated RSS feeds and the old REST API v1. We removed the translation admin frontend, the XHTML export, support for\next/mssql the bundled Symfony ClassLoader, Bower (now using Yarn only), Grunt (now using Webpack) and Modernizr. We\nremoved share on Facebook link and the Facebook Like Button support."
41+
},
42+
{
43+
"date": "2020-01-24",
44+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.0.0-RC.2](/download), the \"Terry Jones\" release.\nWe fixed a lot of issue found by our test users of the first RC release and we updated all of our bundled\ndependencies. Please don't use this version in production systems, but test this version and please report bugs!"
45+
},
46+
{
47+
"date": "2020-01-04",
48+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.0-RC](/download), the \"Jan Fedder\" release. This first release\ncandidate adds a new REST API and we migrated from Grunt to Webpack. We fixed a lot of issue found by our test users of\nthe third beta release and we updated almost all of our bundled dependencies. Please don't use this version in production\nsystems, but test this version and please report bugs!"
49+
},
50+
{
51+
"date": "2019-04-16",
52+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.2](/download), the \"Stirling Moss\" release. We improved the\nhandling of multiple homepage categories and the editing of FAQs in the admin backend. We updated our dependencies and\nwe fixed all reported issues. Stay healthy and take care of yourself and families!"
53+
}
54+
]
55+
}

public/api/news/2021.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"generated": "2026-02-06T13:30:02.464Z",
3+
"year": "2021",
4+
"total": 5,
5+
"news": [
6+
{
7+
"date": "2021-10-22",
8+
"content": "---\n\nThe phpMyFAQ Team has learned of a security issue that has been discovered in our mail server configuration, a missing\nDMARC record for our domain phpmyfaq.de. We fixed that issue. [Click here to find\na detailed security advisory](/security/advisory-2021-10-22)."
9+
},
10+
{
11+
"date": "2021-04-17",
12+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.9](/download), the \"Helen McCrory \" release. This release fixes\nall reported issues. Stay healthy and take care of yourself and families!"
13+
},
14+
{
15+
"date": "2021-03-12",
16+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.0-beta](/download), the \"Happy 75th Birthday\nto Liza Minnelli\" release. We're feature complete now with the 3.1 release and we fixed all open issues. Please don't\nuse this version in production systems, but test this version and please report bugs!"
17+
},
18+
{
19+
"date": "2021-02-24",
20+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.8](/download), the \"Larry Flynt\" release. This release adds\nBootstrap v4.6 and we fixed all reported issues. Stay healthy and take care of yourself and families!"
21+
},
22+
{
23+
"date": "2021-02-12",
24+
"content": "---\n\nThe phpMyFAQ team is quietly celebrating the project's 20th birthday today - in memory of the over 2 million CoVID-19\ndeaths already worldwide. It's been a wild ride from PHP3 and MySQL 3.22 in the early days to PHP8 and multiple database\nsupport today. Thanks for the great 20 years to all users, contributors and friends of the project.\nThank you!\nThorsten"
25+
}
26+
]
27+
}

public/api/news/2022.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"generated": "2026-02-06T13:30:02.464Z",
3+
"year": "2022",
4+
"total": 13,
5+
"news": [
6+
{
7+
"date": "2022-12-11",
8+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.1.9](/download), the \"Irene Cara\" release. This release fixes\nmultiple vulnerabilities, we updated bundled dependencies, and we fixed all reported issues.\n[Click here to find a detailed security advisory](/security/advisory-2022-12-11)."
9+
},
10+
{
11+
"date": "2022-10-24",
12+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.8](/download), the \"Mahsa Amini\" release.\nThis release fixes multiple vulnerabilities, and we fixed all reported issues. [Click here to find a detailed security\nadvisory](/security/advisory-2022-10-24)."
13+
},
14+
{
15+
"date": "2022-10-02",
16+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.7](/download), the \"Elisabeth II.\" release.\nThis release fixes a CSRF vulnerability, and we fixed all reported issues. [Click here to find a detailed security\nadvisory](/security/advisory-2022-10-02)."
17+
},
18+
{
19+
"date": "2022-07-23",
20+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.1.6](/download), the \"Uwe Seeler\" release. This release fixes a\nstored XSS vulnerability, and we fixed all reported issues."
21+
},
22+
{
23+
"date": "2022-06-27",
24+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.5](/download), the \"Andrew Fletcher\" release.\nphpMyFAQ 3.1.5 adds compatibility with Elasticsearch v8+, adds trust of self-signed certificates with MS SQL, and we\nfixed all reported issues."
25+
},
26+
{
27+
"date": "2022-04-25",
28+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.1.4](/download), the \"#staywithukraine\" release. This release fixes\nan issue introduced with phpMyFAQ 3.1.3 yesterday. Stay healthy and take care of yourself and families!"
29+
},
30+
{
31+
"date": "2022-04-24",
32+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.3](/download), the \"Taylor Hawkins\" release.\nphpMyFAQ 3.1.3 fixes a login issue when using LDAP and we fixed all reported issues."
33+
},
34+
{
35+
"date": "2022-03-16",
36+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.1.2](/download), the \"William Hurt\" release. We updated our\ndependencies and we fixed all reported issues."
37+
},
38+
{
39+
"date": "2022-02-14",
40+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.1](/download), the \"Ivan Reitman\" release.\nThis release fixes an issue introduced with the final phpMyFAQ 3.1.0. We also updated the third party dependencies. Stay\nhealthy and take care of yourself and families!"
41+
},
42+
{
43+
"date": "2022-02-12",
44+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.1.0](/download) on the 21st birthday of the project, the \"Louie\nAnderson\" release. This new major version after more than 2 years adds several improvements and new features. We changed\nthe minimum PHP version to v7.4. We added support for PHP 8.0 and PHP 8.1 and Elasticsearch v6+. We also added support\nfor the following new features: drag'n'drop sorting for main categories, possibility to add users without a password and\nexport of all users as CSV. We added ChartJS as new charting library. The new REST API v2.1 allows you to register users\nand add FAQs and we added API client tokens for REST API v2.1. We also added an opt-in for displaying user data, a mail\nnotifications for new FAQs in admin section and the possibility to login via email address. We updated Bootstrap to\nv4.6 and Composer to v2. Additionally, we support the Twitter API v2. We removed the support for the old REST API v1,\nRSS support, rewrite support for IIS, password hashing with MD5 and SHA-1, OpenSearch support, XML export, auto-save for\nFAQs during editing and obsolete DbUnit tests. Stay healthy and take care of yourself and families!"
45+
},
46+
{
47+
"date": "2022-01-22",
48+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.1.0-RC](/download), the \"Meat Loaf\" release and\n[phpMyFAQ 3.0.12](/download), the \"Louie Anderson\" release. phpMyFAQ 3.1.0-RC is a release candidate without any new\nfeatures since the beta release last year but with a lot of improvements and bugfixes. The minimum PHP version is now\nv7.4. phpMyFAQ 3.0.12 fixes an issue introduced in phpMyFAQ 3.0.10 that broke the authentication when using the LDAP or\nAD authentication. Stay healthy and take care of yourself and families!"
49+
},
50+
{
51+
"date": "2022-01-18",
52+
"content": "---\n\nThe phpMyFAQ Team is pleased to announce [phpMyFAQ 3.0.11](/download), the \"Desmond Tutu\" release. This release fixes\nan issue introduced with phpMyFAQ 3.0.10 yesterday. Stay healthy and take care of yourself and families!"
53+
},
54+
{
55+
"date": "2022-01-17",
56+
"content": "---\n\nThe phpMyFAQ Team would like to announce the availability of [phpMyFAQ 3.0.10](/download), the \"Sidney Poitier\" release.\nphpMyFAQ 3.0.10 fixes multiple cross-site request forgery (CSRF) and cross-site scripting (XSS) vulnerabilities. We\nupdated our dependencies and we fixed all reported issues. Happy new year 2022, stay healthy and take care of yourself\nand families!"
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)