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

[i18nIgnore] Add new subpage handling logic #2758

Merged
merged 6 commits into from
Feb 28, 2023

Conversation

yanthomasdev
Copy link
Member

What kind of changes does this PR include?

  • Changes to the docs site code

Description

Adds a new subpage handling logic to the sidebar, based on the frontmatter type field. I added two new types to make this work properly (install and error) to assure the main Install and Error pages are being properly highlighted.

Note: I found out the description field for the sharing-state translations was missing, so I added the original one in English to avoid errors for now. After the merge I will warn translators about this.

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Feb 28, 2023
@github-actions github-actions bot removed the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Feb 28, 2023
@delucis
Copy link
Member

delucis commented Feb 28, 2023

Reverted your changes and made a refactor with smaller scope. Thanks again for looking at this @Yan-Thomas, I’d love a double check that what I’ve done makes sense.

One thing that might still need doing is making sure all the non-English recipes have type: recipe and a description in frontmatter.

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Feb 28, 2023
Copy link
Member Author

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @delucis, I added the missing fields to translations and also found a small issue: when you're in an individual error page, the actual highlighted tab is "Learn". Added another comment to the specific code with more context and a possible fix.

@yanthomasdev
Copy link
Member Author

Thanks @delucis, this fixed the issue! Let me know when you think this is good to be merged into Sarah's PR.

@yanthomasdev yanthomasdev merged commit 126d6d3 into reorg-incl-recipes Feb 28, 2023
@yanthomasdev yanthomasdev deleted the yan/new-subpage-handler branch February 28, 2023 21:47
sarah11918 added a commit that referenced this pull request Mar 6, 2023
* initial sidebar reorg

* tutorials key

* new (hidden) recipes page

* move ui frameworks back to guides

* add astro syntax hidden page

* update recipes page

* create initial nanostores recipe page from sharing state

* Update pages for content collections

* falso -> false

* new captcha recipe pulled from endpoints

* add yaml support recipe

* move some component content out

* slimmed down components page

* some simplifying/editing edits to routing

* update links to astro-syntax

* attempt CI fail fixes

* nav.ts indentation?

* update CLI page and put in Learn menu

* more edits to CLI page intro for friendliness

* update i18n nav.ts for sidebar updates

* final nav.ts cleanup

* more user-friendly CLI intro

* even friendlier CLI!

* hack so CLI is in Learn category for sidebar highlighting

* some Components page tidying - slots!

* minor tidying of Astro syntax as a standalone page

* Highlight recipes when on a page in recipes folder

* Recipe components

* i18n(ja): Update nav.ts (#2693)

* move Routing and MD/MDX pages into guides

* rename new page Astro Template Syntax

* recipes folder

* Move fonts back to guides

* all recipes -> more recipes

* remove back button on recipe index

* Fix nav key type issue

* Move main recipes file to avoid `index.mdx`

* i18n(zh-cn): Update nav.ts based on reorg-incl-recipes (#2687)

* i18n(zh-cn): Update nav.ts

* i18n(zh-cn): Update nav.ts

* Update nav.ts

---------

Co-authored-by: Sarah Rainsberger <[email protected]>

* update of nav (#2725)

* kill nanostores, replace with orig sharing state

* add commented out original content back in to CLI

* Make logos optional in `<CardsNav>`

* Add optional `description` support to `<CardsNav>`

* Configure content collection schema for recipes (no tags yet)

* Add `type: recipe` to recipes & write missing descriptions

* Very basic `<RecipesNav>` — needs tag, i18n support & styling

* Replace `<RecipeBox>` with `<RecipesNav>`

* Fix es nav type error

* sharing state -> share state between islands

* Tweak card grid to work better for recipe cards

* Style description text in `<Card>`

* Remove unneeded styles in `<CMSGuidesNav>`

* Fix margins on `<RecipesNav>`

* Fix `<RecipesNav>` links & remove tags

* Add `<RecipeLayout>`

* move CLI Reference page back to reference, remove Learn cateogry

* add links back to recipes from original pages

* nit edits in integrations-guide

* links no longer notes; use emoji

* related recipes bold text instead of heading; might delete

* updated links to recipes - one line

* fix broken link, move recipe to proper page!

* Curated -> Official

* [i18nIgnore] Add new subpage handling logic (#2758)

* [i18nIgnore] Add new subpage handling logic

* Revert "[i18nIgnore] Add new subpage handling logic"

This reverts commit 5fce612.

* Refactor subpage highlighting logic

* Add missing frontmatter fields from translations

* Avoid using `import.meta.url`

---------

Co-authored-by: Chris Swithinbank <[email protected]>

* handle forms recipe + skeleton

* build forms with api routes - 3 steps, examples for 5 frameworks

* captcha we -> you and formatting

* incorporate changes from PR2404 into Astro Syntax

* incorporated changes from 2404 into Astro Components

* update code example to show an Astro component vs UI framework

* prereqs

* yaml -> vite or rollup

* Sarah edits to HTML forms - check carefully for still needs!

* tiny Sarah edits

* Dan's improved instructions

Co-authored-by: Dan Jutan <[email protected]>

* no typos under Yan's watch!

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

* removing inelegance!

Co-authored-by: Dan Jutan <[email protected]>

* Update src/content/docs/en/recipes/build-forms.mdx

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

* Delete clipboard-check.svg

* Remove duplicate nav entry

* tweak order of guides

* nod to script and style tags in components, removed dup from script page

* remove forms recipes

* Update PT-BR `nav.ts` file

* nav tweaks esp routing

* bye bye, "sits the template"

* Use translations correct in `<RecipesNav>`

* Add `lang="en"` to English fallback content in `<RecipesNav>`

* Update PT-BR `rss.mdx` description

* Also update the PT-BR `title` prop!

---------

Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Shinya Fujino <[email protected]>
Co-authored-by: Dan Jutan <[email protected]>
Co-authored-by: 李瑞丰 <[email protected]>
Co-authored-by: Paul Valladares <[email protected]>
Co-authored-by: Yan Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants