Skip to content

Commit

Permalink
Add recommender overlay
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <[email protected]>
  • Loading branch information
xiaohk committed Oct 3, 2023
1 parent 1756191 commit e7b4107
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
test*.ipynb
.ipynb_checkpoints
Pipfile.lock
explorer/*/*.ndjson
explorer/*/*.ndjson
_site
Gemfile.lock
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gem "just-the-docs"
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
theme: just-the-docs
remote_theme: just-the-docs/just-the-docs
title: "DiffusionDB"
title: 'DiffusionDB'

# Enable or disable the site search
# Supports true (default) or false
Expand Down Expand Up @@ -30,7 +31,6 @@ search:

color_scheme: light


# External navigation links
nav_external_links:
- title: DiffusionDB on GitHub
Expand Down
4 changes: 4 additions & 0 deletions _includes/head_custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<link rel="shortcut icon" type="image/png" href="favicon.ico" />
<meta property="og:image" content="https://i.imgur.com/vNrixuh.png" />
<meta property="twitter:image" content="https://i.imgur.com/vNrixuh.png" />
<script
type="module"
src="https://unpkg.com/recommender-overlay/dist/recommender-overlay.es.js"
></script>
52 changes: 52 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: table_wrappers
---

<!DOCTYPE html>

<html lang="{{ site.lang | default: 'en-US' }}">
{% include head.html %}
<body>
<a class="skip-to-main" href="#main-content">Skip to main content</a>
{% include icons/icons.html %}
{% include components/sidebar.html %}
<div class="main" id="top">
{% include components/header.html %}
<div class="main-content-wrap">
{% include components/breadcrumbs.html %}
<div id="main-content" class="main-content">
<main>
{% if site.heading_anchors != false %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
{% else %}
{{ content }}
{% endif %}

{% if page.has_children == true and page.has_toc != false %}
{% include components/children_nav.html %}
{% endif %}
</main>
{% include components/footer.html %}
</div>
</div>
{% if site.search_enabled != false %}
{% include components/search_footer.html %}
{% endif %}
</div>

{% if site.mermaid %}
{% include components/mermaid.html %}
{% endif %}

<recommender-overlay
my-brand="DiffusionDB"
brands-to-ignore="CNN 101"
recommendation-count="10"
similar-candidate-count="15"
position-left="30"
display-delay="15000"
homepage-url="https://poloclub.github.io/"
></recommender-overlay>

</body>
</html>

0 comments on commit e7b4107

Please sign in to comment.