Skip to content

Commit

Permalink
Pin marked version 6.0.0
Browse files Browse the repository at this point in the history
Otherwise, headerIds are disabled by default:

    markedjs/marked#2890

Supposedly, there is a way to to use a configuration file:

    marked -c .marked.json -o "${NEW_PATH%.md}-content.html" "${file}"

with .marked.json:

{
  "headerIds": true
}

But I could not get this working with the latest version of marked (11).
  • Loading branch information
johnshaughnessy committed Jan 3, 2024
1 parent 8f41a7c commit e6f9b2f
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion tools/build_ai_guide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,42 @@ if ! command -v marked &> /dev/null
then
echo "marked could not be found"
echo "Installing marked..."
npm install -g marked
npm install -g marked@^6.0.0

if ! command -v marked &> /dev/null
then
echo "Failed to install marked@^6.0.0."
echo "Please install marked@^6.0.0 and try again"
exit 1
fi
fi

if ! command -v jupyter-nbconvert &> /dev/null
then
echo "jupyter-nbconvert could not be found"
echo "Installing jupyter & jupyter-nbconvert..."
pip install jupyter

if ! command -v jupyter-nbconvert &> /dev/null
then
echo "Failed to install jupyter-nbconvert."
echo "Please install jupyter & jupyter-nbconvert and try again"
exit 1
fi
fi

if ! command -v jq &> /dev/null
then
echo "jq could not be found"
echo "Installing jq..."
apt-get install -y jq

if ! command -v jq &> /dev/null
then
echo "Failed to install jq."
echo "Please install jq and try again"
exit 1
fi
fi

find $SOURCE_PATH -name "*.md" | while read -r file;
Expand Down

0 comments on commit e6f9b2f

Please sign in to comment.