Commit graph

82 commits

Author SHA1 Message Date
Rychart Redwerkz
9bb0bfab13
Fix edit this Page on examples/docs (#6028)
* 🐛 Fix path from `pages` to `content/docs`

* 🐛 Fix path from `pages` to `content/docs`
2023-01-30 09:48:57 -05:00
Ben Holmes
7d72aeeae8
Migrate blog and docs starters to content collections (#5858)
* docs: update README for `content/`

* chore: update env

* feat: update blog to use content collections

* chore: remove with-content starter

* fix: single quotes -> double

* feat: update docs starter to content collections

* refactor: config -> consts

* chore: import type

* edit: Astro will -> Use

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* chore: remove unused null check

* nit: spacing

* nit: `as Props` 1

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* nit: `as Props` 2

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* chore: consistent CONSTS usage

* chore: `type` imports at top

* chore: consistent quote usage on YAML

* chore: remove `as Props` from docs

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-18 08:43:58 -05:00
Bjorn Lu
2000f5fb1e
Update blog example env name (#5877) 2023-01-17 23:12:26 +08:00
bluwy
a673239548 [ci] format 2023-01-09 07:27:31 +00:00
Rishi Raj Jain
fcfd166f2d
fix: Docs Site - Table of contents highlight not working (#5411)
* fix: Docs Site - Table of contents highlight not working

* Add html-escaper devDep

* add html-escaper via pnpm
2022-11-17 10:48:57 -05:00
李瑞丰
66992ed700
fix(template): delete extra css. (#5403) 2022-11-15 15:19:04 +08:00
Princesseuh
dcdeca56ac [ci] format 2022-11-08 18:39:22 +00:00
Antony R Mott
9d4716f5ad
fix KNOWN_LANGUAGES option child element (#5118) 2022-10-19 14:48:00 +08:00
Sujaykumar
bf01c8bf67
Fix missing image src in config for examples docs (#5109) 2022-10-17 22:29:53 +08:00
matthewp
b3c857adbd [ci] format 2022-09-29 12:16:35 +00:00
Rishi Raj Jain
d8e796e960
fix trailing slash mismatch in dev vs build in docs example (#4912) 2022-09-29 08:15:00 -04:00
Halí V
6506e84ccf
fix: add unique key to elements in map (#4607) 2022-09-06 08:49:51 -04:00
Jutanium
b5f3c0d735 [ci] format 2022-08-31 20:20:16 +00:00
Dan Jutan
d5bd23d5f4
Update templates to avoid devDependencies and :global (#4576)
* devDependencies => dependencies

* :global -> is:global

* update lockfile

* remove unneeded markdown dependency

* fix remaining merge conflicts

* update lockfile
2022-08-31 16:17:15 -04:00
Dan Jutan
23d4f80145
Revert "Update templates to avoid devDependencies and :global (#4544)" (#4575)
This reverts commit ca2d0728e4.
2022-08-31 15:27:36 -04:00
Dan Jutan
ca2d0728e4
Update templates to avoid devDependencies and :global (#4544)
* devDependencies => dependencies

* :global -> is:global

* update lockfile

* remove unneeded markdown dependency
2022-08-31 19:18:53 +00:00
Julius Marminge
feb88afb8c
fix: improve docs example (#4355)
* fix: improve docs example

* final touches

* chore: prettier

* lockfile

* ci?

* downgrade types node

* fresh lockfile

* lockfile and npmrc

* remove debug log

* Merge branch 'main' into docs-template-ts

* merging lockfiles suck

* update lockfile

* satisfy linter
2022-08-29 12:00:08 -04:00
Vincent Uden
2615042923
Fix typo in the docs example (#4382) 2022-08-19 16:06:53 +08:00
Nate Moore
41b81d0d7e
Switch examples favicon to use svg (#4331)
* chore(examples): switch favicon to svg

* chore: astro.svg => favicon.svg

* Update examples/basics/README.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2022-08-17 15:19:04 -05:00
bholmesdev
d4b06f9d8e [ci] format 2022-08-12 22:48:10 +00:00
Ben Holmes
5fe46d946a
fix: content -> frontmatter, content.headings -> headings (#4294) 2022-08-12 18:46:26 -04:00
Nate Moore
f207c417e0
Add Astro.generator (#4012)
* feat: add generator property and component

* chore: remove `Generator` component

* chore: update generator description

* chore: include generator in examples

* chore: update lockfile

* chore: format

* fix: do not reference core from server runtime

* chore: remove component test

Co-authored-by: Nate Moore <nate@astro.build>
2022-08-08 12:34:05 -05:00
FredKSchott
4de35f3b70 [ci] format 2022-08-06 04:39:26 +00:00
Erika
c9b679e56e
Move types to a .d.ts file inside examples projects (#4171)
* Move types to a .d.ts file to avoid making types explicit

* Rename to proper types

* Move to proper place

* Add noEmit to tsconfig.json

* Add back removed code by accident
2022-08-05 17:46:52 -04:00
Ben Holmes
471c6f784e
[markdown] Harder, better, faster, stronger vite-plugin-markdown (#4137)
* refactor: vite-plugin-md -> vite-plugin-md-legacy

* wip: add vite-plugin-md

* feat: always apply jsx renderer

* fix: markHTMLString on VNode result

* feat: apply new vite-plugin-markdown!

* fix: add meta export to md

* fix: remove needless $$metadata export

* fix: toggle to legacy plugin on flag

* fix: pass fileId to renderMarkdown

* test: raw and compiled content on plain md

* fix: escape vite env refs

* refactor: astro-md -> legacy-astro-flavored-md, astro-md-mode -> astro-markdown

* fix: import.meta.env refs with tests

* fix: add pkg.json to clientAddress

* fix: prefer JSX integration over Astro runtime

* Revert "fix: prefer JSX integration over Astro runtime"

This reverts commit 3e5fa49344be9c857393da9af095faab152e92e1.

* fix: remove .mdx check on importSource

* chore: changeset

* chore: remove TODO

* fix: add back getHeadings

* fix: add pkg.json to astro-head fixture

* fix: default to Astro renderer for MDX and MD

* feat: add "headings" and "frontmatter" to md layouts

* refactor: remove legacy flag conditionals from legacy plugin

* fix: add back MDX warning when legacy is off

* test: getHeadings() glob

* fix: add error on "astro.headings" access

* feat: update docs example astro.headings => headings

* refactor: readFile as string w/ utf-8

* chore: remove astro metadata TODO

* refactor: stringify HTML once

* fix: add pkg.json to glob-pages-css
2022-08-05 15:43:50 -04:00
Erika
f591150512
Audit examples templates (#3940)
* basics, framework-alpine, framework-solid, delete unused examples

* framework-multiple

* Remove non-standard file extensions, add missing .vscode folders

* Remove robots.txt

* Remove blog-multiple-authors

* Rewrite components comments to be consistent

* Update lockfile

* Remove unnecessary usage of SCSS in subpath example

* Fix props weirdness in portfolio example

* Remove Lit from `framework-multiple` for now

* Misc fixes

* Update lockfile

* I'm in lockfile hell, send help
2022-08-04 14:16:51 -04:00
natemoo-re
8c08181822 [ci] format 2022-07-23 22:25:44 +00:00
Nate Moore
6e27a5fdc2
Rename Markdown util getHeaders() to getHeadings() (#4031)
* Renamed getHeaders() to getHeadings(), according to RFC #208.

* chore: update changeset

* fix: expose MarkdownHeading type from `astro`

Co-authored-by: Félix Sanz <me@felixsanz.com>
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-23 17:23:15 -05:00
Fred K. Schott
ddefb172f6
Replace/Rename Astro.canonicalURL with new Astro.url helper (#3959)
* add Astro.url

* Add examples of how to create the canonicalURL

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-07-21 13:45:59 -04:00
Marcus Otterström
59e8c71786
Format astro files in examples (#3862) 2022-07-08 22:08:32 +02:00
matthewp
29e7260a4e [ci] format 2022-05-12 20:21:02 +00:00
Rafid Muhymin Wafi
17da2b1611
Fixed search bar of the docs example not working (#3247)
* fixed search bar not working

* fixed search bar not working during build

* fix search bar throwing error on production site
2022-05-12 14:20:20 -06:00
Tony Sullivan
be899fdd1a
Fixing mobile header for docs example (#3335) 2022-05-10 21:59:56 +00:00
Juan Martín Seery
dc6e89f0a3
chore: updated examples to v0.26.0 (#2977)
* New script behavior

* Astro.request

* Reverted `deno` to `node`

* Updated subpath
2022-04-03 14:02:57 -05:00
Fred K. Schott
1335797903
update prettier width (#2968) 2022-04-02 14:15:41 -06:00
Matthew Phillips
ecc6a4833f
Implement the Astro.request RFC (#2913)
* Implement the Astro.request RFC

* Disable console warnings eslint

* Use our logger

* Adds a changeset

* Fix tests that depend on params, canonicalURL, URL

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-29 07:35:03 -04:00
Ben Holmes
0a3d3e51a6
Feat: change to shiki default md renderer (#2824)
* feat: change Shiki to default

* refactor: update blog styles for shiki

* feat: update examples/docs styles for Shiki

* refactor: remove Prism-ish examples/docs styles

* refactor: simplify rules with `all: unset`

* refactor: remove Prism styles

* refactor: examples/with-md remove Prism-specific line-highlight

* chore: add changeset

* chore: update changeset versions

* refactor: update syntax highlight test for scoped styles

* fix: apply scoped style class to pre and span lines

* feat: test that scoped styles cascade to shiki code

* refactor: pass scopedClassName explicitly
2022-03-18 17:29:51 -04:00
Tony Sullivan
4b53a53c1b
Update examples for 0.24.0 (#2740)
* removing Astro.resolve, adding sass dev dependencies

* updating tailwind example to use ESM style imports

* moving from `<style global>@import` to ESM imports

* updating lockfile to pick up examples sass deps

* chore(lint): ESLint fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-09 13:52:31 -08:00
Nate Moore
72c2c86e9d
merge next into main (#2705)
* Unflag the static build (#2652)

* Unflag the static build

* Only set legacyBuild to false if experimentalSSR is true

* Use legacy build when we have to

* Put a few more tests into legacy mode

* Last two

* Make astro-basic use the legacy build

* Adds a changeset

* Mark the lit test as legacy

* Update yarn lock

* Update based on feedback

* Add --legacy-build flag

* Move astro-basic test to use static build (#2682)

* Move some tests over to the static build (#2677)

* Move some tests over to the static build

* Fix assets tests

* Fix the assets tests

* Fix for the client:only components

* Moves asset tests to the static build

* Move postcss test over to static build

* Bring back legacy build for astro-basic test

* Move astro-basic test to use static build

* Migrate more tests to the static build (#2693)

* fix: disable HMR during build (#2684)

* Migrate more tests to the static build

* Only prepend links in non-legacy mode

* Add the 0-css tests

* Convert all CSS tests to the static build

* Migrate Astro global tests

* Remove .only

* Fix static build tests

* Migrate a few more

* More tests

* Move the lit test back to legacy

* Increase the test timeout

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Improve `head` injection behavior (#2436)

* feat: add renderHead util to server

* feat: remove `layouts` from config, Vite plugin

* fix: improve head injection during rendering

* chore: update compiler

* fix: do not escape links

* chore: enter `pre` mode

* Replace `send` with `sirv` (#2713)

* remove send

* Create thick-ravens-chew.md

* I feel like I'm going to screw something up

* working finally!

* rewrite req.url

* Add tiny bit of doc

* Update .gitignore

Co-authored-by: Evan Boehs <evan@boehs.org>

* Move remaining tests to the static build (#2712)

* Move lit test to the static build

* Migrate astro-env plugin to work in the static build

* Do not remove vite:define

* Adds a changeset

* Add a warning when passing the --experimental-static-build flag (#2718)

* Add a warning when passing the --experimental-static-build flag

* Disable the lint warning

* [ci] release (next) (#2721)

* [ci] release (next)

* chore: update changeset

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>

* 404 page (#2719)

* Fix: build to 404.html in the static build

* Adds a changeset

* fix pnpm install missing peer deps

* fix svelte version in workspace

* fix lockfile

* fix(webapi): add dev script

* improve preview reliability (#2739)

* improve preview reliability - fix broken tests

* shamefully hoist to unblock

* remove lit from test running

* chore: update lockfile

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Evan Boehs <evan@boehs.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-09 15:44:26 -06:00
Jang Rush
9757cd869b
Use CONFIG.SITE.title for h1 in doc theme header (#2449)
Use SITE.title specified in config.ts as the h1 heading in Header.astro
of doc theme.
When SITE.title is null, use "Documentation" as the fallback value.
Previously the h1 heading in doc theme header is hardcoded
as "Documentation".
2022-01-24 10:35:19 -05:00
Jang Rush
20dc304172
Allow not specfying section header in sidebar. (#2448)
Someone may forget to specify a section header in SIDEBAR,
which would cause build error previously.
2022-01-24 10:33:56 -05:00
Chris Swithinbank
9deada68b4
Fix visibility of focused skip link on docs site (#2405)
* Fix visibility of focused skip link on docs site

The `sr-only` utility class used on the “Skip to Content” link at the top of each page in the docs is designed to be paired with the `focus:not-sr-only` class. `focus:not-sr-only` was missing on the skip link, meaning it was never shown even when focused.

* Fix visibility of focused skip link in docs example project

Apply the same fix as ac890b56 to the same component in the docs starter project.
2022-01-19 15:22:40 -05:00
Matthew Phillips
bcc617f9dc
Update examples to move away from Astro.resolve on styles (#2393)
* Update examples to move away from Astro.resolve on styles

* Prepend the subpath

* Adds a changeset

* Switch to @import for the starter
2022-01-18 08:34:12 -05:00
Matthew Phillips
92532b8882
Fixes for blog and docs examples (#2373)
* Fixes for blog and docs examples

* Adds a changeset

* Upgrade the compiler version

* Use a global style tag

* Skip on windows temporarily
2022-01-14 12:11:56 -05:00
Jonathan Neal
6ddd7678ff
Use accessible indentation (#2253) 2021-12-22 16:11:05 -05:00
Fred K. Schott
8d934059f8
move styles to src (#2003) 2021-11-24 11:10:12 -08:00
Fred K. Schott
7476a92461
update repo URL (#1994) 2021-11-23 14:47:05 -08:00
matthewp
ed3cfe230b [ci] yarn format 2021-11-03 16:29:53 +00:00
Rafid Muhymin Wafi
16e3aa8ee0
children error fix (#1734) 2021-11-03 12:28:41 -04:00
natemoo-re
a5c6f922fa [ci] yarn format 2021-10-29 19:47:01 +00:00