Skip to content

Commit

Permalink
add download attribute (#49)
Browse files Browse the repository at this point in the history
* add download attribute

* modify build script
  • Loading branch information
carlosgauci committed Nov 23, 2022
1 parent 2440b3d commit ca467a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ resources
# Tutorial files are pulled at build time
haystack-tutorials
content/tutorials
!content/tutorials/_index.md
!content/tutorials/_index.md

static/downloads
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ git clone --depth 1 https://github.com/deepset-ai/haystack-tutorials.git
echo "Copying markdown files into ./content/tutorials..."
cp ./haystack-tutorials/markdowns/* ./content/tutorials
ls ./content/tutorials
mkdir ./static/downloads
echo "Copying notebook files into ./static/downloads..."
cp ./haystack-tutorials/tutorials/*.ipynb ./static/downloads
ls ./static/downloads

npm install

Expand Down
1 change: 1 addition & 0 deletions themes/haystack/layouts/_default/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
{{ with .Params.download }}
<a
href="{{ . }}"
download
class="btn btn-dark-blue download-btn"
target="_blank"
rel="noopener"
Expand Down

1 comment on commit ca467a6

@vercel
Copy link

@vercel vercel bot commented on ca467a6 Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.