1438 Commits

Author SHA1 Message Date
Matt Wang
0ca69334b0
Fix ARIA labels for all anchors with href="#"; adds aria-pressed information for toggles (#1262)
This follows up from #1259 and closes #1261. Basically, this PR accomplishes the two items discussed in the issue:

1. for all anchors that are *actually* buttons (i.e., have `href="#"`), I've replaced them with a semantic `<button>`
    - under the hood, I've made a `.btn-reset` class pulling out the reset from #1259, so there's no visual change
2. for anchors that are ["toggle buttons"](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role#toggle_buttons) (the mobile menu nav, sidebar children/grandchildren toggles), I've added an `aria-pressed` property that is updated as the button is clicked

I've also slightly modified some of the `aria-label`s to make them more consistent. Observe that we *shouldn't* update these as the button is clicked; screen readers use the `aria-pressed` property to add an annotation to each button.

To test this,

- the sidebar children and grandchildren can be done on the deploy preview:
    - open an arbitrary page; observe that the sidebar children/grandchildren dropdown ticks now have a proper `aria-label` and `aria-pressed`, as well as otherwise work as intended
    - toggle one of the buttons; observe the `aria-pressed` role changing as this is done
    - open a grandchild page; observe that the `aria-pressed` has a correct default wrt whether or not the page is active
- the mobile menu can be done on the deploy preview; on a smaller viewport, observe the correct `aria-pressed`
- two features require local changes to test:
    - the `site.search.button` needs to be enabled in the `_config.yml`. To test this, locally clone the repo, change the flag, and observe that the button still works as intended + has no visual regressions.
    - the collections feature is a bit more complicated. To test this, locally clone the repo, add an arbitrary collection and changes to `_config.yml`, and observe the same behaviour for the sidebar children/grandchildren above
2023-06-06 19:34:42 -07:00
dependabot[bot]
d0cc9a0ff4
Bump stylelint from 15.6.3 to 15.7.0 (#1268)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.6.3 to 15.7.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.6.3...15.7.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 12:03:47 -07:00
dependabot[bot]
810353802a
Bump stylelint from 15.6.2 to 15.6.3 (#1267)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.6.2 to 15.6.3.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.6.2...15.6.3)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 08:50:50 -07:00
Matthew Wang
2b1cb67790
Update changelog 2023-05-31 13:39:51 -07:00
Joel Hawksley
cffe2f1b29
Add ARIA roles and labels to search, header, logo, mobile menu button, and main content (#1259)
This PR fixes several Axe errors I found while working on https://viewcomponent.org/. I did not see any visual regressions on my deploy, but I'd encourage testing with other sites.

---------

Co-authored-by: Lindsey Wild <35239154+lindseywild@users.noreply.github.com>
2023-05-31 13:35:56 -07:00
Matt Wang
3618253d15
Fix CI installing multiple copies of Jekyll, explicitly add kramdown-gfm-parser to the 3.9 build (#1248)
See: https://github.com/just-the-docs/just-the-docs/pull/1112#issuecomment-1533518323.
2023-05-22 14:14:38 -07:00
dependabot[bot]
216d342f26
Bump stylelint from 15.6.1 to 15.6.2 (#1254)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.6.1 to 15.6.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.6.1...15.6.2)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 09:28:19 -07:00
Matt Wang
0b93b35a3f
Update canonical site domain to be just-the-docs.com (#1211)
This PR locks in *almost* everything to switch over to [just-the-docs.com](https://just-the-docs.com)!

It:

- replaces all instances to the theme docs site (`https://just-the-docs.github.io/just-the-docs`) with `https://just-the-docs.com`
    - as @max06 has noted below, we do not change other links with the same `.github.io` prefix
- changes the `site.url` and `site.baseurl` in the theme docs' `_config.yml`
- adds a note in both the changelog and migration guide that a frozen version of `v0.3.3` docs is available at [https://v0-3-3-docs.just-the-docs.com/](https://v0-3-3-docs.just-the-docs.com/)

Closes #1160.
2023-05-14 22:06:14 -07:00
Peter Mosses
8e38759613
Fix liquid variable leakage in navigation components (#1243)
* Refactor nav, breadcrumbs, children_nav

Fix #1118

Improve the modularity of building the nav-panel, breadcrumbs, and children-nav
by making them independent. This also significantly simplifies the Liquid code.

* Fix order of breadcrumbs

* Update breadcrumbs.html

Revert inclusion of single breadcrumb for top-level pages.

* Update breadcrumbs.html

* Update children_nav.html

Revert to the previous layout in the HTML, to allow the use of `diff` to check the built site.

* Update minimal.html

Remove the previously required workaround involving `nav.html`.

* Add docs pages about layouts

The aim of the initial version of these docs pages is to illustrate the difference between the default and minimal layouts.

* Update CHANGELOG.md
2023-05-09 17:57:26 +02:00
dependabot[bot]
3048541778
Bump stylelint from 15.6.0 to 15.6.1 (#1246)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.6.0 to 15.6.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.6.0...15.6.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 09:31:07 -07:00
Matthew Wang
aaf5a68154
Prep v0.5.1 v0.5.1 2023-04-25 09:51:08 -07:00
Matt Wang
e64d97c4c8
Fix context-based media feature (not supported by Safari <16.4 (#1240)
Realized that the new syntax is only supported on [Safari 16.4](https://caniuse.com/css-media-range-syntax), which is gated by OS updates. Going to revert this change for the foreseeable future.

Closes #1239.
2023-04-25 09:46:42 -07:00
dependabot[bot]
3723875b93
Bump stylelint-config-standard-scss from 8.0.0 to 9.0.0 (#1238)
Bumps [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 09:39:02 -07:00
Matt Wang
7a4865a469
Remove unused release-drafter action (#1237) 2023-04-24 16:16:15 -07:00
dependabot[bot]
e0231653a8
Bump prettier from 2.8.7 to 2.8.8 (#1234)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.7 to 2.8.8.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.7...2.8.8)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-24 12:15:15 -07:00
dependabot[bot]
fe31bf4cb9
Bump stylelint from 15.5.0 to 15.6.0 (#1235)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.5.0 to 15.6.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.5.0...15.6.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-24 07:59:38 -07:00
Matt Wang
a9bced2f26
Update CHANGELOG.md 2023-04-22 13:39:09 -07:00
Robin Moffatt
7daf042a03
Disable copy code button in insecure contexts (#1226)
Implements point (2a) of https://github.com/just-the-docs/just-the-docs/issues/1202

## Secure context - behaviour unchanged

![image](https://user-images.githubusercontent.com/3671582/232823898-1b683b51-20ca-4e79-91cc-d543ae76aacd.png)

## Unsecure context - copy icon not shown and console message logged

![image](https://user-images.githubusercontent.com/3671582/232823972-94e2ef83-e526-4ca3-b16f-5f0f4243b50c.png)
2023-04-22 13:38:02 -07:00
Matt Wang
d107faaff4
Update CHANGELOG.md (#1231) 2023-04-19 23:07:05 -07:00
Matt Wang
eabae95d5b
Fix just the docs typo in migration guide (#1230)
Ref: #1214.
2023-04-19 22:50:53 -07:00
Robin Moffatt
a1ca235757
Document copy code button requiring secure context (#1225)
Fixes part (1) of https://github.com/just-the-docs/just-the-docs/issues/1202
2023-04-19 22:48:34 -07:00
Matt Wang
d2e34cb54d
Docs: fix font-weight typo (Utilities > Typography) (#1229)
Ref: #1227
2023-04-19 22:46:03 -07:00
dependabot[bot]
238b4eae42
Bump stylelint from 15.4.0 to 15.5.0 (#1224)
* Bump stylelint from 15.4.0 to 15.5.0

Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.4.0 to 15.5.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.4.0...15.5.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Autofix `media-feature-range-notation`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthew Wang <matt@matthewwang.me>
2023-04-19 22:21:21 -07:00
Waldir Pimenta
cdf5510d65
Fix typo ("them" → "theme") in MIGRATION.md (#1219) 2023-04-12 15:40:36 -07:00
Matthew Wang
6a6cc20620
Prep v0.5.0 v0.5.0 2023-04-12 12:38:17 -07:00
Matt Wang
5e5e2438d2
Fix mermaid v10, bundle all mermaid code in component (#1190)
This PR does two things:

1. fixes using mermaid version `>= 10` from the CDN, by importing the ESM module instead
2. moves script loading code from `head.html` to the mermaid include

I've also added some light documentation to clarify how using mermaid with local paths should work (users should specify a version, and they should only use fully-minified bundles with no local references).

The nice thing about this approach is that it's a breaking change for nobody, and only adds functionality (v10 support). Eventually, we should remove support for mermaid <10, which should make this much easier!

Closes #1206.

## Context

In v10, Mermaid has implemented a few (admittedly, very frustrating to deal with) breaking changes:

1. they've removed CJS support, which is fine, *but*
2. that means that the `dist` they publish to JSDelivr now has a **different URL**: for versions `10.0.0` - `10.0.2`, **they do not have a minified bundle -- you have to load the ESM version with relative imports**
3. and, separately the `init` function has been deprecated

2 is really the issue, and so I've had to go into the code to now load mermaid by ESM by default when the user is on mermaid > v10.

I've tested this with:

- CDN version < 10 (v9)
- CDN version 10
- local path with version < 10 (v9)
- local path with version 10 (new: also loaded as an ESM module)

Separately, I chose to put all the mermaid stuff in one include because:

- I think @pdmosses requested something like this - it's a bit confusing that some mermaid code is *not* in the include, and this makes modular components ... more modular
- from a developer perspective, it's more clear what's happening with mermaid
- mermaid is not render-blocking, so it shouldn't be in the `head` anyways

---------

Co-authored-by: Peter Mosses <18308236+pdmosses@users.noreply.github.com>
2023-04-12 12:05:51 -07:00
Matt Wang
786678a6a2
Update CHANGELOG.md 2023-04-11 17:29:37 -07:00
Matt Wang
4d95f9937a
Fix color contrast issues with ::selection (reverting to browser defaults) (#1208)
The scope of this PR has changed slightly - it now removes all styling of `::selection`, which reverts selected-element highlighting to browser defaults (typically a blue highlight with no text colour changes). It still inadvertently closes #1201.

I've included the original PR body below:

---

This resolves an issue on Firefox where selecting a code block produces white text on a white background, which is not legible. To test: visit https://deploy-preview-1208--just-the-docs.netlify.app/docs/index-test/, and highlight various code blocks in light/dark mode.

I did a bit more digging, and realized a handful of things:

- when I added the new `OneLightJekyll` theme, I inadvertently bundled in a `::selection` class; I've removed it.
    - I'm not really sure why this is a part of the theme in the first place!
    - this is technically the minimum change required to have no more issues
- however, at this point, Firefox now correctly uses the global `::selection`, which is white-on-purple; this is *different* from Chrome, which somehow overrides this for `pre` or `code`; I also (subjectively) think this is harder to read.
- the vast majority of websites default to the browser/user agent stylesheet for code highlighting; for example, [react.dev](https://react.dev)
- so, I've elected to instead default to the browser/user agent stylesheet; this has the nice side effect of making Chrome and Firefox consistent again

Questions for reviewers/community members:

- does this fix the problem for you? what about other browsers?
- do we like having the browser default for code selection, or should we stick to white-on-purple?

Closes #1201.
2023-04-11 17:28:16 -07:00
dependabot[bot]
7404c6f6e0
Bump stylelint-config-standard-scss from 7.0.1 to 8.0.0 (#1217)
Bumps [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v7.0.1...v8.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 11:14:58 -07:00
dependabot[bot]
f636d5abfd
Bump stylelint from 15.3.0 to 15.4.0 (#1213)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.3.0 to 15.4.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.3.0...15.4.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 08:31:04 -07:00
Matt Wang
27123d43ad
Update CHANGELOG.md 2023-03-28 18:13:04 -07:00
Matt Wang
a95e78f80d
Revert "Fix import order for setup.scss (#1184)" (#1209)
* Revert "Fix import order for `setup.scss` (#1184)"

This reverts commit 765954233a4f2b63c7c7cf6f3f698923dcfd8e7f.

* Update docs
2023-03-28 18:12:53 -07:00
dependabot[bot]
09896921e4
Bump prettier from 2.8.6 to 2.8.7 (#1203)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.6 to 2.8.7.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.6...2.8.7)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 12:24:33 -07:00
dependabot[bot]
7b3c5169c0
Bump prettier from 2.8.5 to 2.8.6 (#1199)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.5 to 2.8.6.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.5...2.8.6)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 07:25:08 -07:00
dependabot[bot]
7451cb5bdf
Bump prettier from 2.8.4 to 2.8.5 (#1198)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.4 to 2.8.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.4...2.8.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 10:30:40 -07:00
dependabot[bot]
39a5854144
Bump stylelint from 15.2.0 to 15.3.0 (#1197)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.2.0 to 15.3.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.2.0...15.3.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-17 12:55:53 -07:00
Matt Wang
7defb3164b
Update CHANGELOG.md 2023-03-14 17:31:36 -07:00
Matt Wang
5dd80bf749
docs: exclude CODE_OF_CONDUCT, docker-compose, and Dockerfile (#1187)
Noticed that these files are in our final `_site` build, and they shouldn't be! Bite-sized PR to exclude those.
2023-03-14 17:20:22 -07:00
Matt Wang
1a22f052e9
Remove unused images (just-the-docs.png, search.svg) (#1107)
Noticed that we have some images in `assets/` that aren't linked-to from any part of the site. `just-the-docs.png` is used as an example for enabling an image header, but it's not actually called-to. `search.svg` doesn't exist at all (it was moved to an icon, but the original file was never deleted).
2023-03-14 17:18:50 -07:00
Matthew Wang
117195fb1c
Prep for v0.4.2 v0.4.2 2023-03-14 17:08:54 -07:00
Matt Wang
ac5c99c77c
Update CHANGELOG.md 2023-03-09 08:18:14 -08:00
Matt Wang
765954233a
Fix import order for setup.scss (#1184)
In the conversation for #1166, I noticed that the import order for `setup.scss` disagrees with our docs.

> In particular, the [docs for `setup.scss`](https://just-the-docs.com/docs/customization/#override-and-define-new-variables) reads:
> 
> > To define new SCSS variables, functions, or override existing theme variables, place SCSS code in `_sass/custom/setup.scss`
> 
> But, this is not true - `setup.scss` is loaded *before* all of the themes, so it doesn't override existing theme variables. 
> 
> In my opinion, the solution here is to move `setup.scss` after all the `color_scheme` SCSS. This way, `setup.scss` properly allows theme overrides. In addition, users who previously defined variables in `setup.scss` and then used them in their custom color schemes can shift those declarations to be entirely in the theme code.

This is a one-liner that fixes the behaviour to be in-line with what our docs state.
2023-03-09 08:16:41 -08:00
Matt Wang
19dbd776c1
Fix duplicate import of color_schemes (#1173)
This is a deceptively simple PR that stops the double import of `color_schemes`. With @pdmosses' stellar suggestion, it's a simple two-liner!

## interaction with #1166

This is a clean merge!

## path forward for default syntax highlighting

However, this leaves an interesting question: if the user doesn't provide syntax highlighting as part of their color scheme, should we include a default set (in this case, the light theme)?

Broadly, I see a few arguments:

1. if we don't provide defaults, we'll break color schemes that don't define their own syntax highlighting
2. if we do provide defaults, we could unnecessarily bloat the file size

I think 1 is more pernicious than 2. Thus, my suggested path forward is:

- for now, merge this
- in `v1.0`, separate these concerns properly, and force each color scheme to provide its own syntax highlighting CSS. Provide a default file for users to import with `@import` or `@use`[^1]. 

[^1]: Separately, we're using `!default` wrong; [looking at the docs](https://sass-lang.com/documentation/variables#default-values), we need to be using it with `@use` for the defaults to take effect. Since we're not doing that, `!default` isn't actually doing anything! This is why variable overrides aren't propagating the way they should be (and thus, users need to do a lot of duplication). Fixing this is probably a v1 item, though I'll have to think about it more.
2023-03-09 08:05:47 -08:00
Matt Wang
38a34af2c0
Remove unused dark syntax themes (#1192)
Quick follow-up to #1166; see https://github.com/just-the-docs/just-the-docs/pull/1166#discussion_r1130157584.
2023-03-09 08:05:13 -08:00
Matt Wang
cc9bead2e9
Update CHANGELOG.md 2023-03-08 15:22:49 -08:00
Matt Wang
9a0b518f0e
Update default theme code highlighting with Atom's One Light colors, consolidate theme variables (#1166)
This PR replaces the default light code highlighting theme with Atom's One Light theme colors. This should provide more visual similarity with our dark theme, and as a byproduct, fix some of the contrast issues from our current light theme.

In addition (different from the original purpose of this PR), this also moves theme variables from `variables.scss` to `light.scss`, which always gets loaded anyways.

To test, compare the [deploy preview's kitchen sink Python code](https://deploy-preview-1166--just-the-docs.netlify.app/docs/index-test/#more-code) to the current [`main` branch's code](https://just-the-docs.github.io/just-the-docs/docs/index-test/#more-code); you can also use the "Preview dark color scheme" button to see OneDarkJekyll in action.

Users can opt-in to the old theme with `legacy_light`. I've documented this in the "customization" page.

Closes #679.

## implementation

Feel free to skip this part.

To do this, I:

- forked [mgyongyosi/OneDarkJekyll](https://github.com/mgyongyosi/OneDarkJekyll) to our own organization, [OneLightJekyll](https://github.com/just-the-docs/OneLightJekyll)
- updated the code to be slightly more robust (e.g. not require installing to global path)
- replaced the `colors.less` with the one pulled from Atom's [one-light-syntax](https://github.com/atom/atom/tree/master/packages/one-light-syntax)
- updated the license notice to also include GitHub's work in Atom
- regenerated the file
- plopped it in our current theme code



## next steps

This is related to #1100. I wanted to make this PR easier to review, so I won't implement that just yet; once we merge this, I can push that PR through. It's also related to #1173; in a comment below, I've also outlined some potential future work.

After we merge this, I'll trigger a release soon. I think this next minor bump can be focused on color schemes, e.g. dark theme, theme switching, and some bugfixes.
2023-03-08 15:11:41 -08:00
Matt Wang
67d7465dbe
Update CHANGELOG.md 2023-03-07 18:41:37 -08:00
flyx
16fe752dbc
Add docs for using mermaid with AsciiDoc (#1182)
As discussed in #1174, this adds a documentation section to UI Components > Code > Mermaid that describes the usage of mermaid with AsciiDoc.

Regarding the comment on asciidoctor-diagram in my edits, I cannot stress enough how much pain this is to set up (this was the first thing I tried before switching to JTD's client-side mermaid support).  It basically pre-renders mermaid diagrams in a headless chromium browser. This requires manual configuration of Puppeteer, along with additional config for Jekyll to keep the images the extension creates. And when you managed to get the image on your site, it looks horrible. This is why I wrote „not recommended“.
2023-03-07 18:40:25 -08:00
Matt Wang
1999256809
Revert mermaid_config.js prettier-ignore comment (#1189)
I introduced a bug in #1172 --- there's an implicit requirement that the line in `mermaid_config.js` has either an expression or the start of a code block; a comment (and then a newline) is invalid.

(to maintain the ignore behaviour, I've instead moved it to the `.prettierignore`)

This one's on me -- I hadn't realized that the `prettier-ignore` affected this file. Given the relative urgency of this, going to merge this in.

Closes #1188.
2023-03-03 09:17:11 -08:00
Matt Wang
6a55d05f30
Moves .prettierrc to package.json (#1186)
Short and sweet PR that does exactly what the title says. Note that this only affects developers of our theme, and is a no-op on the rest of the codebase (including formatting) -- it's just moving a config file!

The nice benefits: higher precedence, and one less file (that can confuse users who are forking this repo).
2023-03-02 00:28:00 -08:00