Skip to content

Commit

Permalink
Rework docs for Prosopo (#1)
Browse files Browse the repository at this point in the history
* Rework docs for Prosopo

* i18n(zh-cn): Update `view-transitions.mdx` (withastro#8748)

Co-authored-by: liruifengv <[email protected]>

* i18n(zh-cn): Update `zerops.mdx` (withastro#8733)

* i18n(zh-cn): Update `zerops.mdx`

* Update src/content/docs/zh-cn/guides/deploy/zerops.mdx

Co-authored-by: liruifengv <[email protected]>

* Update src/content/docs/zh-cn/guides/deploy/zerops.mdx

Co-authored-by: liruifengv <[email protected]>

---------

Co-authored-by: liruifengv <[email protected]>

* i18n(zh-cn): Update `markdown-content.mdx` (withastro#8734)

* i18n(zh-cn): Update `markdown-content.mdx`

* fix broken links

---------

Co-authored-by: liruifengv <[email protected]>

* i18n(zh-cn): Update `render.mdx` (withastro#8761)

Co-authored-by: liruifengv <[email protected]>

* linting

* i18n(fr): Update `guides/view-transitions.mdx` from withastro#8740 (withastro#8758)

Signed-off-by: Thomas Bonnet <[email protected]>
Co-authored-by: Yan <[email protected]>

* Fix vite build

---------

Signed-off-by: Thomas Bonnet <[email protected]>
Co-authored-by: Nin3 <[email protected]>
Co-authored-by: liruifengv <[email protected]>
Co-authored-by: Thomas Bonnet <[email protected]>
Co-authored-by: Yan <[email protected]>
  • Loading branch information
5 people authored Jul 10, 2024
1 parent d0b8afa commit e4d0b1c
Show file tree
Hide file tree
Showing 2,335 changed files with 1,277 additions and 351,703 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist
node_modules
.github
.changeset
netlify.toml
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ module.exports = {
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
],
'@typescript-eslint/no-non-null-assertion': 'off',
'no-empty-interface': 1,
'regexp/no-super-linear-backtracking': 0,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Support & Community 💁
url: https://astro.build/chat
url: https://discord.gg/3nMYAHecZT
about: 'This issue tracker is not for support questions. Our Discord server hosts an active community of Astro users. Come join us to discuss Astro or find assistance!'
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
<!-- #### First-time contributor to Astro Docs? -->

<!-- If you are a member of the Astro Discord, please add your username in the description so we can welcome you there! -->
<!-- https://astro.build/chat -->
<!-- https://discord.gg/3nMYAHecZT -->
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are lots of ways to contribute to the Astro Docs website!

The Astro Docs website is ... an Astro website! Maintaining it requires not only written content but also maintaining Astro code and addressing a11y, CSS, UI, and UX concerns. We also make our documentation available in several languages, so we need help translating the entire site.

You can also make a huge contribution by getting involved by leaving review comments on [PRs](https://github.com/withastro/docs/pulls), adding ideas in existing GitHub [Issues](https://github.com/withastro/docs/issues) and [Discussions](https://github.com/withastro/docs/discussions) and participating in our "Pinned" issue maintenance tasks!
You can also make a huge contribution by getting involved by leaving review comments on [PRs](https://github.com/prosopo/docs/pulls), adding ideas in existing GitHub [Issues](https://github.com/prosopo/docs/issues) and [Discussions](https://github.com/prosopo/docs/discussions) and participating in our "Pinned" issue maintenance tasks!

Every PR, especially translation PRs, needs reviewers! Reviewing PRs and leaving comments, suggestions, or an approving "LGTM!" ("Looks Good To Me!") is a great way to get started on Team Docs, and to learn more about Astro.

Expand All @@ -34,7 +34,7 @@ We encourage you to:

- **Make a PR directly** for very obvious documentation fixes like typos or broken links.

- **Look at our Existing Issues** (especially those labelled [`help wanted`](https://github.com/withastro/docs/issues?q=is:open+is:issue+label:%22help+wanted%22) and [`good first issue`](https://github.com/withastro/docs/issues?q=is:open+is:issue+label:%22good+first+issue%22)) for contributions we are actively seeking.
- **Look at our Existing Issues** (especially those labelled [`help wanted`](https://github.com/prosopo/docs/issues?q=is:open+is:issue+label:%22help+wanted%22) and [`good first issue`](https://github.com/prosopo/docs/issues?q=is:open+is:issue+label:%22good+first+issue%22)) for contributions we are actively seeking.

- **Review Existing PRs** (especially translations!) to help us get our fixes implemented live on the website sooner.

Expand Down Expand Up @@ -68,7 +68,7 @@ Larger contributions to the docs are encouraged after participating in Issues an

## Making a New Issue

If you're unsure which type of contribution best represents your concern, please [make a new issue](https://github.com/withastro/docs/issues/new)!
If you're unsure which type of contribution best represents your concern, please [make a new issue](https://github.com/prosopo/docs/issues/new)!

### Writing an Issue

Expand All @@ -80,7 +80,7 @@ Helpful issues usually include:

## Making PRs (pull requests)

> Need help making a PR? [Join us on Discord](https://astro.build/chat), we'll be more than glad to help you out!
> Need help making a PR? [Join us on Discord](https://discord.gg/3nMYAHecZT), we'll be more than glad to help you out!
Contributions to the documentation site are made by editing the docs repository. You can do this directly on GitHub.com or by creating a copy of the repository locally, making your changes there, and contributing back to our repository.

Expand Down Expand Up @@ -208,7 +208,7 @@ In the terminal on your computer:
## Next Steps

- [Read the docs](https://docs.astro.build/)
- [Fork the docs](https://github.com/withastro/docs/fork)
- [Raise an issue](https://github.com/withastro/docs/issues/new)
- [Fork the docs](https://github.com/prosopo/docs/fork)
- [Raise an issue](https://github.com/prosopo/docs/issues/new)
- [Discuss the docs](https://discord.gg/cZDZU3hJHc)
- [Visit the Astro Docs Docs to see even more documentation about contributing to Astro docs!](https://contribute.docs.astro.build)
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To all who come to this happy place: welcome.
This is the repo for [docs.astro.build](https://docs.astro.build/).
This repo contains all the source code we use to build our docs site.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/withastro/docs)
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/prosopo/docs)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/github/withastro/docs)
[![Open in Codeflow](https://developer.stackblitz.com/img/open_in_codeflow.svg)](https://pr.new/github.com/withastro/docs)

Expand All @@ -24,7 +24,7 @@ You being a part of our community is welcome.

## Chat with Us

You can learn more about Astro, get support, and meet other devs in [our Discord community](https://astro.build/chat).
You can learn more about Astro, get support, and meet other devs in [our Discord community](https://discord.gg/3nMYAHecZT).

## Raise an Issue

Expand All @@ -34,7 +34,7 @@ Is something wrong?

Creating a new Issue puts a problem on our radar!

[See if your issue has already been reported](https://github.com/withastro/docs/issues), and if not, [create a new one](https://github.com/withastro/docs/issues/new/choose).
[See if your issue has already been reported](https://github.com/prosopo/docs/issues), and if not, [create a new one](https://github.com/prosopo/docs/issues/new/choose).

## Share an Idea

Expand All @@ -43,15 +43,15 @@ Want to share an idea with us?

Discussions are threads where you can offer feedback on things that might not exactly be problems to be fixed but are ideas to be explored.

[Join the Docs Discussions](https://github.com/withastro/docs/discussions) where we brainstorm, ask questions, share hopes and dreams...
[Join the Docs Discussions](https://github.com/prosopo/docs/discussions) where we brainstorm, ask questions, share hopes and dreams...

## Make a Fix or Contribution

Did you find a typo, a broken link, or another item with an obvious quick fix?

If you can see what the problem is, and you know how to fix it, then you can make a PR (pull request) with the change and contribute to the docs repo yourself.

> Want to make a larger contribution? Please see [CONTRIBUTING.md](https://github.com/withastro/docs/blob/main/CONTRIBUTING.md) first!
> Want to make a larger contribution? Please see [CONTRIBUTING.md](https://github.com/prosopo/docs/blob/main/CONTRIBUTING.md) first!
## Translate a Page

Expand All @@ -64,7 +64,7 @@ Check out the dedicated [i18n guide](https://contribute.docs.astro.build/guides/
## Next Steps

- [Read the docs](https://docs.astro.build/)
- [Raise an issue](https://github.com/withastro/docs/issues/new)
- [Participate in a discussion](https://github.com/withastro/docs/discussions)
- [Raise an issue](https://github.com/prosopo/docs/issues/new)
- [Participate in a discussion](https://github.com/prosopo/docs/discussions)
- [Join the #docs channel on Discord](https://discord.gg/cZDZU3hJHc)

48 changes: 37 additions & 11 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
import starlight from '@astrojs/starlight';
import { defineConfig, sharpImageService } from 'astro/config';
import { makeLocalesConfig } from './config/locales';
import { makeSidebar } from './config/sidebar';

import rehypeSlug from 'rehype-slug';
import remarkSmartypants from 'remark-smartypants';

import { sitemap } from './integrations/sitemap';
import { rehypeAutolink } from './plugins/rehype-autolink';
import { rehypeTasklistEnhancer } from './plugins/rehype-tasklist-enhancer';
import { remarkFallbackLang } from './plugins/remark-fallback-lang';
import { sitemap } from './integrations/sitemap';
import rehypeSlug from 'rehype-slug';
import remarkSmartypants from 'remark-smartypants';
import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind';
import json5Plugin from 'vite-plugin-json5'
import { builtinModules } from 'module';

/* 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}`;

const site = VERCEL_PREVIEW_SITE || 'https://docs.astro.build/';
const site = VERCEL_PREVIEW_SITE || 'https://docs.prosopo.io/';

const allExternal = [
...builtinModules,
...builtinModules.map((m) => `node:${m}`)
]

// https://astro.build/config
export default defineConfig({
site,

integrations: [
starlight({
title: 'Docs',
customCss: ['./src/styles/custom.css'],

customCss: ['./src/styles/custom.css', './src/styles/tailwind.css'],
components: {
EditLink: './src/components/starlight/EditLink.astro',
Head: './src/components/starlight/Head.astro',
Expand All @@ -41,14 +49,14 @@ export default defineConfig({
PageTitle: './src/components/starlight/PageTitle.astro',
},
editLink: {
baseUrl: 'https://github.com/withastro/docs/edit/main',
baseUrl: 'https://github.com/prosopo/docs/edit/main',
},
defaultLocale: 'en',
locales: makeLocalesConfig(),
sidebar: makeSidebar(),
social: {
github: 'https://github.com/withastro/astro',
discord: 'https://astro.build/chat',
github: 'https://github.com/prosopo/captcha',
discord: 'https://discord.gg/3nMYAHecZT',
},
pagefind: false,
head: [
Expand All @@ -63,7 +71,12 @@ export default defineConfig({
},
],
}),
tailwind({
// Disable the default base styles:
applyBaseStyles: false,
}),
sitemap(),

],
trailingSlash: 'always',
scopedStyleStrategy: 'where',
Expand Down Expand Up @@ -92,4 +105,17 @@ export default defineConfig({
contentCollectionCache: false,
directRenderScript: true,
},
vite: {

plugins: [json5Plugin()],
build: {
modulePreload: { polyfill: true },
rollupOptions: {
external: [
'fsevents',
...allExternal
],
}
}
}
});
2 changes: 1 addition & 1 deletion config/locales.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type starlight from '@astrojs/starlight';
import { normalizeLangTag } from '../src/i18n/bcp-normalize';
import languages, { rtlLanguages } from '../src/i18n/languages';
import type starlight from '@astrojs/starlight';

type StarlightLocalesConfig = NonNullable<Parameters<typeof starlight>[0]['locales']>;

Expand Down
7 changes: 4 additions & 3 deletions config/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type starlight from '@astrojs/starlight';
import { navTranslations } from '../src/i18n/util';
import { normalizeLangTag } from '../src/i18n/bcp-normalize';
import type { NavDict } from '../src/i18n/translation-checkers';
import { navTranslations } from '../src/i18n/util';
import type starlight from '@astrojs/starlight';

/** For an item in our sidebar, get translations of its label. */
function getTranslations(item: NavDict[number]): Record<string, string> | undefined {
Expand All @@ -22,7 +22,8 @@ type StarlightSidebarConfig = NonNullable<Parameters<typeof starlight>[0]['sideb

/** Generate a Starlight sidebar config object from our existing `nav.ts` files. */
export function makeSidebar(): StarlightSidebarConfig {
let currentSubGroup: Extract<StarlightSidebarConfig[number], { items: any }>;
// eslint-disable-next-line
let currentSubGroup: Extract<StarlightSidebarConfig[number], { items: any[] }>;
return navTranslations.en.reduce((sidebar, item) => {
if ('header' in item) {
const newGroup = {
Expand Down
4 changes: 2 additions & 2 deletions integrations/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AstroSitemap from '@astrojs/sitemap';
import type { AstroIntegration } from 'astro';
import { normalizeLangTag } from '../src/i18n/bcp-normalize';
import AstroSitemap from '@astrojs/sitemap';
import languages from '../src/i18n/languages';
import type { AstroIntegration } from 'astro';

const langTags = Object.keys(languages);

Expand Down
2 changes: 1 addition & 1 deletion lunaria/renderer.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineRendererConfig } from '@lunariajs/core';
import { TitleParagraph } from './components';
import { defineRendererConfig } from '@lunariajs/core';

export default defineRendererConfig({
slots: {
Expand Down
8 changes: 4 additions & 4 deletions old-translations/bg/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Бележка: някои функционалности (например: Fa

Всякакви видове хора с различни методи за обучение се ориентират към Astro. Независимо дали предпочитате по-теоретичен, или по-практически подход, ние се надяваме че ще намерите тази секция за полезна.

- Ако предпочитате да **учите чрез практика**, започнете с нашата [библиотека с примери](https://github.com/withastro/astro/tree/main/examples).
- Ако предпочитате да **учите чрез практика**, започнете с нашата [библиотека с примери](https://github.com/prosopo/captcha/tree/main/examples).
- Ако предпочитате да **учите концепции стъпка по стъпка**, започнете с нашите [базови концепции и гидове](/bg/core-concepts/project-structure/).

Като всяка непозната технология, Astro изисква известно време, за да се научи. Но с практика и малко търпение, ние сме сигурни, че _ще го схванете_ за нула време.
Expand All @@ -47,13 +47,13 @@ _Бележка: някои функционалности (например: Fa

Официалният източник за новини от екипа на Astro е Twitter акаунтът - [@astrodotbuild](https://twitter.com/astrodotbuild).

Публикуваме и съобщения относно нови версии в [нашия Discord сървър](https://astro.build/chat) в #announcements канала.
Публикуваме и съобщения относно нови версии в [нашия Discord сървър](https://discord.gg/3nMYAHecZT) в #announcements канала.

Не всяка нова версия на Astro заслужава собствен блог пост, но можете да намерите регистър на промените за всеки релийз в [`CHANGELOG.MD` файла, намиращ се в репото на Astro](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md).
Не всяка нова версия на Astro заслужава собствен блог пост, но можете да намерите регистър на промените за всеки релийз в [`CHANGELOG.MD` файла, намиращ се в репото на Astro](https://github.com/prosopo/captcha/blob/main/packages/astro/CHANGELOG.md).

## Нещо липсва?

Ако нещо липсва в документацията или намирате нещо за объркващо, моля [подайте го като issue за документацията](https://github.com/withastro/astro/issues/new/choose) с Вашите предложения за подобрение или пуснете tweet към [@astrodotbuild](https://twitter.com/astrodotbuild). Обичаме да чуваме от Вас!
Ако нещо липсва в документацията или намирате нещо за объркващо, моля [подайте го като issue за документацията](https://github.com/prosopo/captcha/issues/new/choose) с Вашите предложения за подобрение или пуснете tweet към [@astrodotbuild](https://twitter.com/astrodotbuild). Обичаме да чуваме от Вас!

## Credit

Expand Down
Loading

0 comments on commit e4d0b1c

Please sign in to comment.