{
    "componentChunkName": "component---src-components-blog-post-jsx",
    "path": "/blog/how-to-change-repo-language-in-github/",
    "result": {"data":{"site":{"siteMetadata":{"author":"Monica Powell","siteUrl":"https://www.aboutmonica.com"}},"mdx":{"id":"4e89550e-6a96-58c4-bfcc-b6cce23e884d","timeToRead":1,"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"How to Change Repo Language in GitHub\",\n  \"date\": \"2017-02-07T14:17:11.000Z\",\n  \"template\": \"post\",\n  \"draft\": false,\n  \"slug\": \"how-to-change-repo-language-in-github\",\n  \"category\": [\"tutorial\"],\n  \"tags\": [\"Git\", \"GitHub\", \"Linguistics\", \"Tutorial\"],\n  \"description\": \"I recently started working on a Weather app in Flask to auto-detect a user’s location based off of their IP address. After committing some updates to GitHub my app switched from being labeled as…\",\n  \"redirects\": [\"/blog/2017/02/07/how-to-change-repo-language-in-github/\"]\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h3\", {\n    \"id\": \"how-to-change-repo-language-ingithub\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#how-to-change-repo-language-ingithub\",\n    \"aria-label\": \"how to change repo language ingithub permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"How to Change Repo Language in\\xA0GitHub\"), mdx(\"h4\", {\n    \"id\": \"is-github-telling-you-that-your-repository-is-989-css-or-html-when-it-isnt-heres-how-to-resolve-that-issue-everytime\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h4\",\n    \"href\": \"#is-github-telling-you-that-your-repository-is-989-css-or-html-when-it-isnt-heres-how-to-resolve-that-issue-everytime\",\n    \"aria-label\": \"is github telling you that your repository is 989 css or html when it isnt heres how to resolve that issue everytime permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Is GitHub telling you that your repository is 98.9% CSS or HTML when it isn\\u2019t? Here\\u2019s how to resolve that issue every\\xA0time.\"), mdx(\"figure\", null, mdx(\"p\", null, mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/how-to-change-repo-language-in-github-0.jpg\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"I recently started working on a \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/M0nica/flask_weather\"\n  }, \"Weather app in Flask\"), \" to auto-detect a user\\u2019s location based off of their IP address. After committing some updates to GitHub my app switched from being labeled as predominately Python to 98.9% CSS even though it was a Flask application in which most of the code I had written was in Python and HTML. Now and again, I do not agree with how GitHub classifies the languages in my repositories so I set out to figure out how to fix this issue.\"), mdx(\"figure\", null, mdx(\"p\", null, mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/how-to-change-repo-language-in-github-1.png\",\n    \"alt\": null\n  })), mdx(\"figcaption\", null, \"Before: My Flask App Appeared in GitHub as 98.9%\\xA0CSS.\")), mdx(\"h4\", {\n    \"id\": \"pro-tip-help-github-properly-detect-your-repositories-main-languages\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h4\",\n    \"href\": \"#pro-tip-help-github-properly-detect-your-repositories-main-languages\",\n    \"aria-label\": \"pro tip help github properly detect your repositories main languages permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Pro-tip: Help GitHub properly detect your repositories main language(s).\"), mdx(\"p\", null, \"GitHub has a \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/github/linguist\"\n  }, \"linguist library\"), \" that auto-detects the language within every repository. Upon researching how to resolve GitHub misclassifying the language of your projects I found out the solution is as simple as telling GitHub which files to ignore.\"), mdx(\"p\", null, \"While you still want to commit these files to GitHub and therefore can\\u2019t use a\\xA0.gitignore you can tell GitHub\\u2019s linguist which files to ignore in a\\xA0.gitattribute file.\"), mdx(\"p\", null, \"Upon examining the documentation for the linguist library I learned that adding just one line to a\\xA0.gitattributes file would resolve my language issues for this particular repo.\"), mdx(\"p\", null, \"My\\xA0.gitattributes:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"static/* linguist-vendored\\n\")), mdx(\"p\", null, \"This one-line file told GitHub to ignore all of my files in my static/ folder which is where CSS and other assets are stored for a Flask app. Vendor files can sometimes take up a lot of relative space so I am telling the linguist to just ignore them (since they were accounting for 98.9% of my project)!\"), mdx(\"figure\", null, mdx(\"p\", null, mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/how-to-change-repo-language-in-github-2.png\",\n    \"alt\": null\n  })), mdx(\"figcaption\", null, \"After: My Flask App Appears in GitHub now as 56.2% Python and 43.8%\\xA0HTML.\")), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/alexkaratarakis/gitattributes\"\n  }, \"Here\\u2019s a repository by @with sample\\xA0.gitattributes files for you try the next time you disagree with the linguist\\xA0;).\"), \" Note: Updates to the\\xA0.gitattributes may not apply retroactively and if linguist \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"truly\"), \" is wrong GitHub encourages you to report it as an issue in their /linguist repo.\"), mdx(\"p\", null, \"I hope this article was helpful! I would love to hear some of your tricks for GitHub and am happy to answer any questions you may have.\"), mdx(\"p\", null, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"If you enjoyed reading this article consider tapping the clap button \\uD83D\\uDC4F. Wanna see more of my work? Check out\"), \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/M0nica/\"\n  }, mdx(\"em\", {\n    parentName: \"a\"\n  }, \"my GitHub\")), \" \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"to view my code and learn more about my development experience at\"), \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"http://aboutmonica.com\"\n  }, mdx(\"em\", {\n    parentName: \"a\"\n  }, \"http://aboutmonica.com\")), mdx(\"em\", {\n    parentName: \"p\"\n  }, \".\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#how-to-change-repo-language-ingithub","title":"How to Change Repo Language in GitHub","items":[{"url":"#is-github-telling-you-that-your-repository-is-989-css-or-html-when-it-isnt-heres-how-to-resolve-that-issue-everytime","title":"Is GitHub telling you that your repository is 98.9% CSS or HTML when it isn’t? Here’s how to resolve that issue every time."},{"url":"#pro-tip-help-github-properly-detect-your-repositories-main-languages","title":"Pro-tip: Help GitHub properly detect your repositories main language(s)."}]}]},"frontmatter":{"title":"How to Change Repo Language in GitHub","date":"February 07, 2017","description":"I recently started working on a Weather app in Flask to auto-detect a user’s location based off of their IP address. After committing some updates to GitHub my app switched from being labeled as…","tags":["Git","GitHub","Linguistics","Tutorial"]}},"allWebMentionEntry":{"edges":[{"node":{"wmTarget":"https://www.aboutmonica.com/blog/how-to-change-repo-language-in-github/","wmSource":"https://brid-gy.appspot.com/post/twitter/waterproofheart/1285330580654247942","wmProperty":"mention-of","wmId":829403,"type":"entry","url":"https://twitter.com/spboyer/status/1285330580654247942","likeOf":null,"author":{"url":"https://twitter.com/spboyer","type":"card","photo":"https://webmention.io/avatar/pbs.twimg.com/577934d5293fde33df22e44c2e3bb60bc0fa7d09ec92aeeef2c48e8ff474fbd1.jpg","name":"Shayne Boyer"},"published":"July 20, 2020","content":{"text":"Super helpful! Thanks @waterproofheart \naboutmonica.com/blog/how-to-ch…"}}}]}},"pageContext":{"permalink":"https://www.aboutmonica.com/blog/how-to-change-repo-language-in-github/","slug":"/blog/how-to-change-repo-language-in-github/","prev":{"id":"7b83d79c-e33f-50d0-af11-90c3bf947de0","frontmatter":{"title":"Overcoming the Goldilocks Complex","category":["reflections"],"date":"2017-04-18T00:12:34.323Z","slug":"overcoming-the-goldilocks-complex","tags":["Programming","Learning","Reflection"],"redirects":["/blog/2017/04/18/overcoming-the-goldilocks-complex/"]},"fields":{"slug":"/blog/overcoming-the-goldilocks-complex/"}},"next":{"id":"5181f38d-6796-5ff5-a342-9d8696c42f2d","frontmatter":{"title":"Visualizing Data from the Spotify API","category":["tutorial"],"date":"2017-01-27T03:20:46.967Z","slug":"visualizing-data-from-the-spotify-api","tags":["API","Python"],"redirects":null},"fields":{"slug":"/blog/visualizing-data-from-the-spotify-api/"}}}},
    "staticQueryHashes": ["1977783444","764694655"]}