Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 324942a
Author: Patrice Chalin <[email protected]>
Date:   Mon Dec 19 12:15:42 2022 -0500

    Docsy examples: drop private-repo (google#1338)

commit 799fc54
Author: Andreas Deininger <[email protected]>
Date:   Thu Dec 8 14:36:44 2022 +0100

    Bump Font-Awesome to latest version 6.2.1 (google#1325)

commit 8924f28
Author: Geri Ochoa <[email protected]>
Date:   Mon Dec 5 13:45:54 2022 -0500

    Update post-release changelog links

commit 5597d43
Author: Geri Ochoa <[email protected]>
Date:   Mon Dec 5 11:18:13 2022 -0500

    Release v0.6.0 preparation

commit 2c11f53
Author: Andreas Deininger <[email protected]>
Date:   Fri Oct 14 17:23:14 2022 +0200

    Add render hook for 'chem' code blocks
    Auto activation of `math' and 'chem' blocks
    Add ability to enable KateX and/or mhchem for individual pages only
    Upgrade to KaTeX 0.16.3

commit 1fb0e23
Author: Victor "multun" Collod <[email protected]>
Date:   Fri Nov 25 22:36:26 2022 +0100

    prevent navbar text wrapping

    When a navbar item has multiple words, and there are enough navbar item to
    cause the flexbox to be full at reduced window widths without transitioning
    through the lower media breakpoint, the navbar link name can wrap, which causes
    the alignment of all navbar items to break.

    This change forbids navbar text wrapping even at bigger screen sizes.

commit 33f3dfe
Author: Andreas Deininger <[email protected]>
Date:   Wed Nov 23 08:48:12 2022 +0100

    Fix: mermaid diagrams with parameters in site config

commit b4d66f7
Merge: f0a06ef 9cc0cd0
Author: Erin McKean <[email protected]>
Date:   Mon Nov 21 09:07:08 2022 -0800

    Merge pull request google#1314 from google/LisaFC-fontawesome

    Add FontAwesome info to logos and images page

commit 9cc0cd0
Merge: f18a4e8 f0a06ef
Author: LisaFC <[email protected]>
Date:   Mon Nov 21 17:04:42 2022 +0000

    Merge branch 'main' into LisaFC-fontawesome

commit f0a06ef
Author: copy rogers <[email protected]>
Date:   Fri Nov 18 20:17:34 2022 +0800

    Add etcd, CloudWeGo and Dapr website to examples (google#1315)

    Signed-off-by: rogerogers <[email protected]>

    Signed-off-by: rogerogers <[email protected]>

commit 1c9e125
Author: LisaFC <[email protected]>
Date:   Thu Nov 17 16:17:25 2022 +0000

    Updated to better "mostly docs" example

commit c6f138a
Author: Robert Pająk <[email protected]>
Date:   Thu Nov 17 17:09:41 2022 +0100

    Add OpenTelemetry webpage to examples (google#1312)

commit f18a4e8
Author: LisaFC <[email protected]>
Date:   Thu Nov 17 16:05:11 2022 +0000

    Update iconsimages.md

commit 0cc3704
Author: LisaFC <[email protected]>
Date:   Thu Nov 17 16:01:23 2022 +0000

    Add FontAwesome info to logos and images page

    Currently only mention FontAwesome in the context of menus, which has confused some users

commit 246a2e1
Author: Geri Ochoa <[email protected]>
Date:   Tue Nov 8 11:34:43 2022 -0500

    Fix readfile not rendering html code

commit 90ee481
Author: Patrice Chalin <[email protected]>
Date:   Wed Nov 9 11:14:17 2022 -0500

    Update CHANGELOG.md

commit e6a44df
Author: Takayama Fumihiko <[email protected]>
Date:   Thu Nov 3 21:48:20 2022 +0900

    Fix offline search popover (google#1305)

commit 42f6ef8
Author: LisaFC <[email protected]>
Date:   Thu Nov 3 11:56:22 2022 +0000

    Algolia updates (google#1270)

    Updates for google#1250

commit aa7c0ae
Author: erwin-faceit <[email protected]>
Date:   Wed Nov 2 21:15:29 2022 +0100

    Update nl (google#1301)

    I18N: update nl.toml

commit 33fd6ea
Author: mboukhalfa <[email protected]>
Date:   Sun Oct 23 23:53:13 2022 +0300

    Add more translation to ar.toml

commit d9bf98b
Author: Andreas Deininger <[email protected]>
Date:   Fri Oct 28 17:22:30 2022 +0200

    CHANGELOG: add breaking change (tabbed panes, text display)

commit 90843e3
Author: Stephan Lachnit <[email protected]>
Date:   Thu Oct 27 17:00:08 2022 +0200

    Auto activation of mermaid diagrams (via use of hugo render hook) (google#990)

commit f27daed
Author: Geri Ochoa <[email protected]>
Date:   Fri Oct 21 13:46:19 2022 -0400

    Release v0.5.1 preparation

commit dd2e2b9
Author: Andreas Deininger <[email protected]>
Date:   Wed Oct 19 16:27:39 2022 +0200

    Tabbed pane, fix: avoid duplicate html id if content is pulled in via readfile shortcode (google#1289)

commit a2f7ecd
Author: Andreas Deininger <[email protected]>
Date:   Fri Oct 14 08:41:24 2022 +0200

    User guide: fix invalid html by adding alt attribute to image

    Remove trailing whitespace in a few .md files

commit cfa70e3
Author: Andreas Deininger <[email protected]>
Date:   Fri Oct 14 08:35:51 2022 +0200

    Fix: Tabpane shows multiple tabs at the same time google#1271

commit abb7307
Author: Andreas Deininger <[email protected]>
Date:   Thu Oct 13 12:30:22 2022 +0200

    Shortcodes for tabbed panes: improved whitespace handling

commit 99eacb0
Author: Andreas Deininger <[email protected]>
Date:   Sat Oct 15 12:49:29 2022 +0200

    Module setup: update docsy/dependencies to tip of main

commit 123800f
Author: Stephan Lachnit <[email protected]>
Date:   Sun Oct 16 17:32:02 2022 +0200

    feature: add support for GLFM math blocks (google#987)

    * feature: add support for GLFM math blocks

    This add supports for GLFM's math blocks [1] using hugo's Markdown
    render hooks [2].

    [1]: https://docs.gitlab.com/ee/user/markdown.html#math
    [2]: https://gohugo.io/templates/render-hooks/#render-hooks-for-code-blocks

    Signed-off-by: Stephan Lachnit <[email protected]>

commit be5da07
Author: Andreas Deininger <[email protected]>
Date:   Fri Oct 14 18:16:17 2022 +0200

    Fix: hugo serve does not serve Font Awesome anymore (google#1282)

commit 1e7e329
Author: the-kraljica <[email protected]>
Date:   Wed Oct 5 17:14:26 2022 +0200

    Remove > selector from elements

commit 19ec7be
Author: Patrice Chalin <[email protected]>
Date:   Thu Oct 13 16:15:01 2022 -0400

    Search styling refactoring, and fix for offline search (google#1279)

commit ba4ed72
Author: Mike Kruskal <[email protected]>
Date:   Thu Oct 13 00:37:57 2022 -0700

    Fixing FontAwesome icon handling in search placeholder (google#1247)

commit 7489c35
Author: Patrice Chalin <[email protected]>
Date:   Mon Oct 10 13:08:44 2022 -0400

    CHANGELOG adjustments

commit ded6a0d
Author: Patrice Chalin <[email protected]>
Date:   Mon Oct 10 12:22:25 2022 -0400

    Revert google#1200 to recover desc blog post order (google#1269)

commit 14cee5a
Author: Patrice Chalin <[email protected]>
Date:   Sat Oct 8 11:25:31 2022 -0400

    Scripts: one more whitespace tweak

commit 0e79123
Author: Patrice Chalin <[email protected]>
Date:   Sat Oct 8 11:18:56 2022 -0400

    Scripts: get Popper from Bootstrap bundle (google#1268)

commit 0204dd9
Author: Patrice Chalin <[email protected]>
Date:   Sat Oct 8 11:02:03 2022 -0400

    Revert to Popper v1 so tooltips work (google#1266)

commit c4216a8
Author: Patrice Chalin <[email protected]>
Date:   Sat Oct 8 10:32:08 2022 -0400

    More whitespace cleanup - partials/scripts.html

commit 20b0c70
Author: Patrice Chalin <[email protected]>
Date:   Sat Oct 8 09:45:52 2022 -0400

    Scripts tweak to cleanup whitespace etc (google#1262)

commit 25b0205
Author: Patrice Chalin <[email protected]>
Date:   Sat Oct 8 09:03:57 2022 -0400

    CHANGELOG: adjust prose since FA was further upgraded (google#1261)

commit 264566c
Author: Andreas Deininger <[email protected]>
Date:   Sat Oct 8 12:57:30 2022 +0200

    Upgrade to Bootstrap 4.6.2 (module install) (google#1218)

commit 3147661
Author: Andreas Deininger <[email protected]>
Date:   Fri Oct 7 22:35:35 2022 +0200

    User guide, conversion to modules: fixing config.yaml (google#1209)

commit 326b0f1
Author: Patrice Chalin <[email protected]>
Date:   Fri Oct 7 12:13:39 2022 -0400

    Navbar-brand: define classes for the logo and name (google#1190)

commit 646ef44
Author: Geri Ochoa <[email protected]>
Date:   Thu Oct 6 18:24:29 2022 -0400

    Release v0.5.0 prep, fix module dependency

commit 0c183ef
Author: Geri Ochoa <[email protected]>
Date:   Fri Sep 30 10:12:08 2022 -0400

    Release v0.5.0 preparation

commit de7048f
Author: Geri Ochoa <[email protected]>
Date:   Wed Sep 28 15:45:24 2022 -0400

    Add click to copy button

    Adds a click to copy button to code samples that don't use the Prism
    highlighter.

commit 5c4662c
Author: Geri Ochoa <[email protected]>
Date:   Wed Sep 28 17:47:10 2022 -0400

    Fix importing wrong drawio script

commit bd991a5
Author: Patrice Chalin <[email protected]>
Date:   Tue Oct 4 19:20:55 2022 -0400

    Update CHANGELOG.md

commit 7f9dc28
Author: Patrice Chalin <[email protected]>
Date:   Wed Aug 17 15:57:38 2022 -0400

    Use gtag.js analytics library for all site tags

commit c937bcd
Author: Andreas Deininger <[email protected]>
Date:   Wed Oct 5 01:47:21 2022 +0200

    Userguide, installation via npm: correct themes directory (google#1213)

commit 07ff9a5
Author: Patrice Chalin <[email protected]>
Date:   Tue Oct 4 19:18:04 2022 -0400

    CHANGELOG: mention FA font-glyph width changes (google#1251)

commit 01bf2a2
Author: Patrice Chalin <[email protected]>
Date:   Tue Oct 4 18:40:27 2022 -0400

    Mention inadvertent style leakage in CHANGELOG (google#1167)
  • Loading branch information
marshalc committed Dec 23, 2022
1 parent 0c0a043 commit 71f8fa6
Show file tree
Hide file tree
Showing 45 changed files with 1,008 additions and 479 deletions.
92 changes: 81 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
cSpell:ignore docsy
cSpell:ignore deining docsy gtag lookandfeel
-->

# Changelog
Expand All @@ -8,10 +8,43 @@ Useful links: Docsy [releases][] & [tags][]. Jump to the [latest][] release.

For a list of issues targeted for the next release, see the [22Q2][] milestone.

## [0.5.0][] - next planned release (unpublished yet)
## 0.7.0 - next planned release (unpublished yet)

**New**:

**Breaking changes**:

**Other changes**:

## [0.6.0][]

For the full list of the changes found in this release, see the [release
notes][0.5.0]. **BREAKING CHANGES** are documented below.
notes][0.6.0].

With this release we declare a feature freeze while we migrate to the newest
Bootstrap version. See [the announcement][bs-announcement] for more information.

**New**:

- **Simplified use of mermaid diagrams**: when using a `mermaid` code block on
your page, mermaid is now automatically enabled (needs hugo version >= 0.93.0).
For existing sites build with hugo 0.93.0+, parameter `mermaid.enable`
can be removed from site config.

- **Add render hook for chem code blocks**: add auto-activation of `math` and
`chem` blocks via KateX and mhchem. Support for formula rendering activation
on individual pages only. Hugo version >= 0.93.0 required.

**Breaking changes**:


**Other changes**:


## [0.5.1][]

For the full list of the changes found in this release, see the [release
notes][0.5.1]. **BREAKING CHANGES** are documented below.

**After you update** your project's Docsy:

Expand All @@ -24,17 +57,44 @@ notes][0.5.0]. **BREAKING CHANGES** are documented below.

**Breaking changes**:

- **Upgraded Bootstrap** to v4.6.2, resulting in some style changes. For
details, see [v4.6.2 release notes][].
- **[Upgraded FontAwesome][]** to v6.1.2 from v5. While many icons were renamed,
the v5 names will still work. For all the details, see [What's changed][].

- **Tabbed panes, text display**. By default, the content of a tab inside a tabbed
pane is shown as code. As of version 0.4 of the shortcode, you can add the
parameter `code=false` to your `tabpane` or `tab` shortcode in order to render
tab content(s) as text (markdown or html). As of version 0.5 the name of this
parameter was changed, we now use `text=true` in order to mark content as text.
- **Display logo by default**. Most projects show their logo in the navbar. In
support of this majority, Docsy now displays a logo by default. For details on
how to hide the logo (or your brand name), see [Styling your project logo and
name][].
- **Upgraded Bootstrap** to v4.6.2 from v4.6.1, resulting in some style changes
(such as an adjustment in the size of `small`). For details, see [v4.6.2
release notes][].
- **[Upgraded FontAwesome][]** to v6 from v5. While many icons were renamed, the
v5 names still work. For details about icon renames and more, see [What's
changed][].
- **Search-box**: the HTML structure and class names have changed, due to the
Font Awesome upgrade, for both online and offline search. This may affect your
project if you have overridden search styling or scripts.

**Other changes**:

- By default, Docsy now uses the [gtag.js][] analytics library for all site
tags. For details, see [Adding Analytics > Setup][].

[Adding Analytics > Setup]: https://www.docsy.dev/docs/adding-content/feedback/#setup
[v4.6.2 release notes]: https://github.com/twbs/bootstrap/releases/tag/v4.6.2
[docsy as an npm package]:
https://www.docsy.dev/docs/get-started/other-options/#option-3-docsy-as-an-npm-package
[gtag.js]: https://support.google.com/analytics/answer/10220869
[styling your project logo and name]:
https://www.docsy.dev/docs/adding-content/lookandfeel/#styling-your-project-logo-and-name
[upgraded fontawesome]: https://fontawesome.com/docs/web/setup/upgrade/
[what's changed]: https://fontawesome.com/docs/web/setup/upgrade/whats-changed

## [0.5.0][]

Unpublished.

## [0.4.0][]

For a full list of the changes to this release, see the [release notes][0.4.0].
Expand Down Expand Up @@ -96,6 +156,13 @@ For a full list of the changes to this release, see the [release notes][0.3.0].
[Algolia DocSearch v3](https://docsearch.algolia.com/docs/DocSearch-v3). If
your site uses the deprecated DocSearch v2, you must
[update your DocSearch code](https://docsearch.algolia.com/docs/migrating-from-v2).
- (**Edit**) [PR #1009][] inadvertently changed the base [Bootstrap styles for
cards][bs4cards], as well as the Docsy `highlight` style. For details, see
[issue #1154][]. Release [0.5.0][] includes a fix.

[bs4cards]: https://getbootstrap.com/docs/4.1/components/card/
[pr #1009]: https://github.com/google/docsy/pull/1009
[issue #1154]: https://github.com/google/docsy/issues/1154

## [0.2.0][]

Expand Down Expand Up @@ -123,13 +190,16 @@ For a full list of the changes to this release, see the [release notes][0.x.y].

[@deining]: https://github.com/deining
[@lisafc]: https://github.com/LisaFC
[0.2.0]: https://github.com/google/docsy/releases/v0.2.0
[0.3.0]: https://github.com/google/docsy/releases/v0.3.0
[0.4.0]: https://github.com/google/docsy/releases/v0.4.0
[0.6.0]: https://github.com/google/docsy/releases/v0.6.0
[0.5.1]: https://github.com/google/docsy/releases/v0.5.1
[0.5.0]: https://github.com/google/docsy/releases/v0.5.0
[0.4.0]: https://github.com/google/docsy/releases/v0.4.0
[0.3.0]: https://github.com/google/docsy/releases/v0.3.0
[0.2.0]: https://github.com/google/docsy/releases/v0.2.0
[0.x.y]: #
[22q2]: https://github.com/google/docsy/milestone/3
[hugo modules]: https://gohugo.io/hugo-modules/
[latest]: https://github.com/google/docsy/releases/latest
[releases]: https://github.com/google/docsy/releases
[tags]: https://github.com/google/docsy/tags
[bs-announcement]: https://github.com/google/docsy/discussions/1308
86 changes: 86 additions & 0 deletions assets/js/click-to-copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
let codeListings = document.querySelectorAll('.highlight > pre');

for (let index = 0; index < codeListings.length; index++)
{
const codeSample = codeListings[index].querySelector('code');
const copyButton = document.createElement("button");
copyButton.setAttribute('type', 'button');
copyButton.onclick = function() { copyCode(codeSample); };
copyButton.classList.add('fas', 'fa-copy');

const buttonTooltip = document.createElement('div');
buttonTooltip.classList.add('c2c-tooltip');
buttonTooltip.setAttribute('role', 'tooltip');
buttonTooltip.innerHTML += 'Copy to clipboard';

const buttonDiv = document.createElement('div');
buttonDiv.classList.add('click-to-copy');

// Use Popper to create and handle the tooltip behavior.

const popperInstance = Popper.createPopper(copyButton, buttonTooltip,
{
modifiers:
[
{
name: 'offset',
options:
{
offset: [0, -48],
},
},
],
});

copyButton.addEventListener('click', () =>
{
buttonTooltip.innerHTML = 'Copied!';
});

copyButton.addEventListener('mouseenter', () =>
{
buttonTooltip.setAttribute('show-tooltip', '');

// Enable eventListeners when the code block is on the viewport

popperInstance.setOptions((options) => ({
...options,
modifiers:
[
...options.modifiers,
{ name: 'eventListeners', enabled: true },
],
}));
popperInstance.update();
});

copyButton.addEventListener('mouseleave', () =>
{
buttonTooltip.removeAttribute('show-tooltip');

// Reset the message in case the button was clicked
buttonTooltip.innerHTML = 'Copy to clipboard';

// Disble eventListeners when the code block is NOT on the viewport

popperInstance.setOptions((options) => ({
...options,
modifiers:
[
...options.modifiers,
{ name: 'eventListeners', enabled: false },
],
}));
});

buttonDiv.append(copyButton);
buttonDiv.append(buttonTooltip);
codeListings[index].insertBefore(buttonDiv, codeSample);

}

function copyCode(codeSample)
{
navigator.clipboard.writeText(codeSample.textContent.trim());
}

13 changes: 8 additions & 5 deletions assets/js/mermaid.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{{ with .Site.Params.mermaid }}
{{ if .enable }}
(function($) {
var needMermaid = false;

{{ if ge hugo.Version "0.93.0" -}}
if ($('.mermaid').length > 0) {
needMermaid = true;
};
{{ else -}}
$('.language-mermaid').parent().replaceWith(function() {
needMermaid = true;
return $('<pre class="mermaid">').text($(this).text());
});
{{ end -}}

if (!needMermaid) {
mermaid.initialize({startOnLoad: false});
return;
}

var params = {{ . | jsonify | safeJS }};
var params = {{ .Site.Params.mermaid | jsonify | safeJS }};

// site params are stored with lowercase keys; lookup correct casing
// from Mermaid default config.
Expand All @@ -34,5 +39,3 @@
settings.startOnLoad = true;
mermaid.initialize(settings);
})(jQuery);
{{ end }}
{{ end }}
15 changes: 6 additions & 9 deletions assets/js/offline-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict';

$(document).ready(function () {
const $searchInput = $('.td-search-input');
const $searchInput = $('.td-search input');

//
// Options for popover
Expand All @@ -14,7 +14,7 @@
$searchInput.data('placement', 'bottom');
$searchInput.data(
'template',
'<div class="popover offline-search-result" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
'<div class="td-offline-search-results popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
);

//
Expand Down Expand Up @@ -130,11 +130,8 @@
.css({ fontWeight: 'bold' })
)
.append(
$('<i>')
.addClass('fas fa-times search-result-close-button')
.css({
cursor: 'pointer',
})
$('<span>')
.addClass('td-offline-search-results__close-button')
)
);

Expand Down Expand Up @@ -182,14 +179,14 @@
}

$targetSearchInput.on('shown.bs.popover', () => {
$('.search-result-close-button').on('click', () => {
$('.td-offline-search-results__close-button').on('click', () => {
$targetSearchInput.val('');
$targetSearchInput.trigger('change');
});
});

$targetSearchInput
.data('content', $html[0].outerHTML)
.data('content', $html[0])
.popover('show');
};
});
Expand Down
2 changes: 1 addition & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
var Search = {
init: function() {
$(document).ready(function() {
$(document).on('keypress', '.td-search-input', function(e) {
$(document).on('keypress', '.td-search input', function(e) {
if (e.keyCode !== 13) {
return
}
Expand Down
48 changes: 47 additions & 1 deletion assets/scss/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,56 @@

margin: 2rem 0;
padding: 0;

position: relative;

.click-to-copy {
display: block;
text-align: right;
height: 1ex;
}

pre {
margin: 0;
padding: 1rem;

// Default click-to-copy button

button {
position: absolute;
color: $gray-400;
border-radius: 3px;
border-width: 0;
background-color: inherit;
box-shadow: 1px 1px $gray-400;
right: 8px;
top: 6px;

&:hover {
color: $dark;
background-color: $gray-400;
}
&:active {
color: $dark;
background-color: $gray-400;
transform: translateY(2px);
}
}

.c2c-tooltip {
background: $dark;
color: $white;
padding: 2px 4px;
border-radius: 3px;
display: block;
visibility: hidden;
opacity: 0;
transition: visibility 0s, opacity 0.5s linear;
}

.c2c-tooltip[show-tooltip] {
visibility: visible;
opacity: 1;
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions assets/scss/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@
@extend .img-fluid;
}

> table {
table {
@extend .table-striped;

@extend .table-responsive;

@extend .table;
}

> blockquote {
blockquote {
padding: 0 0 0 1rem;
margin-bottom: $spacer;
color: $gray-600;
border-left: 6px solid $secondary;
}

> ul li, > ol li {
ul li, ol li {
margin-bottom: .25rem;
}

Expand Down
Loading

0 comments on commit 71f8fa6

Please sign in to comment.