text: import React from 'react';
  import { Link, graphql } from "gatsby"
  import Layout from '../components/layout';
  import 'bulma/css/bulma.css'
  
  
  function TagsPage(props) {
  
      const data = props.data.allMarkdownRemark.group
  
      return (
          <Layout>
              <div className="tags">
                  <h1>Tags</h1>
                  <br></br>
                  {
                      data.map(tag => (
                          <Link to={`/${tag.fieldValue}`} >
                              {tag.fieldValue} {`(${tag.totalCount})`}
                          </Link>
                      ))
                  }
              </div>
          </Layout>
      )
  
  }
  
  
  export default TagsPage;
  
  
  export const pageQuery = graphql`
    query {
      allMarkdownRemark(
        limit: 2000) {
        group(field: frontmatter___tags) {
          fieldValue
          totalCount
        }
      }
    }
  `