Xianbao QIAN commited on
Commit
f831b65
1 Parent(s): 31767a7

update with release date

Browse files
Files changed (44) hide show
  1. content/policies/ai-capacity-building-inclusiveness-plan-2024/en.md +6 -0
  2. content/policies/ai-capacity-building-inclusiveness-plan-2024/zh.md +7 -0
  3. content/policies/ai-generated-synthetic-content-identification-measures-draft-2024/en.md +6 -0
  4. content/policies/ai-generated-synthetic-content-identification-measures-draft-2024/zh.md +7 -0
  5. content/policies/ai-global-governance-shanghai-declaration-2024/en.md +6 -0
  6. content/policies/ai-global-governance-shanghai-declaration-2024/zh.md +7 -0
  7. content/policies/ai-industry-development-plan-2018-2020/en.md +7 -0
  8. content/policies/ai-industry-development-plan-2018-2020/zh.md +7 -0
  9. content/policies/ai-security-governance-framework-1.0-2024/en.md +6 -0
  10. content/policies/ai-security-governance-framework-1.0-2024/zh.md +7 -0
  11. content/policies/china-ai-law-scholar-proposal-2024-alt/en.md +7 -0
  12. content/policies/china-ai-law-scholar-proposal-2024-alt/zh.md +7 -0
  13. content/policies/china-ai-law-scholar-proposal-2024/en.md +6 -0
  14. content/policies/china-ai-law-scholar-proposal-2024/zh.md +7 -0
  15. content/policies/china-france-joint-statement-ai-global-governance-2024/en.md +6 -0
  16. content/policies/china-france-joint-statement-ai-global-governance-2024/zh.md +7 -0
  17. content/policies/china-position-paper-ai-ethics-governance-2022/en.md +7 -0
  18. content/policies/china-position-paper-ai-ethics-governance-2022/zh.md +7 -0
  19. content/policies/china-position-paper-ai-military-applications-2021/en.md +6 -0
  20. content/policies/china-position-paper-ai-military-applications-2021/zh.md +7 -0
  21. content/policies/china-position-paper-laws-2024/en.md +6 -0
  22. content/policies/china-position-paper-laws-2024/zh.md +7 -0
  23. content/policies/data-safety/en.md +0 -5
  24. content/policies/data-safety/zh.md +0 -7
  25. content/policies/generative-ai-service-management-interim-measures-2023-press-qa/en.md +6 -0
  26. content/policies/generative-ai-service-management-interim-measures-2023-press-qa/zh.md +7 -0
  27. content/policies/generative-ai-service-management-interim-measures-2023/en.md +7 -0
  28. content/policies/generative-ai-service-management-interim-measures-2023/zh.md +7 -0
  29. content/policies/generative-ai-service-management-measures-draft-2023/en.md +6 -0
  30. content/policies/generative-ai-service-management-measures-draft-2023/zh.md +7 -0
  31. content/policies/generative-ai-service-security-basic-requirements-2024/en.md +6 -0
  32. content/policies/generative-ai-service-security-basic-requirements-2024/zh.md +7 -0
  33. content/policies/global-ai-governance-initiative-2023/en.md +6 -0
  34. content/policies/global-ai-governance-initiative-2023/zh.md +7 -0
  35. content/policies/global-ai/en.md +0 -5
  36. content/policies/global-ai/zh.md +0 -3
  37. content/policies/internet-deep-synthesis-management-provisions-2022/en.md +7 -0
  38. content/policies/internet-deep-synthesis-management-provisions-2022/zh.md +7 -0
  39. content/policies/national-ai-industry-standardization-system-construction-guidelines-2024/en.md +6 -0
  40. content/policies/national-ai-industry-standardization-system-construction-guidelines-2024/zh.md +7 -0
  41. content/policies/network-data-security-management-regulations-2024/en.md +7 -0
  42. content/policies/network-data-security-management-regulations-2024/zh.md +7 -0
  43. src/components/AIPoliciesTable.tsx +8 -1
  44. src/pages/index.tsx +23 -33
content/policies/ai-capacity-building-inclusiveness-plan-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Artificial Intelligence Capacity Building Inclusiveness Plan
3
+ releaseDate: 2024-09-27
4
+ ---
5
+
6
+ September 27, 2024
content/policies/ai-capacity-building-inclusiveness-plan-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 人工智能能力建设普惠计划
3
+ originalLink: https://www.mfa.gov.cn/web/wjbzhd/202409/t20240927_11498463.shtml
4
+ releaseDate: 2024-09-27
5
+ ---
6
+
7
+ 2024年9月27日
content/policies/ai-generated-synthetic-content-identification-measures-draft-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Notice of the Cyberspace Administration of China on Public Consultation on the "Measures for the Identification of Artificial Intelligence Generated Synthetic Content (Draft for Comments)"
3
+ releaseDate: 2024-09-14
4
+ ---
5
+
6
+ September 14, 2024
content/policies/ai-generated-synthetic-content-identification-measures-draft-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 国家互联网信息办公室关于《人工智能生成合成内容标识办法(征求意见稿)》公开征求意见的通知
3
+ originalLink: https://www.cac.gov.cn/2024-09/14/c_1728000676244628.htm
4
+ releaseDate: 2024-09-14
5
+ ---
6
+
7
+ 2024年9月14日
content/policies/ai-global-governance-shanghai-declaration-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Shanghai Declaration on Global Governance of Artificial Intelligence (Full Text)
3
+ releaseDate: 2024-07-04
4
+ ---
5
+
6
+ July 4, 2024
content/policies/ai-global-governance-shanghai-declaration-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 人工智能全球治理上海宣言(全文)
3
+ originalLink: https://www.gov.cn/yaowen/liebiao/202407/content_6961358.htm
4
+ releaseDate: 2024-07-04
5
+ ---
6
+
7
+ 2024年7月4日
content/policies/ai-industry-development-plan-2018-2020/en.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Notice of the Ministry of Industry and Information Technology on Printing and Distributing the Three-Year Action Plan for Promoting the Development of New Generation Artificial Intelligence Industry (2018-2020)
3
+ releaseDate: 2017-12-15
4
+ ---
5
+
6
+ Full text of the notice
7
+
content/policies/ai-industry-development-plan-2018-2020/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 工业和信息化部关于印发《促进新一代人工智能产业发展三年行动计划(2018-2020年)》的通知
3
+ originalLink: https://www.cac.gov.cn/2017-12/15/c_1122114520.htm
4
+ releaseDate: 2017-12-15
5
+ ---
6
+
7
+ 通知全文
content/policies/ai-security-governance-framework-1.0-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Release of "Artificial Intelligence Security Governance Framework" Version 1.0
3
+ releaseDate: 2024-09-09
4
+ ---
5
+
6
+ September 9, 2024
content/policies/ai-security-governance-framework-1.0-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 《人工智能安全治理框架》1.0版发布
3
+ originalLink: https://www.cac.gov.cn/2024-09/09/c_1727567886199789.htm
4
+ releaseDate: 2024-09-09
5
+ ---
6
+
7
+ 2024年9月9日
content/policies/china-ai-law-scholar-proposal-2024-alt/en.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Artificial Intelligence Law of the People's Republic of China (Scholar Proposal Draft)"
3
+ originalLink: https://m.21jingji.com/article/20240416/herald/4df710ffed0ffe037cdf6c54aa369961_zaker.html
4
+ releaseDate: 2024-04-16
5
+ ---
6
+
7
+ Another version
content/policies/china-ai-law-scholar-proposal-2024-alt/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 《中华人民共和国人工智能法(学者建议稿)》
3
+ releaseDate: 2024-04-16
4
+ originalLink: http://iolaw.cssn.cn/zxzp/202309/W020230907361599893636.pdf
5
+ ---
6
+
7
+ 另一个版本
content/policies/china-ai-law-scholar-proposal-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Artificial Intelligence Law of the People's Republic of China (Scholar Proposal Draft)"
3
+ releaseDate: 2024-03-18
4
+ ---
5
+
6
+ March 18, 2024
content/policies/china-ai-law-scholar-proposal-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 《中华人民共和国人工智能法(学者建议稿)》
3
+ originalLink: http://www.fxcxw.org.cn/dyna/content.php?id=26910
4
+ releaseDate: 2024-03-18
5
+ ---
6
+
7
+ 2024年3月18日
content/policies/china-france-joint-statement-ai-global-governance-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Joint Statement of the People's Republic of China and the French Republic on Artificial Intelligence and Global Governance
3
+ releaseDate: 2024-05-07
4
+ ---
5
+
6
+ May 7, 2024
content/policies/china-france-joint-statement-ai-global-governance-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 中华人民共和国和法兰西共和国关于人工智能和全球治理的联合声明
3
+ originalLink: https://www.mfa.gov.cn/zyxw/202405/t20240507_11293821.shtml
4
+ releaseDate: 2024-05-07
5
+ ---
6
+
7
+ 2024年5月7日
content/policies/china-position-paper-ai-ethics-governance-2022/en.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: China's Position Paper on Strengthening Ethical Governance of Artificial Intelligence
3
+ releaseDate: 2022-11-17
4
+ ---
5
+
6
+ November 17, 2022
7
+
content/policies/china-position-paper-ai-ethics-governance-2022/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 中国关于加强人工智能伦理治理的立场文件
3
+ originalLink: https://www.mfa.gov.cn/web/ziliao_674904/zcwj_674915/202211/t20221117_10976728.shtml
4
+ releaseDate: 2022-11-17
5
+ ---
6
+
7
+ 2022年11月17日
content/policies/china-position-paper-ai-military-applications-2021/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: China's Position Paper on Regulating Military Applications of Artificial Intelligence
3
+ releaseDate: 2021-12-14
4
+ ---
5
+
6
+ December 14, 2021
content/policies/china-position-paper-ai-military-applications-2021/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 中国关于规范人工智能军事应用的立场文件
3
+ originalLink: https://www.mfa.gov.cn/web/ziliao_674904/zcwj_674915/202112/t20211214_10469511.shtml
4
+ releaseDate: 2021-12-14
5
+ ---
6
+
7
+ 2021年12月14日
content/policies/china-position-paper-laws-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: China's Position Paper Submitted to the UN Secretary-General on the Issue of "Lethal Autonomous Weapons Systems"
3
+ releaseDate: 2024-05-23
4
+ ---
5
+
6
+ May 23, 2024
content/policies/china-position-paper-laws-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 中国就"致命性自主武器系统"问题向联合国秘书长提交的文件
3
+ originalLink: https://www.mfa.gov.cn/web/wjb_673085/zzjg_673183/jks_674633/fywj_674643/202405/t20240523_11310587.shtml
4
+ releaseDate: 2024-05-23
5
+ ---
6
+
7
+ 2024年5月23日
content/policies/data-safety/en.md DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- title: English Policy Title
3
- language: English
4
- originalLink: https://example.com/policy1/en
5
- ---
 
 
 
 
 
 
content/policies/data-safety/zh.md DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- title: 中文政策标题
3
- language: 中文
4
- originalLink: https://abc.com
5
- ---
6
-
7
- 这是中文版的政策内容。
 
 
 
 
 
 
 
 
content/policies/generative-ai-service-management-interim-measures-2023-press-qa/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Answering Reporters' Questions
3
+ releaseDate: 2023-07-13
4
+ ---
5
+
6
+ July 13, 2023
content/policies/generative-ai-service-management-interim-measures-2023-press-qa/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 回答记者问
3
+ originalLink: https://www.cac.gov.cn/2023-07/13/c_1690898326863363.htm
4
+ releaseDate: 2023-07-13
5
+ ---
6
+
7
+ 2023年07月13日
content/policies/generative-ai-service-management-interim-measures-2023/en.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Interim Measures for the Management of Generative Artificial Intelligence Services
3
+ releaseDate: 2023-07-13
4
+ ---
5
+
6
+ July 13, 2023
7
+
content/policies/generative-ai-service-management-interim-measures-2023/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 生成式人工智能服务管理暂行办法
3
+ originalLink: https://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm
4
+ releaseDate: 2023-07-13
5
+ ---
6
+
7
+ 2023年07月13日
content/policies/generative-ai-service-management-measures-draft-2023/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Notice of the Cyberspace Administration of China on Public Consultation on the "Measures for the Management of Generative Artificial Intelligence Services (Draft for Comments)"
3
+ releaseDate: 2023-04-11
4
+ ---
5
+
6
+ April 11, 2023
content/policies/generative-ai-service-management-measures-draft-2023/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 国家互联网信息办公室关于《生成式人工智能服务管理办法(征求意见稿)》公开征求意见的通知
3
+ originalLink: https://www.cac.gov.cn/2023-04/11/c_1682854275475410.htm
4
+ releaseDate: 2023-04-11
5
+ ---
6
+
7
+ 2023年04月11日
content/policies/generative-ai-service-security-basic-requirements-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Basic Security Requirements for Generative Artificial Intelligence Services
3
+ releaseDate: 2024-02-29
4
+ ---
5
+
6
+ February 29, 2024
content/policies/generative-ai-service-security-basic-requirements-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 生成式人工智能服务安全基本要求
3
+ originalLink: https://www.tc260.org.cn/upload/2023-10-11/1697008495851003865.pdf
4
+ releaseDate: 2024-02-29
5
+ ---
6
+
7
+ 2024年2月29日
content/policies/global-ai-governance-initiative-2023/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Global Initiative on Artificial Intelligence Governance
3
+ releaseDate: 2023-10-18
4
+ ---
5
+
6
+ October 18, 2023
content/policies/global-ai-governance-initiative-2023/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 全球人工智能治理倡议
3
+ originalLink: https://www.cac.gov.cn/2023-10/18/c_1699291032884978.htm
4
+ releaseDate: 2023-10-18
5
+ ---
6
+
7
+ 2023年10月18日
content/policies/global-ai/en.md DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- title: Global AI Policy
3
- ---
4
-
5
- Test global policy
 
 
 
 
 
 
content/policies/global-ai/zh.md DELETED
@@ -1,3 +0,0 @@
1
- ---
2
- title: 全球人工智能治理倡议
3
- ---
 
 
 
 
content/policies/internet-deep-synthesis-management-provisions-2022/en.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Provisions on the Management of Deep Synthesis of Internet Information Services
3
+ releaseDate: 2022-12-11
4
+ ---
5
+
6
+ December 11, 2022
7
+
content/policies/internet-deep-synthesis-management-provisions-2022/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 互联网信息服务深度合成管理规定
3
+ originalLink: https://www.cac.gov.cn/2022-12/11/c_1672221949354811.htm
4
+ releaseDate: 2022-12-11
5
+ ---
6
+
7
+ 2022年12月11日
content/policies/national-ai-industry-standardization-system-construction-guidelines-2024/en.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ title: Notice of Four Departments on Printing and Distributing the Guidelines for the Construction of National Artificial Intelligence Industry Comprehensive Standardization System (2024 Edition)
3
+ releaseDate: 2024-07-03
4
+ ---
5
+
6
+ July 3, 2024
content/policies/national-ai-industry-standardization-system-construction-guidelines-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 四部门关于印发国家人工智能产业综合标准化体系建设指南(2024版)的通知
3
+ originalLink: https://www.cac.gov.cn/2024-07/03/c_1721686809220407.htm
4
+ releaseDate: 2024-07-03
5
+ ---
6
+
7
+ 2024年7月3日
content/policies/network-data-security-management-regulations-2024/en.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Network Data Security Management Regulations
3
+ releaseDate: 2024-09-01
4
+ ---
5
+
6
+ September 1, 2024
7
+
content/policies/network-data-security-management-regulations-2024/zh.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 网络数据安全管理条例
3
+ originalLink: https://www.gov.cn/zhengce/content/202409/content_6977766.htm
4
+ releaseDate: 2024-09-01
5
+ ---
6
+
7
+ 2024年9月1日
src/components/AIPoliciesTable.tsx CHANGED
@@ -6,6 +6,7 @@ interface PolicyData {
6
  slug: string;
7
  fileName: string;
8
  originalLink?: string;
 
9
  }
10
 
11
  interface AIPoliciesTableProps {
@@ -22,9 +23,14 @@ const AIPoliciesTable: React.FC<AIPoliciesTableProps> = ({ policies }) => {
22
  groupedPolicies[policy.slug].push(policy);
23
  });
24
 
 
 
 
 
 
25
  return (
26
  <div className="my-8">
27
- <h2 className="text-2xl font-bold mb-4 dark:text-white">AI Policies</h2>
28
  <div className="overflow-x-auto">
29
  <table className="w-full border-collapse table-auto">
30
  <tbody>
@@ -37,6 +43,7 @@ const AIPoliciesTable: React.FC<AIPoliciesTableProps> = ({ policies }) => {
37
  <td className="py-2 px-4 dark:text-white">
38
  <div>{zhPolicy?.title}</div>
39
  <div className="text-sm text-gray-500 dark:text-gray-400">{enPolicy?.title}</div>
 
40
  </td>
41
  <td className="py-2 px-4">
42
  {policies.map((policy) => (
 
6
  slug: string;
7
  fileName: string;
8
  originalLink?: string;
9
+ releaseDate: string;
10
  }
11
 
12
  interface AIPoliciesTableProps {
 
23
  groupedPolicies[policy.slug].push(policy);
24
  });
25
 
26
+ // Sort the policies within each group based on releaseDate in descending order
27
+ Object.values(groupedPolicies).forEach((group) => {
28
+ group.sort((a, b) => new Date(b.releaseDate).getTime() - new Date(a.releaseDate).getTime());
29
+ });
30
+
31
  return (
32
  <div className="my-8">
33
+ {/* <h2 className="text-2xl font-bold mb-4 dark:text-white">AI Policies from the Chinese government</h2> */}
34
  <div className="overflow-x-auto">
35
  <table className="w-full border-collapse table-auto">
36
  <tbody>
 
43
  <td className="py-2 px-4 dark:text-white">
44
  <div>{zhPolicy?.title}</div>
45
  <div className="text-sm text-gray-500 dark:text-gray-400">{enPolicy?.title}</div>
46
+ <div className="text-xs text-gray-400 dark:text-gray-500">{zhPolicy?.releaseDate}</div>
47
  </td>
48
  <td className="py-2 px-4">
49
  {policies.map((policy) => (
src/pages/index.tsx CHANGED
@@ -37,6 +37,7 @@ interface PolicyData {
37
  originalLink: string;
38
  slug: string;
39
  fileName: string;
 
40
  }
41
 
42
  export async function getStaticProps() {
@@ -66,25 +67,38 @@ export async function getStaticProps() {
66
  const { data: zhData } = matter(zhContent);
67
  const { data: enData } = matter(enContent);
68
 
69
- policyData.push({ ...zhData, slug: folder, fileName: 'zh.md' } as PolicyData);
70
- policyData.push({ ...enData, slug: folder, fileName: 'en.md' } as PolicyData);
 
 
 
 
 
 
 
 
 
 
71
  }
72
  }
73
 
 
 
 
 
 
 
 
74
  return {
75
  props: {
76
- // calendarData,
77
- // providers: updatedProviders,
78
- policyData, // Pass policy data as props
79
  },
80
- revalidate: 3600, // regenerate every hour
81
  };
82
  } catch (error) {
83
  console.error("Error fetching data:", error);
84
  return {
85
  props: {
86
- // calendarData: {},
87
- // providers: PROVIDERS,
88
  policyData: [], // Pass empty policy data as props
89
  },
90
  revalidate: 60, // retry after 1 minute if there was an error
@@ -108,36 +122,12 @@ export async function getStaticProps() {
108
  // });
109
 
110
  const OpenSourceHeatmap: React.FC<{ policyData: PolicyData[] }> = ({
111
- // calendarData,
112
- // providers,
113
  policyData,
114
  }) => {
115
- // const [isLoading, setIsLoading] = useState(true);
116
-
117
- // useEffect(() => {
118
- // if (calendarData && Object.keys(calendarData).length > 0) {
119
- // setIsLoading(false);
120
- // }
121
- // }, [calendarData]);
122
-
123
- // const sortedProviders = useMemo(() =>
124
- // providers.sort((a, b) =>
125
- // calendarData[b.fullName || b.authors[0]].reduce(
126
- // (sum, day) => sum + day.count,
127
- // 0
128
- // ) -
129
- // calendarData[a.fullName || a.authors[0]].reduce(
130
- // (sum, day) => sum + day.count,
131
- // 0
132
- // )
133
- // ),
134
- // [providers, calendarData]
135
- // );
136
-
137
  return (
138
  <div className="w-full max-w-screen-lg mx-auto p-4 py-16 dark:bg-gray-900 dark:text-white">
139
  <h1 className="text-3xl lg:text-5xl mt-16 font-bold text-center mb-2">
140
- Hugging Face Heatmap 🤗
141
  </h1>
142
 
143
  <AIPoliciesTable policies={policyData} />
 
37
  originalLink: string;
38
  slug: string;
39
  fileName: string;
40
+ releaseDate: string;
41
  }
42
 
43
  export async function getStaticProps() {
 
67
  const { data: zhData } = matter(zhContent);
68
  const { data: enData } = matter(enContent);
69
 
70
+ policyData.push({
71
+ ...zhData,
72
+ slug: folder,
73
+ fileName: 'zh.md',
74
+ releaseDate: zhData.releaseDate ? zhData.releaseDate.toString() : '',
75
+ } as PolicyData);
76
+ policyData.push({
77
+ ...enData,
78
+ slug: folder,
79
+ fileName: 'en.md',
80
+ releaseDate: enData.releaseDate ? enData.releaseDate.toString() : '',
81
+ } as PolicyData);
82
  }
83
  }
84
 
85
+ // Sort policyData based on releaseDate in descending order
86
+ policyData.sort((a, b) => {
87
+ const dateA = a.releaseDate ? new Date(a.releaseDate).getTime() : 0;
88
+ const dateB = b.releaseDate ? new Date(b.releaseDate).getTime() : 0;
89
+ return dateB - dateA;
90
+ });
91
+
92
  return {
93
  props: {
94
+ policyData,
 
 
95
  },
96
+ revalidate: 3600,
97
  };
98
  } catch (error) {
99
  console.error("Error fetching data:", error);
100
  return {
101
  props: {
 
 
102
  policyData: [], // Pass empty policy data as props
103
  },
104
  revalidate: 60, // retry after 1 minute if there was an error
 
122
  // });
123
 
124
  const OpenSourceHeatmap: React.FC<{ policyData: PolicyData[] }> = ({
 
 
125
  policyData,
126
  }) => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  return (
128
  <div className="w-full max-w-screen-lg mx-auto p-4 py-16 dark:bg-gray-900 dark:text-white">
129
  <h1 className="text-3xl lg:text-5xl mt-16 font-bold text-center mb-2">
130
+ China AI policy research 🤗
131
  </h1>
132
 
133
  <AIPoliciesTable policies={policyData} />