1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-18 04:01:46 +00:00

Update for leanpub preview

This commit is contained in:
AutoPenguin
2020-06-03 01:42:01 +00:00
parent 65dd34c7ea
commit 2e8e16157b
193 changed files with 12667 additions and 155 deletions

View File

@@ -1,14 +1,11 @@
#!/bin/bash
# This script prepares mkdocs for a build (there are some adjustments to be made to the recipes before publishing)
# Copy the contents of "manuscript" to a new "publish" folder
mkdir -p publish
mkdir -p publish/overrides
cp -r {manuscript,overrides} publish/
cp mkdocs.yml publish/
# Fetch git history so that we get last-updated timestamps
git fetch --unshallow
# Append a common footer to all recipes/swarm docs
for i in `find publish/manuscript/ -name "*.md" | grep -v index.md`
for i in `find manuscript/ -name "*.md" | grep -v index.md`
do
# Does this recipe already have a "tip your waiter" section?
grep -q "Tip your waiter" $i
@@ -22,7 +19,7 @@ do
done
# Now build the docs for publishing
mkdocs build -f publish/mkdocs.yml
mkdocs build -f mkdocs.yml
# Setup any necessary netlify redirects
cp netlify_redirects.txt publish/site/_redirects
cp netlify_redirects.txt site/_redirects

View File

@@ -1,31 +1,16 @@
#!/bin/bash
# Markua doesn't know what to do with 4 backticks (````), so convert to 3:
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/\`\`\`\`/\`\`\`/g"
for file in `find manuscript -type f -name "*.md"`
do
echo "Processing $file..."
# Markua doesn't like emojis, so remove them:
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👏//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/💬//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👍//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/💰//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🍷//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🏢//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/❤️//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🐢//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👋//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🐦//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/📖//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/✉️//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/📺//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🎥//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🎵//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/😁//g"
# Markua doesn't know what to do with 4 backticks (````), so convert to 3:
sed -ie "s/\`\`\`\`/\`\`\`/g" $file
# Can't use relative paths in a book, so make all paths static
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/(\//(https:\/\/geek-cookbook.funkypenguin.co.nz\/)/g"
# Can't use relative paths in a book, so make all paths static
sed -ie 's/(\//(https:\/\/geek-cookbook.funkypenguin.co.nz\/)/g' $file
# Do nothing, yet. This is where the sed magic will go
# strip emojis
tr -cd '\11\12\15\40-\176' < $file > $file-clean
mv $file-clean $file
done

View File

@@ -1,28 +1,14 @@
## Tip your waiter (support me) 👏
## Tip your waiter (sponsor me) 👏
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) Sponsor me on [Github][github_sponsor] / [Patreon][patreon], or see the [support](/support/) page for more (_free or paid)_ ways to say thank you! 👏
## Flirt with waiter (subscribe) 💌
Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the [RSS feed](https://mastodon.social/@geekcookbook_changes.atom), or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam either - check the [archive](https://us16.campaign-archive.com/home/?u=a1d9cee4402be76497a2baf49&id=10e284530a) for proof!*)
Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the [RSS feed](https://mastodon.social/@geekcookbook_changes.atom), or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam)
<!-- Begin Mailchimp Signup Form -->
<div id="mailchimp">
<form action="https://funkypenguin.us16.list-manage.com/subscribe/post?u=a1d9cee4402be76497a2baf49&amp;id=10e284530a" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<input type="email" value="your-email-address-here 💋" name="EMAIL" class="required email" id="mce-EMAIL" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"> <span align="right"><input type="submit" value="Subscribe me, sexy!" name="subscribe" id="mc-embedded-subscribe" class="button"></span>
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a1d9cee4402be76497a2baf49_10e284530a" tabindex="-1" value=""></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
<div class="rm-area-subscribe-to-recipe"></div>
## Your comments? 💬
[patreon]: https://www.patreon.com/bePatron?u=6982506
[github_sponsor]: https://github.com/sponsors/funkypenguin

4
scripts/serve.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
docker pull squidfunk/mkdocs-material:latest
docker build . -t funkypenguin/mkdocs-material
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material