Sha256: 13a67e21e7dd173179cdc84cc5da38c7ca722ba8ff1f27fd9d04bf3eb8fa4cdf

Contents?: true

Size: 669 Bytes

Versions: 16

Compression:

Stored size: 669 Bytes

Contents

<!-- Display GoatCounter pageviews -->
<script>
  document.addEventListener('DOMContentLoaded', () => {
    const pv = document.getElementById('pageviews');

    if (pv !== null) {
      const uri = location.pathname.replace(/\/$/, '');
      const url = `https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/${encodeURIComponent(uri)}.json`;

      fetch(url)
        .then((response) => response.json())
        .then((data) => {
          const count = data.count.replace(/\s/g, '');
          pv.innerText = new Intl.NumberFormat().format(count);
        })
        .catch((error) => {
          pv.innerText = '1';
        });
    }
  });
</script>

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
jekyll-theme-chirpy-g-1.0.3 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-g-1.0.2 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-g-1.0.1 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-g-1.0.0 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-1.0.2 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-0.0.4 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-1.0.1 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-0.0.3 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-0.0.2 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-0.0.1 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-0.0.0 _includes/pageviews/goatcounter.html
jekyll-theme-chirpier-1.0.0 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-7.2.4 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-7.2.3 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-7.2.2 _includes/pageviews/goatcounter.html
jekyll-theme-chirpy-7.2.1 _includes/pageviews/goatcounter.html