Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Aug 7, 2024
2 parents c0679fb + d728061 commit ff24988
Show file tree
Hide file tree
Showing 207 changed files with 19,396 additions and 4,263 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.cmd text eol=crlf
*.bat text eol=crlf
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
labels: [bug, needs-triage]
about: Create a report to help us improve
---

<!-- Describe you environment by answering the questions below. Put your answers after the colon on each line. -->

### Environment

- [ ] Version of Docsy you are using:
- [ ] How are you using Docsy? As a:
- [ ] Hugo module
- [ ] NPM module
- [ ] Git submodule
- [ ] Other:
- [ ] Version of Hugo you are using (output of `hugo version`):
- [ ] OS:
- [ ] Linux
- [ ] macOS
- [ ] Windows
- [ ] Other:

### Problem

<!-- Concisely describe the problem you are seeing, ideally provide steps to reproduce it. -->
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: SUPPORT, ISSUES, and TROUBLESHOOTING
url: https://github.com/google/docsy/discussions
about:
Please DO NOT use GitHub issues for support requests, instead start a
discussion thread at https://github.com/google/docsy/discussions. Feel
free to open an issue once your problem is confirmed by the docsy
maintainers and/or the docsy community.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Enhancement proposal
labels: [enhancement, needs-triage]
about: Propose an enhancement or submit a feature request
---

<!-- Tell us about the enhancement or describe your feature wish. Think about if it really belongs in the docsy theme; you may want to discuss it on https://github.com/google/docsy/discussions first. -->
50 changes: 50 additions & 0 deletions .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Smoke test across OSs: build a Docsy-based site from scratch,
# using Docsy as hugo module and fetching Docsy via NPM.

name: smoke

on:
push:
branches: [main]
pull_request:
# schedule: # midnight every day
# - cron: '0 0 * * *'
workflow_dispatch:

jobs:
new-site:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
docsy-src: [NPM, HUGO_MODULE]
env:
BASE_REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
SHA: ${{ github.sha }}
# TODO: drop PR testing under Windows because it's too slow?
# if: github.event_name != 'pull_request' && matrix.os != 'windows-latest'
if: github.event_name != 'push' || github.repository == 'google/docsy'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package.json
- run: tools/install-hugo.sh
shell: bash
- name: Make site (non-PR)
if: github.event_name != 'pull_request'
run: |
mkdir tmp && cd tmp && set -x
../tools/make-site.sh -s ${{ matrix.docsy-src }} -r $BASE_REPO -v $SHA
shell: bash
- name: Make site from PR
if: github.event_name == 'pull_request'
run: |
mkdir tmp && cd tmp && set -x
../tools/make-site.sh -s ${{ matrix.docsy-src }} -r $PR_REPO -v $BRANCH
shell: bash
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build Docsy & the User Guide and run all repo checks across OSs.

name: test

on:
push:
branches: [main]
pull_request:
# schedule:
# - cron: '11 0 * * *' # 11 past midnight every day
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package.json
- run: npm install --omit=optional
- if: runner.os != 'Windows'
run: npm run test:all
- if: runner.os == 'Windows'
run: npm run ci:prepare && npm run cd:docs build && npm run ci:post
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
package-lock.json
/tmp

# Hugo
.hugo_build.lock
Expand Down
19 changes: 19 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://badges.netlify.com/api/docsydocs.svg\\?branch=main"
},
{
"pattern": "^https://docs.npmjs.com/cli/v10/using-npm/scripts#prepare-and-prepublish"
},
{
"pattern": "^#070$"
}
],
"timeout": "3s",
"retryOn429": true,
"aliveStatusCodes": [200, 206]
}
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.editorconfig
.gitattributes
.gitignore
.nvmrc
.prettierignore
.s3deploy.yml
6 changes: 3 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 4
"proseWrap": "always",
"semi": true,
"singleQuote": true
}
10 changes: 3 additions & 7 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// For settings, see https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
{
"version": "0.2",
"caseSensitive": true,
"words": [
"Docsy",
"shortcode",
"shortcodes"
]
"version": "0.2",
"caseSensitive": true,
"words": ["Docsy", "hugo", "shortcode", "shortcodes", "upvote", "warnf"]
}
Loading

0 comments on commit ff24988

Please sign in to comment.