page.tsx 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import { allChangelogs } from '@/.contentlayer/generated';
  2. import Mdx from '@/components/MDX';
  3. import { dateTemplate, distanceToNow, format } from '@/lib/date';
  4. export const metadata = {
  5. title: 'Changelog',
  6. description: 'Discover the latest Tabler app updates and enhancements on our Changelog page. Stay informed and experience the best features!',
  7. };
  8. export default function ChangelogPage() {
  9. const changelogs = allChangelogs
  10. .sort((a, b) => {
  11. return new Date(a.date).getTime() - new Date(b.date).getTime();
  12. })
  13. .reverse();
  14. return (
  15. <>
  16. <section className="section pb-0">
  17. <div className="container">
  18. <div className="section-header mb-0">
  19. <h2 className="section-title section-title-lg">Changelog</h2>
  20. <p className="section-description">
  21. Most recent updates, bug fixes, and introduction of new features.
  22. </p>
  23. </div>
  24. </div>
  25. </section>
  26. <section className="section">
  27. <div className="container container-narrow">
  28. <div className="timeline">
  29. {changelogs.map((changelog) => (
  30. <div className="row g-7 timeline-item" key={changelog.version}>
  31. <div className="col-3 timeline-summary">
  32. <div className="font-medium font-h4">v{changelog.version}</div>
  33. <div
  34. className="text-muted mb-3 font-h6"
  35. itemProp="datePublished"
  36. content={format(changelog.date, 'yyyy-MM-dd')}
  37. >
  38. Published{' '}
  39. <time
  40. dateTime={dateTemplate(changelog.date)}
  41. className="text-muted"
  42. >
  43. {distanceToNow(changelog.date)}
  44. </time>
  45. </div>
  46. </div>
  47. <div className="col-9 timeline-description">
  48. {changelog.title && <h3 className="mb-3">{changelog.title}</h3>}
  49. <div className="markdown">
  50. <Mdx code={changelog.body.code} />
  51. </div>
  52. </div>
  53. </div>
  54. ))}
  55. </div>
  56. </div>
  57. </section>
  58. </>
  59. );
  60. }