Juan Martín Seery
ca45c0c270
fix: don't throw when Shiki doesn't recognize a language ( #3911 )
...
* Don't throw when Shiki doesn't recognise a language
* Changeset
2022-07-13 19:31:59 +00:00
Nate Moore
93e1020b1e
Fix: reintroduce smoke tests across example projects ( #3669 )
...
* chore: update smoke tests
* chore: bump smoke tests to node@16
* chore: remove gitmodules
* chore(ci): prefer node@14
* wip: remove path from smoke clone step
* feat: run build:examples from test:smoke
* fix: remove no-frozen-lockfile
* fix: checkout monorepo last for pnpm setup
* wip: replace @astrojs/markdown/remark import from md
* fix: remove type defs from generated file
* fix: function order
* chore: remove ssr-utils export
* wip: remove windows from smoke test
* fix: instantiate slugger in snippet
* fix: exclude with-mdx from smoke (for now)
* fix: add quotes on filter flag for safety
* chore: changeset
* wip: try reintroducing windows smoke
* sad chore: remove client: directive from with-mdx
* Revert "wip: try reintroducing windows smoke"
This reverts commit 9529b1a45c
.
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-07-11 22:51:17 -04:00
Tony Sullivan
b8c6dabfb7
Enables eslint on the full repo and adds a rule for no only()
tests ( #3659 )
...
* enabling eslint on the all packages and tests
* enabling for all packages
* TEMP: adding an only() test to verify it fails CI
* using our eslint config and ignore in CI
* removing the temporary .only() test
* update lock file
* lint: fixing new test with a no-shadow warning
* chore: update lock file
2022-06-22 15:59:49 +00:00
Tony Sullivan
48e67fe053
Encode ampersands in markdown code blocks ( #3630 )
...
* encode ampersands in markdown code blocks
* chore: add changeset
* nit: fixing test case description
2022-06-20 19:09:35 +00:00
tony-sull
9502fbf4a9
[ci] format
2022-06-20 17:14:08 +00:00
Tony Sullivan
80c71c7c56
Fixes rendering of HTML comments inside markdown code blocks ( #3638 )
...
* JS comment wrappers should be removed from HTML comments in code blocks
* chore: add changeset
2022-06-20 17:12:42 +00:00
hippotastic
05aa72442c
Remove extra newlines around Markdown components ( #3620 )
2022-06-17 11:52:37 -05:00
Ben Holmes
fca58cfd91
Fix: Netlify edge deployment when using markdown ( #3612 )
...
* wip: revert sitemap PR
* fix: extract SSR-ready "slug" helper to separate module
* Un-revert sitemap PR. Not to blame!
This reverts commit 7cd2a8a5ea
.
* fix: use .netlify for edge deployment test
* refactor: add md file to edge function fixture
* fix: add netlify edge tests to ci
* chore: remove stray console log
* wip: undo "dist" change on edge tests
* chore: changeset
* Revert "wip: undo "dist" change on edge tests"
This reverts commit 70e565ef06
.
* temp: add ignore to breaking edge tests
2022-06-16 20:31:08 -04:00
Matthew Phillips
fc52321a88
Consolidate hydration scripts into just one ( #3571 )
...
* Remove redundant hydration scripts
* Prebuild the island JS
* Fix build
* Updates to tests
* Update more references
* Custom element test now has two classic scripts
* Account for non-default exports
* Restructure hydration directives
* Move nested logic into the island component
* Remove try/catch
2022-06-15 08:50:05 -04:00
hippotastic
5c73f614e8
Fix remarkMdxish performance issue on huge sites ( #3572 )
2022-06-10 17:32:23 -05:00
natemoo-re
4eb39d57b9
[ci] format
2022-06-10 03:33:13 +00:00
hippotastic
76fb01cff1
Fix autolinking of URLs inside links in Markdown ( #3564 )
2022-06-09 22:31:36 -05:00
natemoo-re
c15e7ebc5e
[ci] format
2022-06-08 17:43:10 +00:00
hippotastic
c549f161ca
Allow AlpineJS syntax extensions in Markdown ( #3554 )
...
* Allow AlpineJS syntax extensions in Markdown
* Remove unwanted MDX ESM import/export support
2022-06-08 12:41:36 -05:00
FredKSchott
f0f6a3332f
[ci] format
2022-06-06 16:49:53 +00:00
natemoo-re
ae14595407
[ci] format
2022-06-03 13:39:43 +00:00
hippotastic
6c955ca643
Fix Markdown errors missing source filename ( #3514 )
2022-06-03 08:38:57 -05:00
hippotastic
3057801591
Fix: Allow self-closing tags in Markdown ( #3516 )
2022-06-03 08:38:45 -05:00
nokazn
939fe15925
Fix cases for JSX-like expressions in code blocks of headings ( #3502 )
...
* chore: fix typo in remark tests
* test: add test cases for markdown expressions in header
* fix: avoid evaluating JSX-like expressions inside inline code in heading
* fix: generate slug for id including values in backtick blocks
2022-06-03 08:26:39 -04:00
natemoo-re
9a31e6f1d5
[ci] format
2022-05-31 17:17:36 +00:00
hippotastic
119ecf8d46
Fix components in markdown regressions ( #3486 )
...
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-05-31 12:16:43 -05:00
natemoo-re
cb039219ef
[ci] format
2022-05-24 22:03:29 +00:00
Nate Moore
cfae9760b2
Improve Markdown + Components usage ( #3410 )
...
* feat: use internal MDX tooling for markdown + components
* fix: improve MD + component tests
* chore: add changeset
* fix: make tsc happy
* fix(#3319 ): add regression test for component children
* fix(markdown): support HTML comments in markdown
* fix(#2474 ): ensure namespaced components are properly handled in markdown pages
* fix(#3220 ): ensure html in markdown pages does not have extra surrounding space
* fix(#3264 ): ensure that remark files pass in file information
* fix(#3254 ): enable experimentalStaticExtraction for `.md` pages
* fix: revert parsing change
* fix: remove `markdown.mode` option
2022-05-24 17:02:11 -05:00
Matthew Phillips
8f8f05c1b9
Revert "Consolidate inline hydration scripts into one ( #3244 )" ( #3275 )
...
* Revert "Consolidate inline hydration scripts into one (#3244 )"
This reverts commit 48a35e6042
.
* Fix types
* Adds changeset
2022-05-03 15:18:17 -04:00
Matthew Phillips
48a35e6042
Consolidate inline hydration scripts into one ( #3244 )
...
* Consolidate inline hydration scripts into one
* Adds changeset
* Update custom element test
* Provide a better name for tracking if we have added a hydration script
2022-05-03 09:07:16 -04:00
Juan Martín Seery
de123b28b3
refactor(markdown): removed rehype-slug
in favor of our own implementation ( #3234 )
...
* Moved types arround
* Removed `rehype-slug` in favor of our own implementation
* Changeset
* Removed rehype-slug from examples
* Remove rehype-slug from tests
* Updated reference
* rehypeCollectHeaders is a function again
* Reverted rehype-slug removes
* Re-added rehype-slug to reference
2022-04-29 21:07:09 -03:00
Ben Holmes
9ba1f4f825
Fix: markdown JSX expression inconsistencies ( #3152 )
...
* fix: remove micromark-extension-mdx-expression to unbreak JSX expressions
* chore: changeset
* deps: update lockfile
* tests: jsx expressions in markdown
2022-04-19 16:37:11 -04:00
Fred K. Schott
ef198ff835
handle diff symbols in shiki ( #3108 )
...
* handle diff symbols in shiki
* Create violet-cups-glow.md
2022-04-18 22:36:42 -07:00
Juan Martín Seery
b835e285de
feat: markdown config typechecking ( #2970 )
...
* Added schemas to markdown plugin
* Added new schemas to main package
* Changesets
* typeraw
* Explaination about the weird type hack
* Added markdown.mode to config
* Added comment
* Formatted
* Moved validation to `astro` and added RemarkPlugin ad RehypePlugin
* Removed the ability to have a custom markdown renderer internally
* Fixed plugin type
* Removed unused renderMarkdownWithFrontmatter
* Added missing dependency
* Dynamically import astro markdown
* Cache import
2022-04-11 16:01:12 -07:00
Juan Martín Seery
ad3c391696
fix(markdown): escape when mode == 'md' ( #2971 )
...
* Fix rehype escape
* Changeset
2022-04-03 14:32:12 -03:00
Fred K. Schott
1335797903
update prettier width ( #2968 )
2022-04-02 14:15:41 -06:00
Nate Moore
17c02925c5
Migrate to new config ( #2962 )
...
* wip: config migration
* fix: formatting
* refactor: projectRoot -> root
* refactor: pageUrlFormat -> format
* refactor: buildOptions.site -> site
* refactor: public -> publicDir
* refactor: dist -> outDir
* refactor: styleOptions -> style
* fix: some dist tests -> outDir
* refactor: remove legacyBuild (with TODOs)
* refactor: more legacyBuild cleanup
* refactor: server host and port
* fix: remove experimentalStaticBuild CLI flag
* refactor: src -> srcDir
* refactor: devOptions.trailing -> trailing
* refactor: remove sitemap + related flags
* refactor: experimentalSSR -> experimental.ssr
* fix: last devOptions
* refactor: drafts -> markdown.drafts
* fix: TS error on port as const
* refactor: remove pages
* refactor: more --project-root updates
* refactor: markdownOptions -> markdown
* fix: remaining type errors
* feat: update AstroUserConfig
* refactor: update CLI flag mapper + server mapper
* fix: loadFixture projectRoot
* fix: merge CLI flags before validating / transforming
* wip: attempt to fix bad createRouteManifest config
* refactor: combine config.base and config.site
* fix: skip route manifest test for now
* fix: site and base handling
* refactor: update failing config testes
* fix: build failure
* feat: update config types with migration help
* chore: update types
* fix(deno): update deno fixture
* chore: remove config migration logic
* chore: remove logLevel
* chore: clean-up config types
* chore: update config warning
* chore: add changeset
* Sitemap Integration (#2965 )
* feat: add sitemap filter config option
* feat: add canonicalURL sitemap config option
* docs: update sitemap README
* fix: update for new config
* fix: filter not being applied
* chore: changeset
Co-authored-by: bholmesdev <hey@bholmes.dev>
* fred pass
* fix: Astro.resolve typo
* fix: public => publicDir
Co-authored-by: bholmesdev <hey@bholmes.dev>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-04-02 12:29:59 -06:00
Ben Holmes
046bf7281f
refactor: move Prism comp to default exp ( #2887 )
2022-03-25 17:13:28 -04:00
Fred K. Schott
d763ec183e
fix shiki perf issue ( #2870 )
2022-03-24 09:49:54 -07: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
Nate Moore
d08ddaf5b9
Move from yarn to pnpm ( #2455 )
...
* chore: `yarn` => `pnpm`
* docs: `yarn` => `pnpm`
* chore(ci): yarn => pnpm
* chore(ci): update pnpm cache path
* fix: add missing deps
* fix: add missing deps
* test: add package.json to all test fixtures
* chore: improve hoisting behavior
* chore: move turbo into package.json
* chore: update npmrc
* fix: add missing `debug` dependency
* chore: remove prepare script
* test: fix new tests
* fix: fully resolve renderer paths and `astro/internal` path
* chore: update lockfile
* chore: remove log
* fix: resolve renderers in vite-plugin-jsx
* fix: prefer public-hoist-pattern to shamefully-hoist
* chore: ignore @babel/core peer warning
* chore: update dependencies
* test: add autoprefixer as explicit dep
* chore: update `.npmrc` file in examples
* chore: update dependencies
* fix: resolve renderer dependencies in static build
* fix: static build renderer resolution
* chore: fix smoke tests
* chore: hoist autoprefixer
* chore: update lockfile
* attempt: use full file:// path on Windows
* attempt: use astro/internal
* attempt: optimize astro/internal
* attempt: expose ./internal.js
* chore: add missing package.json files
* attempt: resolve astro/internal path
* chore: tidy package.json
* chore: update lockfile
* chore: update deps
* chore: update deps
* chore: yarn -> pnpm
* attempt: explicit /@fs urls
* attempt: explicit /@fs urls
* chore: update all examples for pnpm
* chore: fix hoisting for with-vite-plugin-pwa
* chore(ci): fix sharp install
* chore: update with-vite-plugin-pwa example
* fix: pin vite-plugin-pwa to 0.11.11
* fix: add workbox-window to vite-plugin-pwa deps
* refactor: use pnpm update --recursive
Co-authored-by: JuanM04 <me@juanm04.com>
* chore: yarn => pnpm
* chore: yarn => pnpm
* fix: update smoke test to skip examples which don't work in static build
* update lockfile
* chore: update .npmrc files
* chore: update lockfile
* fix: smoke script
* chore: update .npmrc file
* fix: return to shamefully-hoist (shamefully)
* chore: update lockfile
* fix(smoke): ignore scripts for smoke tests
* fix: update example to disable renderers
* chore: bump version
* chore(ci): fix smoke tests
* attempt: disable --frozen-lockfile for smoke tests
* chore: update smoke test
* chore: fix rebase issue
* chore: update lockfile
* fix: smoke tests
* fix(ci): run external smoke tests first
* fix(ci): run syntax
* chore: update lockfile
* fix(ci): ensure submodules are up-to-date
* fix(ci): ensure submodules are up-to-date
* chore: update lockfile
* chore: update for webapi
* chore: silence node:* warnings
* chore: update deps
* fix(ci): persist generated webapi assets
* fix(ci): webapi build script
* chore(ci): remove custom node caching
* chore: keep turbo.json
* chore: update turbo, ignore create-astro
* chore: update deps
* fix(ci): test command
* chore(ci): update test script
Co-authored-by: JuanM04 <me@juanm04.com>
2022-03-08 15:46:11 -06:00
Juan Martín Seery
b2c37385f9
chore: changed data-astro-raw
to is:raw
( #2706 )
...
* chore: changed `data-astro-raw` to `is:raw`
* changesets
2022-03-03 11:34:36 -06:00
Fred K. Schott
91765d79b1
Improve build perf ( #2697 )
...
* improve md perf
* chore: add changesets
Co-authored-by: Nate Moore <nate@skypack.dev>
2022-03-02 16:09:18 -06:00
Juan Martín Seery
9b7e2ab251
Fixed shiki import to work with "type": "module" ( #2628 )
...
* Fixed shiki import to work with "type": "module"
* Changeset
* Separated types import
* Add "* as" to type import
2022-02-22 08:46:04 -08:00
Juan Martín Seery
f0952a8e5b
fix: curly braces inside Shiki ( #2545 )
2022-02-08 00:48:00 -05:00
Juan Martín Seery
2bc91543ce
feat: Added the ability to add custom themes/languages to Shiki ( #2518 )
...
* Replaced `shikiTheme` with `shikiConfig`
* Code.astro now accepts custom themes/langs
* Updated docs
* Updated tests
* Fixed language loading
* Added customization examples
* Updated documentation
* Added more tests
* Changelogs
* Changed some spaces to tabs
* Fixed typo in changesets
* Moved tests fixtures
* Rolled back changes to with-markdown-shiki
* Removed lang example in docs
* Optimized Code component
* Try to fix windows errors
* Try to see if this new tests work
2022-02-07 08:31:02 -08:00
Juan Martín Seery
cfeaa9414a
fix: import local plugins into markdown ( #2534 )
...
* Replaced "UnifiedPluginImport" for a function
* Updated tests
* Updated docs
* Updated examples
* Added changeset
* Fixed tests
* Removed unused "UnifiedPluginImport"
* Duplicated add-classes.mjs
2022-02-04 13:49:50 -05:00
Juan Martín Seery
6fe1b0279f
Add Shiki as an alternative to Prism ( #2497 )
...
* [ci] yarn format
* Added shiki to markdown-remark
* Upgraded astro shiki
* Added minimal example
* Changed defaults to match <Code />
* Replace `shiki` with `astro` classes
* Added documentation
* Updated Astro code to use new `codeToHtml`
* Added changesets
* Added basic test
* Updated tests a bit
Co-authored-by: JuanM04 <JuanM04@users.noreply.github.com>
2022-01-31 16:14:07 -06:00
Jonathan Neal
6ddd7678ff
Use accessible indentation ( #2253 )
2021-12-22 16:11:05 -05:00
Jonathan Neal
6570a20442
rebase ( #2087 )
2021-12-13 16:18:21 -05:00
JuanM04
679d4395ec
Markdown package improvements ( #1954 )
...
* Re-add smartypants
* Updated packages
* Remove all the default plugins if there are either remark or rehype plugins
* Replace deperecated remark-slug with rehype-slug
* Added MarkdownParserResponse type
* Update documentation
* Removed type import from markdown package
* Updated remark-smartypants
* Changelog
* Missed one change
* Split changelogs
* Upgraded some MDX dependencies
* Fix typos in documentation
* Changed CHANGELOG.md package name
* Renamed smartypants
2021-11-22 14:48:00 -06:00
Nate Moore
7eaabbb0e1
Markdown bug bash! ( #1789 )
2021-11-10 17:34:31 -06:00
natemoo-re
a5c6f922fa
[ci] yarn format
2021-10-29 19:47:01 +00:00
Nate Moore
34e03cf912
do not format vite ( #1710 )
...
* Revert "[ci] yarn format"
This reverts commit 93489946cc
.
* chore: ignore vendor
2021-10-29 14:45:32 -05:00
matthewp
93489946cc
[ci] yarn format
2021-10-29 19:31:54 +00:00