Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Clipboard switch #155

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Description for social sharing and search engines.
description = "A collection of R packages for modeling and machine learning using tidyverse principles."

# Enable copy-to-clipboard for all code?
# Can also enable by content section in _index.md file
copy_clipboard = false

# Default image for social sharing and search engines. Place image in `static/images/` folder and specify image name here.
sharing_image = "feature_summary_large_image.jpg"
twitter_image = "feature_summary_large_image.jpg"
Expand Down
1 change: 1 addition & 0 deletions content/learn/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Learn
description: "Learn how to go farther with tidymodels in your modeling and machine learning projects."
icon_attribution: "Icons made by [Becris](https://www.flaticon.com/authors/becris) from www.flaticon.com"
copy_clipboard: false
---

After you know [what you need to get started](/start/) with tidymodels, you can learn more and go further. Find articles here to help you solve specific problems using the tidymodels framework. Articles are organized into four categories:
1 change: 1 addition & 0 deletions content/start/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Get Started
subtitle: Welcome!
description: "What do you need to know to start using tidymodels? Learn what you need in 5 articles."
copy_clipboard: true
---

Here, learn what you need to get started with tidymodels in five articles, starting with how to create a model and ending with a beginning-to-end modeling case study. After you are comfortable with these basics, you can [learn how to go farther with tidymodels](/learn/).
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/head_custom.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{{ $clipboard_site := $.Site.Params.copy_clipboard }}
{{ $page := . }}

<!--only show copy to clipboard button if section-level variable is true-->
{{ with $page.FirstSection }}
{{ if or (.Params.Copy_clipboard) ($clipboard_site) }}

<!--Bootstrap-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>

<!--Clipboard JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>

{{ end }}
{{ end }}