pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/hyperium/hyperium.github.io/commit/4023bce95979529b202a1dddc88caa7b671dc5e6

ymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> chore(site): edit GitHub links from hyper contrib documents (#90) · hyperium/hyperium.github.io@4023bce · GitHub
Skip to content

Commit 4023bce

Browse files
authored
chore(site): edit GitHub links from hyper contrib documents (#90)
Populate a new page field 'hyper_path' for copied contrib files. Conditionally link back to hyper if a 'hyper_path' is present, otherwise continue to reference hyperium.github.io (relevant for all collections besides contrib). Closes hyperium/hyper#3210
1 parent da1d0e4 commit 4023bce

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/contrib.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,25 @@ jobs:
3232
cp -a hyper/CONTRIBUTING.md hyper/docs/CONTRIBUTING.md
3333
3434
# Insert frontmatter borders, replace markdown header with
35-
# frontmatter title and insert layout: guide
35+
# frontmatter title and insert:
36+
# - layout: guide
37+
# - hyper_path: {path}
3638
- name: Convert doc titles to frontmatter
3739
run: |
3840
for f in hyper/docs/*.md; do
3941
sed -i -e '1i ---' \
4042
-e '1s/#/title:/' \
4143
-e '2i layout: guide' \
44+
-e "2i hyper_path: ${f:6}" \
4245
-e '2i ---' $f;
4346
done
4447
48+
# CONTRIBUTING.md is uniquely copied into the docs folder.
49+
# This adjustment links the correct source file.
50+
- name: Retain correct CONTRIBUTING.md path
51+
run: |
52+
sed -i -e '4s/docs\//github.com/' hyper/docs/CONTRIBUTING.md
53+
4554
# Use the hyper docs readme as the index page of contrib,
4655
# and insert permalink: /contrib/ in the frontmatter
4756
- name: Convert readme to index
@@ -71,8 +80,8 @@ jobs:
7180
continue
7281
fi
7382
74-
# lowercase filenames
75-
sed -i -e "s|${filename}|${filename,,}|g" $file;
83+
# lowercase filenames outside frontmatter
84+
sed -i -e "1,/^---$/!s|${filename}|${filename,,}|g" $file;
7685
7786
# match on the lowercased filename from here on
7887
lowercased=${filename,,}

_includes/footer.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
<div class="row">
44
<div class="col-sm-6 text-center text-sm-left text-muted">&copy; 2023 hyper</div>
55
<div class="col-sm-6 text-center text-sm-right">
6-
<a href="https://github.com/hyperium/hyperium.github.io/blob/master/{{ page.path }}">
7-
edit this page on github
8-
</a>
6+
{% if page.hyper_path %}
7+
<a href="https://github.com/hyperium/hyper/blob/master/{{ page.hyper_path }}">
8+
edit this page on github
9+
</a>
10+
{% else %}
11+
<a href="https://github.com/hyperium/hyperium.github.io/blob/master/{{ page.path }}">
12+
edit this page on github
13+
</a>
14+
{% endif %}
915
</div>
1016
</div>
1117
</div>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy