Comments (1)
I'm just finding this message, so I guess I have too many input streams. I'll come up with a more formal routine to address issues so they don't pile up and get lost.
The Gemfile currently lists gem 'html-proofer', '>= 3.0.2'
Also see if the alternative mfpub
script provides a clue. This is what it does, based on pub-marlindoc.sh
…
bundle exec htmlproofer ./_site --only-4xx --allow-hash-href --check-favicon \
--check-html --url-swap ".*marlinfw.org/:/"
Through this script I just work directly with the main fork, but keep a copy in my fork too, just for redundancy.
#!/usr/bin/env bash
#
# mfpub
#
# Use Jekyll to generate Marlin Documentation, which is then
# git-pushed to Github to publish it to the live site.
# This publishes the current branch, and doesn't force
# changes to be pushed to the 'master' branch. Be sure to push
# any permanent changes to 'master'.
#
[[ $# < 2 ]] || { echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1; }
MFINFO=$(mfinfo "$@") || exit 1
IFS=' ' read -a INFO <<< "$MFINFO"
ORG=${INFO[0]}
FORK=${INFO[1]}
REPO=${INFO[2]}
TARG=${INFO[3]}
BRANCH=${INFO[4]}
if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
echo "Wrong repository."
exit
fi
# Check out the named branch (or stay in current)
git checkout $BRANCH
if [[ $BRANCH == "gh-pages" ]]; then
echo "Can't build from 'gh-pages.' Only the Jekyll branches (based on 'master')."
exit
fi
echo "Stashing any changes to files..."
echo "Don't forget to update and push 'master'!"
# GOJF Card
git stash
COMMIT=$( git log --format="%H" -n 1 )
# Clean out changes and other junk in the branch
git clean -d -f
# Push 'master' to the fork and make a proper PR...
if [[ $BRANCH == "master" ]]; then
# Make sure to get latest upstream changes!
mfup
# Allow working directly with the main fork
echo
echo -n "Pushing to origin/master... "
git push -f origin
echo
echo -n "Pushing to upstream/master... "
git push -f upstream
else
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then
firstpush
else
echo
echo -n "Pushing to origin/$BRANCH... "
git push -f origin
fi
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
if [ -z "$TOOL" ]; then
echo "Can't find a tool to open the URL:"
echo $URL
else
echo "Opening a New PR Form..."
"$TOOL" "$URL"
fi
fi
# Uncomment to compress the final html files
# mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb
# bundle install
echo
echo "Generating MarlinDocumentation..."
# build the site statically and proof it
bundle exec jekyll build --profile --trace --no-watch
bundle exec htmlproofer ./_site --only-4xx --allow-hash-href --check-favicon --check-html --url-swap ".*marlinfw.org/:/"
# Sync the built site into a temporary folder
TMPFOLDER=$( mktemp -d )
rsync -av _site/ ${TMPFOLDER}/
# Clean out changes and other junk in the branch
git reset --hard
git clean -d -f
# Copy built-site into the gh-pages branch
git checkout gh-pages
rsync -av ${TMPFOLDER}/ ./
# Commit and push the new live site directly
git add --all
git commit --message "Built from ${COMMIT}"
git push upstream
# remove the temporary folder
rm -rf ${TMPFOLDER}
# Go back to the branch we started from
git checkout $BRANCH
if [[ $BRANCH != "master" ]]; then
git stash pop
fi
from marlindocumentation.
Related Issues (20)
- Bed temperature setup issue HOT 1
- M48 should be called Probe Precision (or Repeatability) Test HOT 6
- How to reserve gcodes that in development by Prusa or other firmware? HOT 1
- Configuration Guide Translation - Chinese Simplified HOT 13
- Typo in Configuratio_adv.H HOT 2
- Documentation Suggestion - Identify versions for options HOT 1
- Character LCDs and Graphical LCDs out out of date. HOT 3
- EX.xxx Calucaltion in Marlin Code HOT 1
- content detail request: HOT 1
- Input Shaping dosent work in PrusaSlicer HOT 2
- M593 schouldnt start with 0Hz HOT 1
- Auto Build Not Allowing Me To Set Correct Board HOT 1
- Add explanation of leveling grid to documentation
- [FR] Linear Advance Pattern - Link printed elements to allow analysis of the print surface (and ease removal) HOT 3
- M206 description page HOT 1
- New feature: IS calibration tool HOT 2
- Issue with K-factor Calibration Tool HOT 7
- marlin site links to configurations rather than marlin main branch
- Bed leveling ender 3 v2 HOT 1
- A question regarding the M600 parameters E, U, and L HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marlindocumentation.