• Stars
    star
    1,159
  • Rank 38,863 (Top 0.8 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ“Š Embed your GitHub calendar everywhere.

github-calendar.js

Version Downloads

Embed your GitHub contributions calendar anywhere.

Everybodywell, haters gonna hate loves GitHub and everybody loves stats. So, why not making the GitHub contributions calendar available for being embeded in your web pages? Now you can. ๐ŸŽ‰

โ˜๏ธ Installation

Check out the dist directory to download the needed files and include them on your page.

If you're using this module in a CommonJS environment, you can install it using npm or yarn and require it:

# Using npm
npm install --save github-calendar

# Using yarn
yarn add github-calendar
<!-- Include the library. -->
<script
  src="https://unpkg.com/github-calendar@latest/dist/github-calendar.min.js">
</script>

<!-- Optionally, include the theme (if you don't want to struggle to write the CSS) -->
<link
  rel="stylesheet"
  href="https://unpkg.com/github-calendar@latest/dist/github-calendar-responsive.css"
/>

<!-- Prepare a container for your calendar. -->
<div class="calendar">
    <!-- Loading stuff -->
    Loading the data just for you.
</div>

<script>
    GitHubCalendar(".calendar", "your-username");

    // or enable responsive functionality:
    GitHubCalendar(".calendar", "your-username", { responsive: true });

    // Use a proxy
    GitHubCalendar(".calendar", "your-username", {
       proxy (username) {
         return fetch(`https://your-proxy.com/github?user=${username}`)
       }
    }).then(r => r.text())
</script>

Here you can see this example in action.

โ“ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. ๐Ÿ›

๐Ÿ“ Documentation

GitHubCalendar(container, username, options)

Brings the contributions calendar from GitHub (provided username) into your page.

Params

  • String|HTMLElement container: The calendar container (query selector or the element itself).
  • String username: The GitHub username.
  • Object options: An object containing the following fields:
    • summary_text (String): The text that appears under the calendar (defaults to: "Summary of pull requests, issues opened, and commits made by <username>").
    • proxy (Function): A function that receives as argument the username (string) and should return a promise resolving the HTML content of the contributions page. The default is using @Bloggify's APIs.
    • global_stats (Boolean): If false, the global stats (total, longest and current streaks) will not be calculated and displayed. By default this is enabled.
    • responsive (Boolean): If true, the graph is changed to scale with the container. Custom CSS should be applied to the element to scale it appropriately. By default this is disabled.
    • tooltips (Boolean): If true, tooltips will be shown when hovered over calendar days. By default this is disabled.
    • cache (Number) The cache time in seconds.

Return

  • Promise A promise returned by the fetch() call.

๐Ÿ˜‹ How to contribute

Have an idea? Found a bug? See how to contribute.

๐Ÿ’ซ Where is this library used?

If you are using this library in one of your projects, add it in this list. โœจ

  • @pengliheng/github-report
  • @jiratki/gatsby-theme-minimal-portfolio
  • github-alike-calendar
  • react-ts-github-calendar
  • @axetroy/react-github-calendar
  • @dotnetthailand/gatsby-theme-minimal-portfolio
  • github-calendar-element
  • github-contributions-react
  • @philipwhiuk/react-github-calendar
  • github-calendar-web-component

๐Ÿ“œ License

MIT ยฉ Bloggify

More Repositories

1

bootstrap-form-builder

๐Ÿ”– A drag-and-drop form builder for Bootstrap 4.
JavaScript
113
star
2

showdown-highlight

๐ŸŽจ A Showdown extension for highlighting code blocks.
JavaScript
50
star
3

Bloggify

๐Ÿ“ We make publishing easy.
JavaScript
24
star
4

colors

๐Ÿ–Œ Copyโ€”Paste colors from nice palettes. { No ads, no tracking! }
JavaScript
13
star
5

elasticfire

๐Ÿ”ฅ A flexibe and configurable module to connect Firebase with Elasticsearch.
JavaScript
7
star
6

pianos-around-the-world

๐ŸŽน Community-maintained list of pianos around the world, placed on the map. Contributions are welcome!
7
star
7

newww

๐Ÿ“œ The source of bloggify.org website.
CSS
6
star
8

sunset

๐ŸŒ… Get sunset times.
JavaScript
6
star
9

obj2env-cli

โ„๏ธ Create .env files in your terminal.
JavaScript
5
star
10

olx-api

๐Ÿ˜ A Node.js module to access the OLX API resources.
JavaScript
5
star
11

shortcode

โœ๏ธ Shortcode plugin for Bloggify.
JavaScript
4
star
12

obj2env

๐Ÿ“‹ Create files storing environment variables by using objects.
JavaScript
4
star
13

bloggify-quick-start

๐Ÿš€ A Bloggify starter website.
CSS
4
star
14

brokerbin

โš™๏ธ BrokerBin API wrapper for Node.js.
JavaScript
3
star
15

showdown-emoji

๐Ÿ˜‹ A Showdown extension for replacing emoji codes with images.
JavaScript
3
star
16

cute-colors

๐ŸŽจ Collections of nice color palettes.
JavaScript
3
star
17

mini-theme

๐ŸŽจ Yet another minimalist Bloggify theme.
JavaScript
3
star
18

plugin-loader

๐Ÿ“ฆ The Bloggify plugin loader.
JavaScript
2
star
19

c-sharp-api-client

๐Ÿ•ถ A command line Bloggify API client written in C#.
C#
2
star
20

bloggify-sendgrid

๐Ÿ“ง Bloggify plugin for sending emails via @SendGrid.
JavaScript
2
star
21

rucksack

๐ŸŽ’ JavaScript and CSS bundler.
JavaScript
2
star
22

rss

๐Œ The RSS plugin for Bloggify.
JavaScript
1
star
23

bloggify-article

๐Ÿ“ฐ The Bloggify article class.
JavaScript
1
star
24

bloggify-viewer

๐Ÿ‘€ Connects the CRUD operations with the renderer.
JavaScript
1
star
25

watchify-cache

โฑ Persistent cache for Watchify.
JavaScript
1
star
26

lightbox

๐Ÿ’ก MiniLightbox plugin for Bloggify sites
JavaScript
1
star
27

bloggify-passport

๐Ÿ›‚ Authentification for Bloggify made simple, using Passport.
JavaScript
1
star
28

bloggify-tools

๐Ÿš€ Interactive command line tool to help you win at Bloggify.
JavaScript
1
star
29

flexible-router

๐ŸŒ A flexible router for Bloggify apps.
JavaScript
1
star
30

bloggify-cli

๐Ÿ“บ CLI for Bloggify.
JavaScript
1
star
31

emoji

๐Ÿ˜ Emoji plugin for Bloggify.
JavaScript
1
star
32

Default

๐ŸŽจ Default theme for @Bloggify
CSS
1
star
33

bloggify-prebuilt

๐Ÿ’ฅ The prebuilt Bloggify version.
Shell
1
star
34

renderer-tljs

๐Ÿ‘ Render template literal templates.
JavaScript
1
star
35

node-bnr

๐Ÿฆ Access resources (e.g. exchange rates) provided by the National Bank of Romania.
JavaScript
1
star
36

sequelize-datatable-views

๐Ÿงฎ Visualize Sequelize data in data tables.
JavaScript
1
star
37

bloggify-markdown-highlight

๐ŸŽจ Highlight code blocks in the Markdown code.
JavaScript
1
star
38

social

๐Ÿ‘ฅ A Bloggify plugin for sharing articles on social networks.
JavaScript
1
star
39

bloggify.github.io

โžก๏ธ Just a redirect to https://bloggify.org.
HTML
1
star