{"id":22131837,"url":"https://github.com/forthright48/angular-github-repo-display","last_synced_at":"2025-07-03T17:04:46.608Z","repository":{"id":58243747,"uuid":"48802704","full_name":"forthright48/angular-github-repo-display","owner":"forthright48","description":"Display Github Repo files on a site using AngularJS.","archived":false,"fork":false,"pushed_at":"2016-01-04T13:34:12.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T02:56:52.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forthright48.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-30T13:51:20.000Z","updated_at":"2015-12-30T16:02:15.000Z","dependencies_parsed_at":"2022-08-31T01:01:56.238Z","dependency_job_id":null,"html_url":"https://github.com/forthright48/angular-github-repo-display","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2Fangular-github-repo-display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2Fangular-github-repo-display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2Fangular-github-repo-display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2Fangular-github-repo-display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forthright48","download_url":"https://codeload.github.com/forthright48/angular-github-repo-display/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240989,"owners_count":20583139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T18:37:54.008Z","updated_at":"2025-03-24T09:22:51.062Z","avatar_url":"https://github.com/forthright48.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Github Repo Display (AGRD)\n\nDisplay files from a Github Repo on a site using AngularJS.\n\n### Currently can display markdown files only\n\n# Features\n\n- Display markdown files pulled from github repo.\n- Supports latex render using MathJax.\n- Support relative links in markdown file.\n\n# How to Use it\n\n## Installation\n\nFirst, download \"angular-github-repo-display\" and add it to your app.\n\n**Warning**: AGRD depends on MathJax. Bower downloads around 50+ MB just for that :| So be a little bit patient.\n\n    bower install angular-github-repo-display\n\nThen add the module to your app.\n\n    angular.module( \"your-app\", [\"angular-github-repo-display\"] );\n\n## Render Latex\n\nWe want to render latex so we have to add MathJax and configure it.\n\nAdd these scripts at the end of your html file.\n\n```\n\u003c!-- MathJax Configuration --\u003e\n\u003cscript type=\"text/x-mathjax-config\"\u003e\n  MathJax.Hub.Config({\n    tex2jax: {\n      inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n      processEscapes: true\n    }\n  });\n\u003c/script\u003e\n\n\u003cscript type=\"text/javascript\"\n    src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"\u003e\n\u003c/script\u003e\n```\n\nAfter that, wrap your latex with $ signs. To use them literally, delimit them as /$.\n\n## Fixing Route\n\nDecide, on which route you want to display the github repo. Suppose, you decided, it will be on the following route:\n\n    yourdomain.com/#/may/be/here\n\nAGRD displays files from repo using the routes parameters. So it's important that we configure the route. Just add this:\n\n    angular.module(\"your-app\").configure ( function( $routeProvider){\n            $routeProvider.when ( \"/may/be/here/:filePath*\", {\n                    templateUrl: \"SpecialTemplate.html\"\n            });\n    });\n\nSo, just add \":filePath*\" at the end of your desired route. `filePath` acts an parameter which AGRD uses to pull in files. And what about `specialTemplate`? That's coming next.\n\n## SpecialTemplate\n\nAdd this directive in your SpecialTemplate view:\n\n    \u003cgithub-repo git-link=\"UserName/RepoName\"\u003e\u003c/github-repo\u003e\n\nSo what is happening? This directive is responsible for pulling files from github using API. But how is it going to know which repo to pull? Notice the \"git-link\" attribute there? That's what points to the git repo we want to pull.\n\nFor example, suppose we want to pull one of my other repo, then we put `git-link=\"forthright48/cpps101\"`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforthright48%2Fangular-github-repo-display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforthright48%2Fangular-github-repo-display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforthright48%2Fangular-github-repo-display/lists"}