Skip to content

Commit a212803

Browse files
committed
Inject metadata into generated pages
1 parent d1fc76a commit a212803

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ExportPluto.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ jobs:
5454
Export_baked_state=false,
5555
# more parameters can go here
5656
)'
57-
- name: Inject top navigation bar
57+
- name: Inject top navigation bar and metadata
5858
run: |
59-
INSERT_CODE='<link href="https://juliaquantumcontrol.github.io/QuantumControl.jl/dev/assets/topbar/topbar.css" rel="stylesheet" type="text/css"/><script src="https://juliaquantumcontrol.github.io/QuantumControl.jl/dev/assets/topbar/topbar.js"></script>'
59+
INSERT_CODE_HEAD='<link href="https://juliaquantumcontrol.github.io/QuantumControl.jl/dev/assets/topbar/topbar.css" rel="stylesheet" type="text/css"/><script src="https://juliaquantumcontrol.github.io/QuantumControl.jl/dev/assets/topbar/topbar.js"></script>'
60+
INSERT_META_DESCRIPTION='<meta name="description" content="Tutorials for the JuliaQuantumControl Organization."/>'
61+
# The specific text of the above meta tag is required for topbar.js to properly recognized that a page belongs in the "Tutorials" tab
6062
for file in *.html; do
61-
# Use sed to insert the code before </head>
62-
sed -i "/<\/head>/i $INSERT_CODE" "$file"
63+
# Use sed with /i to insert the code before the specified location
64+
sed -i "/<\/head>/i $INSERT_CODE_HEAD" "$file"
65+
sed -i "/<meta property='og:type' content='article'>/i $INSERT_META_DESCRIPTION" "$file"
6366
done
6467
- name: Deploy to gh-pages
6568
uses: JamesIves/github-pages-deploy-action@releases/v4

0 commit comments

Comments
 (0)