Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync canary with main #74

Merged
merged 15 commits into from
Mar 10, 2021
Merged
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md).
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "rocketseat/gatsby-themes" }
],
"commit": false,
"linked": [
["@rocketseat/gatsby-theme-docs", "@rocketseat/gatsby-theme-docs-core"]
],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["gatsby-starter-rocket-docs"]
}
19 changes: 19 additions & 0 deletions .changeset/mighty-camels-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@rocketseat/gatsby-theme-docs': minor
'@rocketseat/gatsby-theme-docs-core': minor
---

**New**

- feat: add support for Gatsby v3
- feat: add repositoryUrl option to theme (#47)

**Docs**

- docs: add more examples of theme usage
- docs: rename master to main

**Other**

- chore(deps): update packages
- refactor: change colors for blockquote
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"plugins": ["import", "jsx-a11y", "react", "react-hooks", "prettier"],
"extends": ["airbnb", "eslint-config-prettier", "prettier/react"],
"extends": ["airbnb", "eslint-config-prettier", "prettier"],
"rules": {
"prettier/prettier": "error",
"react/jsx-filename-extension": [
Expand Down
32 changes: 17 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

## Table of Contents

- [Getting started](#getting-started)
- [Language](#language)
- [For native English speakers](#for-native-english-speakers)
- [Code of Conduct](#code-of-conduct)
- [How can I help?](#how-can-i-help)
- [Documentation](#documentation)
- [Issues](#issues)
- [Submitting an issue](#submitting-an-issue)
- [Feedback](#feedback)
- [Code](#code)
- [Dev environment](#dev-environment)
- [Commiting](#commiting)
- [Why all these rules?](#why-all-these-rules)
- [Submitting a pull request](#submitting-a-pull-request)
- [Contribution guidelines](#contribution-guidelines)
- [Table of Contents](#table-of-contents)
- [Getting started](#getting-started)
- [Language](#language)
- [For native English speakers](#for-native-english-speakers)
- [Code of Conduct](#code-of-conduct)
- [How can I help?](#how-can-i-help)
- [Documentation](#documentation)
- [Issues](#issues)
- [Submitting an issue](#submitting-an-issue)
- [Feedback](#feedback)
- [Code](#code)
- [Dev environment](#dev-environment)
- [Commiting](#commiting)
- [Why all these rules?](#why-all-these-rules)
- [Submitting a pull request](#submitting-a-pull-request)

## Getting started

Expand Down Expand Up @@ -206,7 +208,7 @@ We try to enforce these rules for the following reasons:

Before submitting a pull request, please make sure the following is done:

- [Fork](https://help.github.com/en/articles/fork-a-repo) the repository and create your branch from `master`.
- [Fork](https://help.github.com/en/articles/fork-a-repo) the repository and create your branch from `main`.
- Example: `feature/my-awesome-feature` or `fix/annoying-bug`;
- Run `yarn` in the repository root;
- If you’ve fixed a bug or added code that should be tested, **add tests**;
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- If this is your first time, please read our contribution guidelines: (https://github.com/Rocketseat/gatsby-themes/blob/master/.github/CONTRIBUTING.md) -->
<!-- If this is your first time, please read our contribution guidelines: (https://github.com/Rocketseat/gatsby-themes/blob/main/.github/CONTRIBUTING.md) -->

<!-- Verify first that your pull request is not already proposed -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ name: Publish Starters
on:
push:
branches:
- master
- main
paths:
- 'examples/**'

jobs:
master:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: publish:starters
uses: johno/actions-push-subdirectories@master
env:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
commit: 'chore(release): Publish'
title: 'Changesets: Version Packages'
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Wait for NPM package propagation
if: steps.changesets.outputs.published == 'true'
uses: kibertoad/[email protected]
with:
time: '30s'
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn commitlint --edit $1
8 changes: 8 additions & 0 deletions .husky/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
command_exists () {
command -v "$1" >/dev/null 2>&1
}

# Workaround for Windows 10, Git Bash and Yarn
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn lint-staged
5 changes: 5 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

exec < /dev/tty && yarn cz --hook || true
3 changes: 1 addition & 2 deletions @rocketseat/gatsby-theme-docs-core/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Rocketseat
Copyright (c) 2021 Rocketseat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

28 changes: 16 additions & 12 deletions @rocketseat/gatsby-theme-docs-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</h2>

<p align="center">
Core theme for <a href="https://github.com/Rocketseat/gatsby-themes/tree/master/%40rocketseat/gatsby-theme-docs">@rocketseat/gatsby-theme-docs</a> with no additional theming or style opinions. Includes all of the data structures you need to get up and build a documentation website.
Core theme for <a href="https://github.com/Rocketseat/gatsby-themes/tree/main/%40rocketseat/gatsby-theme-docs">@rocketseat/gatsby-theme-docs</a> with no additional theming or style opinions. Includes all of the data structures you need to get up and build a documentation website.
</p>

<p align="center">
Expand Down Expand Up @@ -51,15 +51,19 @@ npm i @rocketseat/gatsby-theme-docs-core

### Theme options

| Key | Default | Required | Description |
| ---------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| basePath | / | No | Root url for all docs |
| configPath | config | No | Location of config files |
| docsPath | docs | No | The site description for SEO and social (FB, Twitter) tags |
| githubUrl | - | No | The complete URL of your repository. For example: `https://github/rocketseat/gatsby-themes` |
| baseDir | - | No | If your Gatsby site does not live in the root of your project directory/git repo, pass the subdirectory name here (`docs`, for example) |
| withMdx | true | No | If necessary, you can add your own MDX options to the theme. To do so, make sure you turn this option to false and include `gatsby-plugin-mdx` on your `gatsby-config` |
| branch | master | No | Default branch of the repository |
| Key | Default | Required | Description |
| ------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| basePath | / | No | Root url for all docs |
| configPath | config | No | Location of config files |
| docsPath | docs | No | The site description for SEO and social (FB, Twitter) tags |
| githubUrl | - | - | Deprecated in favor of `repositoryUrl` |
| repositoryUrl | - | No | The URL of your repository (supports GitHub, GitLab and Bitbucket). Example: `https://github/rocketseat/gatsby-themes` |
| baseDir | - | No | If your Gatsby site does not live in the root of your project directory/git repo, pass the subdirectory name here (`docs`, for example) |
| withMdx | true | No | If necessary, you can add your own MDX options to the theme. To do so, make sure you turn this option to false and include `gatsby-plugin-mdx` on your `gatsby-config` |
| branch | main | No | Default branch of the repository |

> Note: When adding a BitBucket link on the `repositoryUrl` option, don't add the `src/<branch>` to it.
> Example of correct link: `https://bitbucket.org/jpedroschmitz/gatsby-themes`

### Example usage

Expand Down Expand Up @@ -160,8 +164,8 @@ In general, you will need to create two files (`Docs.js` and `Homepage.js`) into

## ✨ Contributing

Thanks for being interested in contributing! We’re so glad you want to help! Please take a little bit of your time and look at our [contributing guidelines](https://github.com/Rocketseat/gatsby-themes/blob/master/.github/CONTRIBUTING.md) and our
[code of conduct](https://github.com/Rocketseat/gatsby-themes/blob/master/.github/CODE_OF_CONDUCT.md)! All type of contributions are welcome, such as bug fixes, issues or feature requests.
Thanks for being interested in contributing! We’re so glad you want to help! Please take a little bit of your time and look at our [contributing guidelines](https://github.com/Rocketseat/gatsby-themes/blob/main/.github/CONTRIBUTING.md) and our
[code of conduct](https://github.com/Rocketseat/gatsby-themes/blob/main/.github/CODE_OF_CONDUCT.md)! All type of contributions are welcome, such as bug fixes, issues or feature requests.

## 📝 License

Expand Down
Loading