Skip to content

Commit d5f0189

Browse files
committed
fix 2015 twitter links
1 parent 6273417 commit d5f0189

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

bin/create_static_site.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function _update_licensebuttons_domain {
9494
}
9595

9696

97-
function _fix_social_media_links {
97+
function _fix_2017_social_media_links {
9898
printf "\e[1m\e[7m %-80s\e[0m\n" 'Fix 2017 Social Media links'
9999
for _file in $(find docs -maxdepth 1 -type f -name '*.html')
100100
do
@@ -107,6 +107,15 @@ function _fix_social_media_links {
107107
}
108108

109109

110+
function _fix_2015_twitter_links {
111+
printf "\e[1m\e[7m %-80s\e[0m\n" 'Fix 2015 Twitter links'
112+
${SED} \
113+
-e's#^&lt;a href=.https://twitter\.com.*$#<a href="https://twitter.com/intent/tweet?source=webclient\&amp;text=State+of+the+Commons+stateof.creativecommons.org%2F2015%2F\&via=creativecommons"><img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">\&nbsp; Share on Twitter</a>#g' \
114+
--in-place docs/2015/index.html
115+
echo
116+
}
117+
118+
110119
function _replace_full_urls_with_absolute_paths {
111120
printf "\e[1m\e[7m %-80s\e[0m\n" 'Replace full URLs with absolute paths'
112121
# Non-escaped URLs with protocol
@@ -188,7 +197,8 @@ _wipe_and_recreate_docs_dir
188197
_remove_lines_from_html_files
189198
_restore_query_strings_in_html_files
190199
_update_licensebuttons_domain
191-
_fix_social_media_links
200+
_fix_2017_social_media_links
201+
_fix_2015_twitter_links
192202
_replace_full_urls_with_absolute_paths
193203
_revert_non_html_conversions
194204
_cleanup_plaintext_whitespace

docs/2015/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ <h2 id="from-research-to-cute-cat-photos-the-commons-offers-a-treasure-trove-of-
609609
<a href="https://www.facebook.com/sharer/sharer.php?u=/2015/cc-sotc-2015-xx07.html?foo=bar"><img src="https://licensebuttons.net/gi/social-31-facebook.png" alt="">  Share on Facebook</a>
610610
</li>
611611
<li>
612-
&lt;a href=https://twitter.com/intent/tweet?source=webclient&amp;text=CC+is+everywhere+–+millions+of+sites+use+CC+licenses+stateof.creativecommons.org%2F2015%2Fcc-sotc-2015-xx07.html&amp;via=creativecommons”&gt;<img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">  Share on Twitter</a>
612+
<a href="https://twitter.com/intent/tweet?source=webclient&amp;text=State+of+the+Commons+stateof.creativecommons.org%2F2015%2F&via=creativecommons"><img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">&nbsp; Share on Twitter</a>
613613
</li>
614614
</ul>
615615
<p></nav></p>
@@ -800,7 +800,7 @@ <h3 id="with-an-additional-53-million-projected-through-academic-year-201516" cl
800800
<a href="https://www.facebook.com/sharer/sharer.php?u=/2015/cc-sotc-2015-xx09.html?foo=bar"><img src="https://licensebuttons.net/gi/social-31-facebook.png" alt="">  Share on Facebook</a>
801801
</li>
802802
<li>
803-
&lt;a href=https://twitter.com/intent/tweet?source=webclient&amp;text=2015+impact+CC+and+foundation+open+policy+stateof.creativecommons.org%2F2015%2Fcc-sotc-2015-xx09.html&amp;via=creativecommons”&gt;<img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">  Share on Twitter</a>
803+
<a href="https://twitter.com/intent/tweet?source=webclient&amp;text=State+of+the+Commons+stateof.creativecommons.org%2F2015%2F&via=creativecommons"><img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">&nbsp; Share on Twitter</a>
804804
</li>
805805
</ul>
806806
<p></nav></p>
@@ -828,7 +828,7 @@ <h2 id="these-foundations-set-their-default-to-open-from-closed-collectively-gra
828828
<a href="https://www.facebook.com/sharer/sharer.php?u=/2015/cc-sotc-2015-xx10.html?foo=bar"><img src="https://licensebuttons.net/gi/social-31-facebook.png" alt="">  Share on Facebook</a>
829829
</li>
830830
<li>
831-
&lt;a href=https://twitter.com/intent/tweet?source=webclient&amp;text=2015+Impact:+CC+and+Cultural+Heritage+%40freebassel%20%23freebassel+stateof.creativecommons.org%2F2015%2Fcc-sotc-2015-xx10.html&amp;via=creativecommons”&gt;<img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">  Share on Twitter</a>
831+
<a href="https://twitter.com/intent/tweet?source=webclient&amp;text=State+of+the+Commons+stateof.creativecommons.org%2F2015%2F&via=creativecommons"><img src="https://licensebuttons.net/gi/social-32-twitter.png" alt="">&nbsp; Share on Twitter</a>
832832
</li>
833833
</ul>
834834
<p></nav></p>

0 commit comments

Comments
 (0)