Skip to content

Commit

Permalink
docs: linaria (#657)
Browse files Browse the repository at this point in the history
<!--
Filling out this template is required. Any PR that does not include
enough information to be reviewed may be closed at a maintainers'
discretion. All new code requires documentation and tests to ensure
against regressions.
-->

### Description of the Change
<!--
We must be able to understand the design of your change from this
description. The maintainer reviewing this PR may not have worked with
this code recently, so please provide as much detail as possible.

Where possible, please also include:
- verification steps to ensure your change has the desired effects and
has not introduced any regressions
- any benefits that will be realized
- any alternative implementations or possible drawbacks that you
considered
- screenshots or screencasts
-->

<!-- Enter any applicable Issue number(s) here that will be
closed/resolved by this PR. -->
Closes #633 

### How to test the Change
<!-- Please provide steps on how to test or validate that the change in
this PR works as described. -->

### Changelog Entry
<!--
Please include a summary for this PR, noting whether this is something
being Added / Changed / Deprecated / Removed / Fixed / or Security
related. You can replace the sample entries after this comment block
with the single changelog entry line for this PR. -->
> Added - New feature
> Changed - Existing functionality
> Deprecated - Soon-to-be removed feature
> Removed - Feature
> Fixed - Bug fix
> Security - Vulnerability


### Credits
<!-- Please list any and all contributors on this PR so that they can be
added to this projects CREDITS.md file. -->
Props @username, @username2, ...


### Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you are unsure about any of these, please ask for
clarification. We are here to help! -->
- [ ] I agree to follow this project's [**Code of
Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md).
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my change.
- [ ] All new and existing tests pass.
  • Loading branch information
nicholasio authored Dec 1, 2023
2 parents 1b300ee + ddb11c4 commit ddd728d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 0 additions & 5 deletions docs/documentation/08-Guides/complex-urls-structure.md

This file was deleted.

13 changes: 13 additions & 0 deletions docs/documentation/08-Guides/linaria.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Linaria (CSS-in-JS)

HeadstartWP offers a straightforward integration with [Linaria](https://github.com/callstack/linaria), a zero-runtime CSS-in-JS solution. To use it, simply install the following linaria packages.

```
npm install --save-dev @linaria/babel-preset @linaria/core @linaria/react @linaria/shaker @linaria/webpack-loader
```

The [withHeadstartWPConfig](/docs/api/namespaces/headstartwp_next.config/#withheadstartwpconfig) function will detect the presence of the Linaria packages and will enable the build steps necessary to compile Linaria.

:::caution
If you're on a monorepo setup, these packages should be installed on the Next.js project.
:::caution
4 changes: 2 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ const config = {
require.resolve('@easyops-cn/docusaurus-search-local'),
{
indexDocs: true,
docsRouteBasePath: ['reference', 'docs'],
docsDir: ['default', 'docs'],
docsRouteBasePath: ['api', 'learn'],
docsDir: ['documentation', 'docs'],
hashed: true,
},
],
Expand Down

1 comment on commit ddd728d

@vercel
Copy link

@vercel vercel bot commented on ddd728d Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.