import React, { ReactElement } from 'react' import { PageProps, graphql } from 'gatsby' import HeadMeta, { HeadMetaProps } from '../components/atoms/HeadMeta' import Tag from '../components/atoms/Tag' import Page from '../components/templates/Page' import * as styles from './tags.module.css' const meta: Partial = { title: 'Tags', description: 'All the tags being used.' } const TagsPage = ({ data }: PageProps): ReactElement => (
    {Array.from(data.allMarkdownRemark.group) .sort((a, b) => b.totalCount - a.totalCount) .map((tag) => (
  • ))}
) export default TagsPage export function Head(props: PageProps) { return } export const tagsPageQuery = graphql` query TagsPage { allMarkdownRemark { group(field: { frontmatter: { tags: SELECT } }) { fieldValue totalCount } } } `