Skip to content

Commit

Permalink
(#996) Convert docs to astro
Browse files Browse the repository at this point in the history
This converts all of the previous files that were
being generated by Statiq into Astro framework.
Now, all documentation is written in .mdx files
which are located in the `src/content` folders.
The README.md has been updated to reflect all of
these changes and new processes.
  • Loading branch information
st3phhays committed Jun 11, 2024
1 parent 8d9e324 commit 13e24a4
Show file tree
Hide file tree
Showing 1,030 changed files with 69,897 additions and 3,533 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/withastro/astro/blob/main/.devcontainer/with-mdx/devcontainer.json
{
"name": "Node.js & TypeScript",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
"forwardPorts": [5086],
"portsAttributes": {
"5086": {
"label": "Astro",
"onAutoForward": "openBrowser"
}
},
"postAttachCommand": "yarn dev",
"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"DavidAnson.vscode-markdownlint",
"shardulm94.trailing-spaces",
"nhoizey.gremlins",
"streetsidesoftware.code-spell-checker",
"bierner.emojisense",
"astro-build.astro-vscode",
"esbenp.prettier-vscode",
"unifiedjs.vscode-mdx",
"ms-vscode.vscode-typescript-next",
"dbaeumer.vscode-eslint"
]
}
},
"remoteUser": "node"
}
54 changes: 54 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# git history
.git

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# npm
npm-debug.log
.coverage
.coverage.*
.env
.aws

# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/

# choco-theme
public/fonts
public/scripts
public/styles
public/images/global-shared

# general
apple-touch-*.png
favicon.ico
.astro
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 4
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask A Question
url: https://github.com/chocolatey/docs/discussions
about: Please ask and answer questions here.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/zFeatureRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Documentation Enhancement / Addition
about: Would you like to see new or updated documentation?
---

<!--
Ensure you have read over [Submitting Issues](https://github.com/chocolatey/.github/blob/main/SUBMITTING_ISSUES.md)
Please check to see if your issue already exists with a quick search of the issues. Start with one relevant term and then add if you get too many results.
NOTE: Keep in mind we have a [Code Of Conduct](https://github.com/chocolatey/.github/blob/main/CODE_OF_CONDUCT.md) that we expect folks to observe when they are looking for support in the Chocolatey community.
Name your issue appropriately: give it a sentence that reads well enough for anyone seeing this in the release notes to what it is.
When writing out the issue details please ensure you are writing it as if you were explaining it to somebody else.
Even if you will be working on and resolving the issue yourself. This helps others to understand the reasons for the issue and for it to be searchable in future.
Please do not remove any of the headings.
If a heading is not applicable then enter N/A: Why it's not applicable
Please remove all comments before submitting.
-->

## What New Or Updated Would You Like To See?

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

## Why Is It Needed?

<!-- A clear and concise description of what you want to happen. -->

## Additional Context?

<!-- Add any other context or screenshots about the feature request here. -->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/zReportIssue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Report Issue
about: Did you find issues in our documentation?
---

<!--
Ensure you have read over [Submitting Issues](https://github.com/chocolatey/.github/blob/main/SUBMITTING-ISSUES.md)
Please check to see if your issue already exists with a quick search of the issues. Start with one relevant term and then add if you get too many results.
NOTE: Keep in mind we have a [Code Of Conduct](https://github.com/chocolatey/.github/blob/main/CODE_OF_CONDUCT.md) that we expect folks to observe when they are looking for support in the Chocolatey community.
Name your issue appropriately: give it a sentence that reads well enough for anyone seeing this in the release notes to what it is.
When writing out the issue details please ensure you are writing it as if you were explaining it to somebody else.
Even if you will be working on and resolving the issue yourself. This helps others to understand the reasons for the issue and for it to be searchable in future.
-->

### What You Are Seeing?


### What is Expected?


### How Did You Get This To Happen? (Steps to Reproduce)

<!--
This section is not intended to be used for suggesting documentation changes.
-->
57 changes: 57 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!--
BEFORE YOU CREATE A PULL REQUEST:
Ensure you have read over [CONTRIBUTING.md](./CONTRIBUTING.md). We provide VERY defined guidance (as such, we strongly adhere to it).
A summary of our expectations:
- You are not submitting a pull request from your MASTER / MAIN branch.
- YOUR GIT COMMIT MESSAGE FORMAT IS EXTREMELY IMPORTANT. We have a very defined expectation for this format and are sticklers about it. Really, READ the entire Contributing document. It will save you and us pain.
- Do not reformat code, it makes it hard to see what has changed. Leave the formatting to us.
THANKS! We appreciate you reading the entire Contributing document and not just scanning through it.
Name your issue appropriately: give it a sentence that reads well enough for anyone seeing this in release notes to know what the issue is.
When writing out the pull request details please ensure you are writing it as
if you were explaining it to somebody else.
Even if you will be working on and resolving the issue yourself.
This helps others to understand the reasons for the pull request and for it to be searchable in future.
Please do not remove any of the headings.
If a heading is not applicable then enter N/A: Why it's not applicable
Make sure you have raised an issue for this pull request before continuing.
Please remove all comments before submitting.
-->

## Description Of Changes
<!-- Enter a description of the pull request changes -->

## Motivation and Context
<!-- Why is this change necessary and under what context is it being done -->

## Testing

* [ ] I have previewed these changes using the [Docker Container](https://github.com/chocolatey/docs/tree/master/.devcontainer) or another method before submitting this pull request.

## Change Types Made
<!-- Tick the boxes for the type of changes that have been made -->

* [ ] Minor documentation fix (typos etc.).
* [ ] Major documentation change (refactoring, reformatting or adding documentation to existing page).
* [ ] New documentation page added.
* [ ] The change I have made should have a video added, and I have raised an issue for this.
* Issue #

## Change Checklist

* [ ] Requires a change to menu structure (top or left-hand side)/
* [ ] Menu structure has been updated

## Related Issue
<!-- Make sure you have raised an issue for this pull request before continuing. -->

Fixes #

<!-- PLEASE REMOVE ALL COMMENTS BEFORE SUBMITTING -->
3 changes: 3 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- name: "Video"
color: "D0E64E"
description: "The issue or PR requires a video to be recorded and included in a later PR."
28 changes: 28 additions & 0 deletions .github/workflows/label-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Sync labels
on:
workflow_dispatch:
schedule:
# Run at the end of the day (most likely UTC)
- cron: "0 0 * * *"
push:
branches:
- "master"
paths:
- ".github/labels.yml"

jobs:
labels:
# We use ubuntu as the image, as it is typically faster and cheaper (on private repos).
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.0.2
- uses: EndBug/label-sync@v2.2.0
with:
config-file: |
https://raw.githubusercontent.com/chocolatey/.github/master/.github/labels.yml
.github/labels.yml
request-token: ${{ secrets.SYNC_TOKEN }} # Used when getting the config files.
delete-other-labels: true
dry-run: false
token: ${{ secrets.SYNC_TOKEN }} # Used when updating the lables on the repository
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests

on:
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout repository using git
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build site
run: yarn build
- name: Run Playwright tests
run: yarn playwright
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 14
32 changes: 32 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Documentation

on:
push:
branches: [ master ]
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository using git
uses: actions/checkout@v4
- name: Install, build, and upload site
uses: withastro/action@v2

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# build output
dist/

# generated types
.astro/

Expand All @@ -12,6 +13,21 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# npm
npm-debug.log
.coverage
.coverage.*
.env
.aws

# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# environment variables
.env
Expand All @@ -22,3 +38,21 @@ pnpm-debug.log*

# jetbrains setting folder
.idea/

# choco-theme
public/fonts
public/scripts
public/styles
public/images/global-shared

# general
apple-touch-*.png
favicon.ico
.astro

# playwright
/src/tests/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
9 changes: 9 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"MD026": false,
"MD013": false,
"MD024": false,
"MD034": false,
"MD033": {
"allowed_elements": ["details", "strong", "summary"]
}
}
Loading

0 comments on commit 13e24a4

Please sign in to comment.