Skip to content

Commit

Permalink
Merge branch 'main' into hd-feat-link-button
Browse files Browse the repository at this point in the history
* main: (275 commits)
  [ci] release (withastro#2165)
  Define well-known RTL locales before calling `getLocaleInfo()` for default locale (withastro#2167)
  Update dependencies (withastro#2166)
  Improve page load performance (withastro#2155)
  docs: Add CodeSweetly to showcase (withastro#2160)
  [ci] release (withastro#2145)
  Fix bug for projects with spaces in their pathname (withastro#2156)
  ci: update file icons (withastro#2157)
  [ci] format
  Merge <link rel="canonical" /> tags, quick fixes (withastro#2153) (withastro#2154)
  Add two new showcase sites (withastro#2149)
  [ci] format
  i18n(zh-cn): Update `environmental-impact.md` (withastro#2148)
  add Saasfly showcase (withastro#2147)
  docs: add 'og:image:alt' metadata (withastro#2143)
  Deleting unnecessary twitter meta tags, quick fixes (withastro#2137)
  [ci] format
  i18n(es): update `environmental-impact` (withastro#2144)
  [ci] release (withastro#2142)
  feat: Add Pinterest icon to social list (withastro#2135)
  ...
  • Loading branch information
HiDeoo committed Aug 6, 2024
2 parents 54beb60 + 41506e5 commit 0df0dde
Show file tree
Hide file tree
Showing 257 changed files with 9,400 additions and 2,820 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Based on https://github.com/withastro/astro/blob/main/.devcontainer/Dockerfile
FROM mcr.microsoft.com/devcontainers/javascript-node:0-18

# Install latest pnpm
RUN npm install -g pnpm
# We uninstall pnpm here, since we enable the corepack version in the postCreateCommand
# This ensures we respect the "packageManager" version in package.json
RUN npm uninstall -g pnpm

COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"build": {
"dockerfile": "Dockerfile"
},
"postCreateCommand": "pnpm install",
"postCreateCommand": "sudo corepack enable pnpm && pnpm config set store-dir /home/node/.pnpm-store && PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 pnpm install",
"waitFor": "postCreateCommand",
"customizations": {
"codespaces": {
Expand Down
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,32 @@ concurrency:

env:
NODE_VERSION: 18
ASTRO_TELEMETRY_DISABLED: true

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
docs: ${{ steps.filter.outputs.docs }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
packages:
- 'packages/**'
unit-test:
name: Run unit tests
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.packages == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -31,8 +52,14 @@ jobs:
run: pnpm -r test:coverage

e2e-test:
name: Run E2E tests
runs-on: ubuntu-20.04
name: 'Run E2E tests (${{ matrix.os }})'
needs: changes
if: ${{ needs.changes.outputs.packages == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -46,7 +73,7 @@ jobs:

type-check:
name: Run type checks
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -63,7 +90,7 @@ jobs:

pa11y:
name: Check for accessibility issues
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -107,7 +134,9 @@ jobs:

links:
name: Check for broken links
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lunaria.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
shell: bash

- name: Generate Lunaria Overview
uses: yanthomasdev/lunaria-action@f60cb4c257e95ab41fc44356c4a852fe614e3bb4
uses: yanthomasdev/lunaria-action@v0.1.0
with:
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
working-directory: docs
2 changes: 1 addition & 1 deletion .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Run size-limit
uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05
uses: andresz1/size-limit-action@v1.8.0
with:
github_token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
build_script: 'build:examples'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/welcome-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
If they spot any issues you will see some error messages on this PR.
Don’t hesitate to ask any questions if you’re not sure what these mean!
2. In a few minutes, you’ll be able to see a preview of your changes on Vercel 🤩
2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🤩
3. One or more of our maintainers will take a look and may ask you to make changes.
We try to be responsive, but don’t worry if this takes a few days.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@ pnpm-debug.log*
# Vitest
__coverage__/

# Playwright
test-results/

# Vercel output
.vercel
.vercel

# Created by @astrojs/check
/src/
61 changes: 11 additions & 50 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ export const locales = {
uk: { label: 'Українська', lang: 'uk' },
};

/* https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables */
const VERCEL_PREVIEW_SITE =
process.env.VERCEL_ENV !== 'production' &&
process.env.VERCEL_URL &&
`https://${process.env.VERCEL_URL}`;
/* https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables */
const NETLIFY_PREVIEW_SITE = process.env.CONTEXT !== 'production' && process.env.DEPLOY_PRIME_URL;

const site = VERCEL_PREVIEW_SITE || 'https://starlight.astro.build/';
const site = NETLIFY_PREVIEW_SITE || 'https://starlight.astro.build/';
const ogUrl = new URL('og.jpg?v=1', site).href;
const ogImageAlt = 'Make your docs shine with Starlight';

export default defineConfig({
site,
Expand Down Expand Up @@ -58,11 +57,11 @@ export default defineConfig({
},
{
tag: 'meta',
attrs: { property: 'og:image', content: site + 'og.jpg?v=1' },
attrs: { property: 'og:image', content: ogUrl },
},
{
tag: 'meta',
attrs: { property: 'twitter:image', content: site + 'og.jpg?v=1' },
attrs: { property: 'og:image:alt', content: ogImageAlt },
},
],
customCss: process.env.NO_GRADIENTS ? [] : ['./src/assets/landing.css'],
Expand All @@ -87,49 +86,11 @@ export default defineConfig({
uk: 'Почніть звідси',
},
items: [
{
label: 'Getting Started',
link: 'getting-started',
translations: {
de: 'Erste Schritte',
es: 'Empezando',
ja: '入門',
fr: 'Mise en route',
it: 'Iniziamo',
id: 'Memulai',
'zh-CN': '开始使用',
'pt-BR': 'Introdução',
'pt-PT': 'Introdução',
ko: '시작하기',
tr: 'Başlarken',
ru: 'Введение',
hi: 'पहले कदम',
uk: 'Вступ',
},
},
{
label: 'Manual Setup',
link: 'manual-setup',
translations: {
de: 'Manuelle Einrichtung',
es: 'Configuración Manual',
ja: '手動セットアップ',
fr: 'Installation manuelle',
// it: 'Manual Setup',
id: 'Instalasi Manual',
'zh-CN': '手动配置',
'pt-BR': 'Instalação Manual',
'pt-PT': 'Instalação Manual',
ko: '수동으로 설정하기',
tr: 'Elle Kurulum',
ru: 'Установка вручную',
hi: 'मैनुअल सेटअप',
uk: 'Ручне встановлення',
},
},
'getting-started',
'manual-setup',
{
label: 'Environmental Impact',
link: 'environmental-impact',
slug: 'environmental-impact',
translations: {
de: 'Umweltbelastung',
es: 'Documentación ecológica',
Expand Down Expand Up @@ -208,7 +169,7 @@ export default defineConfig({
errorOnFallbackPages: false,
errorOnInconsistentLocale: true,
}),
]
]
: [],
}),
],
Expand Down
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"lunaria:build": "lunaria build"
},
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.4.4",
"@astro-community/astro-embed-youtube": "^0.5.2",
"@astrojs/starlight": "workspace:*",
"@lunariajs/core": "^0.0.32",
"@lunariajs/core": "^0.1.1",
"@types/culori": "^2.0.0",
"astro": "^4.3.5",
"astro": "^4.10.2",
"culori": "^3.2.0",
"sharp": "^0.32.5"
},
"devDependencies": {
"pa11y-ci": "^3.0.1",
"starlight-links-validator": "^0.7.1",
"start-server-and-test": "^2.0.0"
"starlight-links-validator": "^0.9.0",
"start-server-and-test": "^2.0.4"
}
}
4 changes: 4 additions & 0 deletions docs/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/_astro/*
Cache-Control: public
Cache-Control: max-age=31536000
Cache-Control: immutable
11 changes: 11 additions & 0 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Proxy to Phat Houston from our Product Hunt launch — site operated by Otterlord
/ph/* https://astro-houston-ph.pages.dev/ph/:splat 200

# Moved content
/zh/* /zh-cn/:splat
/showcase/ /resources/showcase/
/:lang/showcase/ /:lang/resources/showcase/

# Translated 404s
/:lang/* /:lang/404/ 404
/* /404/ 404
Binary file added docs/src/assets/showcase/codesweetly.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/dmno.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/docs.orama.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/document.saasfly.io.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/ee.qqv.com.au.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/feedbackspark.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/how2neovim.io.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/kinde.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/quotesdomain.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/styledictionary.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/src/assets/showcase/sudovanilla.com.png
Binary file not shown.
Binary file added docs/src/assets/showcase/tutorialkit.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/ucexlly.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/ui.full.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/www.devhealthos.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 35 additions & 5 deletions docs/src/components/showcase-sites.astro
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,46 @@ import FluidGrid from './fluid-grid.astro';
/>
<Card title="DipSway" href="https://api.dipsway.com" thumbnail="api.dipsway.com.png" />
<Card title="RunsOn" href="https://runs-on.com" thumbnail="runs-on.com.png" />
<Card
title="SudoVanilla"
href="https://sudovanilla.com/docs/minpluto/"
thumbnail="sudovanilla.com.png"
/>
<Card title="SST Ion" href="https://ion.sst.dev/" thumbnail="ion.sst.dev.png" />
<Card
title="Font Awesome"
href="https://docs.fontawesome.com/"
thumbnail="docs.fontawesome.com.png"
/>
<Card title="TrueCharts" href="https://truecharts.org/" thumbnail="truecharts.org.png" />
<Card title="Kinde" href="https://docs.kinde.com/" thumbnail="kinde.com.png" />
<Card title="DMNO" href="https://dmno.dev" thumbnail="dmno.dev.png" />
<Card title="EspansoEdit" href="https://ee.qqv.com.au" thumbnail="ee.qqv.com.au.png" />
<Card title="how2neovim" href="https://how2neovim.io/" thumbnail="how2neovim.io.png" />
<Card title="TutorialKit" href="https://tutorialkit.dev/" thumbnail="tutorialkit.dev.png" />
<Card
title="The Dev Health OS"
href="https://www.devhealthos.com/"
thumbnail="www.devhealthos.com.png"
/>
<Card title="Orama" href="https://docs.orama.com/" thumbnail="docs.orama.com.png" />
<Card
title="FeedbackSpark"
href="https://feedbackspark.com/docs/"
thumbnail="feedbackspark.com.png"
/>
<Card title="Fulldev UI" href="https://ui.full.dev" thumbnail="ui.full.dev.png" />
<Card title="UCEXLLY" href="https://www.ucexlly.com/" thumbnail="ucexlly.com.png" />
<Card
title="QuotesDomain"
href="https://www.quotesdomain.com/"
thumbnail="quotesdomain.com.png"
/>
<Card title="Saasfly" href="https://document.saasfly.io/" thumbnail="document.saasfly.io.png" />
<Card
title="freeCodeCamp"
href="https://contribute.freecodecamp.org/intro/"
thumbnail="contribute.freecodecamp.org.png"
/>
<Card
title="Style Dictionary"
href="https://styledictionary.com/"
thumbnail="styledictionary.com.png"
/>
<Card title="CodeSweetly" href="https://codesweetly.com/" thumbnail="codesweetly.com.png" />
</FluidGrid>
8 changes: 6 additions & 2 deletions docs/src/components/sidebar-preview.astro
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
import type { AutoSidebarGroup, SidebarItem } from '../../../packages/starlight/schemas/sidebar';
import type {
AutoSidebarGroup,
SidebarItem,
InternalSidebarLinkItem,
} from '../../../packages/starlight/schemas/sidebar';
import SidebarSublist from '../../../packages/starlight/components/SidebarSublist.astro';
import type { SidebarEntry } from '../../../packages/starlight/utils/navigation';
interface Props {
config: SidebarConfig;
}
type SidebarConfig = Exclude<SidebarItem, AutoSidebarGroup>[];
type SidebarConfig = Exclude<SidebarItem, AutoSidebarGroup | InternalSidebarLinkItem>[];
const { config } = Astro.props;
Expand Down
30 changes: 16 additions & 14 deletions docs/src/content/docs/environmental-impact.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,21 @@ Choosing a host that uses renewable energy will mean lower carbon emissions for
Curious how other docs frameworks compare?
These tests with the [Website Carbon Calculator][wcc] compare similar pages built with different tools.

| Framework | CO₂ per page visit |
| --------------------------- | ------------------ |
| [Starlight][sl-carbon] | 0.01g |
| [VitePress][vp-carbon] | 0.05g |
| [Docus][dc-carbon] | 0.05g |
| [Sphinx][sx-carbon] | 0.07g |
| [MkDocs][mk-carbon] | 0.10g |
| [Nextra][nx-carbon] | 0.11g |
| [docsify][dy-carbon] | 0.11g |
| [Docusaurus][ds-carbon] | 0.24g |
| [Read the Docs][rtd-carbon] | 0.24g |
| [GitBook][gb-carbon] | 0.71g |

<small>Data collected on 14 May 2023. Click a link to see up-to-date figures.</small>
| Framework | CO₂ per page visit | Rating |
| --------------------------- | ------------------ | :----: |
| [Starlight][sl-carbon] | 0.01g | A+ |
| [Read the Docs][rtd-carbon] | 0.05g | A+ |
| [Sphinx][sx-carbon] | 0.06g | A+ |
| [VitePress][vp-carbon] | 0.07g | A+ |
| [Docus][dc-carbon] | 0.09g | A+ |
| [docsify][dy-carbon] | 0.10g | A |
| [Nextra][nx-carbon] | 0.11g | A |
| [MkDocs][mk-carbon] | 0.19g | B |
| [Docusaurus][ds-carbon] | 0.21g | B |
| [GitBook][gb-carbon] | 0.43g | C |
| [Mintlify][mt-carbon] | 1.22g | F |

<small>Data collected on 22 July 2024. Click a link to see up-to-date figures.</small>

[sl-carbon]: https://www.websitecarbon.com/website/starlight-astro-build-getting-started/
[vp-carbon]: https://www.websitecarbon.com/website/vitepress-dev-guide-what-is-vitepress/
Expand All @@ -114,6 +115,7 @@ These tests with the [Website Carbon Calculator][wcc] compare similar pages buil
[ds-carbon]: https://www.websitecarbon.com/website/docusaurus-io-docs/
[rtd-carbon]: https://www.websitecarbon.com/website/docs-readthedocs-io-en-stable-index-html/
[gb-carbon]: https://www.websitecarbon.com/website/docs-gitbook-com/
[mt-carbon]: https://www.websitecarbon.com/website/mintlify-com-docs-quickstart/

## More resources

Expand Down
Loading

0 comments on commit 0df0dde

Please sign in to comment.