-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'docs-v2' of github.com:ThreeDotsLabs/watermill into doc…
…s-v2
- Loading branch information
Showing
20 changed files
with
261 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,36 @@ | ||
// Put your custom JS code here | ||
|
||
// a bit hacky way to force dark mode by default | ||
// it sets local storage item used by docs/node_modules/@thulite/doks-core/assets/js/color-mode.js | ||
if (!localStorage.getItem('theme')) { | ||
localStorage.setItem('theme', 'dark'); | ||
} | ||
|
||
import { render } from 'github-buttons'; | ||
|
||
let renderGitHubButton= () => { | ||
let oldButton = document.getElementById("github-button"); | ||
if (oldButton) { | ||
oldButton.remove(); | ||
} | ||
|
||
let options = { | ||
"href": "https://github.com/ThreeDotsLabs/watermill", | ||
"data-show-count": true, | ||
"data-size": "large", | ||
"data-color-scheme": localStorage.getItem('theme'), | ||
} | ||
|
||
render(options, function (el) { | ||
let menu = document.getElementById("offcanvasNavMain").querySelector(".offcanvas-body"); | ||
let searchToggle = document.getElementById("searchToggleDesktop"); | ||
|
||
el.setAttribute("id", "github-button"); | ||
el.classList.add("nav-link", "px-2", "mx-auto"); | ||
el.setAttribute("style", "margin-top: 12px;"); | ||
|
||
|
||
menu.insertBefore(el, searchToggle); | ||
}) | ||
} | ||
renderGitHubButton() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
// Put your custom SCSS code here | ||
|
||
/* quicksand-regular - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Quicksand'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url('/fonts/quicksand/quicksand-v31-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* quicksand-500 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Quicksand'; | ||
font-style: normal; | ||
font-weight: 500; | ||
src: url('/fonts/quicksand/quicksand-v31-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
* { | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
/* quicksand-700 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Quicksand'; | ||
font-style: normal; | ||
|
||
h1, h2, h3, h4, h5, .navbar-brand { | ||
font-family: Quicksand, sans-serif; | ||
font-weight: 700; | ||
src: url('/fonts/quicksand/quicksand-v31-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ Join us on the `#watermill` channel on the [Three Dots Labs discord](https://dis | |
|
||
For enterprise support, please contact us by e-mail: [email protected] | ||
|
||
You can also use the [contact form on our website](https://threedots.tech). | ||
You can also use the [contact form on our website](https://threedots.tech/contact/?utm_source=watermill-docs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
<!-- Custom head --> | ||
|
||
<!-- google fonts --> | ||
{{ $pf:= "Heebo:wght@400;600" }} | ||
{{ $sf:= "Quicksand:wght@700" }} | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<script> | ||
(function () { | ||
const googleFont = document.createElement("link"); | ||
googleFont.href = "https://fonts.googleapis.com/css2?family={{$pf | safeURL}}{{with $sf}}&family={{. | safeURL}}{{end}}&display=swap"; | ||
googleFont.type = "text/css"; | ||
googleFont.rel = "stylesheet"; | ||
document.head.appendChild(googleFont); | ||
})(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{{/* Based on: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/opengraph.html */}} | ||
<meta property="og:title" content="{{ .Title }}"> | ||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"> | ||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> | ||
<meta property="og:url" content="{{ .Permalink }}"> | ||
|
||
{{ $imagePermalink := (printf "https://academy-api.threedots.tech/ssr/image.png?%s" (collections.Querify "url" .Page.Permalink) ) }} | ||
<meta property="og:image" content="{{ $imagePermalink }}"> | ||
|
||
{{- if .IsPage }} | ||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} | ||
<meta property="article:section" content="{{ .Section }}"> | ||
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>{{ end }} | ||
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>{{ end }} | ||
{{- end -}} | ||
|
||
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}">{{ end }} | ||
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}">{{ end }} | ||
{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}">{{ end }} | ||
{{- with .Params.videos }}{{- range . }} | ||
<meta property="og:video" content="{{ . | absURL }}"> | ||
{{ end }}{{ end }} | ||
|
||
{{- /* If it is part of a series, link to related articles */}} | ||
{{- $permalink := .Permalink }} | ||
{{- $siteSeries := .Site.Taxonomies.series }} | ||
{{- if $siteSeries }} | ||
{{ with .Params.series }}{{- range $name := . }} | ||
{{- $series := index $siteSeries ($name | urlize) }} | ||
{{- range $page := first 6 $series.Pages }} | ||
{{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}">{{ end }} | ||
{{- end }} | ||
{{ end }}{{ end }} | ||
{{- end }} | ||
|
||
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} | ||
{{- $facebookAdmin := "" }} | ||
{{- with site.Params.social }} | ||
{{- if reflect.IsMap . }} | ||
{{- $facebookAdmin = .facebook_admin }} | ||
{{- end }} | ||
{{- else }} | ||
{{- with site.Social.facebook_admin }} | ||
{{- $facebookAdmin = . }} | ||
{{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- /* Facebook Page Admin ID for Domain Insights */}} | ||
{{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}">{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{/* Based on: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html */}} | ||
|
||
{{ $imagePermalink := (printf "https://academy-api.threedots.tech/ssr/image.png?%s" (collections.Querify "url" .Page.Permalink) ) }} | ||
<meta name="twitter:image" content="{{ $imagePermalink }}"> | ||
<meta name="twitter:card" content="summary_large_image"> | ||
|
||
|
||
<meta name="twitter:title" content="{{ .Title }}"> | ||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"> | ||
|
||
{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}} | ||
{{- $twitterSite := "" }} | ||
{{- with site.Params.social }} | ||
{{- if reflect.IsMap . }} | ||
{{- $twitterSite = .twitter }} | ||
{{- end }} | ||
{{- else }} | ||
{{- with site.Social.twitter }} | ||
{{- $twitterSite = . }} | ||
{{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- with $twitterSite }} | ||
{{- $content := . }} | ||
{{- if not (strings.HasPrefix . "@") }} | ||
{{- $content = printf "@%v" $twitterSite }} | ||
{{- end }} | ||
<meta name="twitter:site" content="{{ $content }}"> | ||
{{- end }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.