* Change to import.meta.glob()
Change of plans—maintain parity with Snowpack and Vite because our Collections API will use a different interface
* Get basic pagination working
* Get params working
* Rename to import.meta.fetchContent
* Upgrade to fdir
* add dep domhandler imported in in src/build/static
* lint and jsDoc error
* move domhandler to devDep
* chore: add package lock
* escape string jsDoc
* chore: add astro dep in until prism import is refactored
* chore: add snowpack example package lock
Removing the dependency breaks the site as using Markdown creates an import to a builtin Astro component. So we need astro as a dep. Not sure why it was changed anyways.
* Parse inner JSX as Astro
This completes the compiler changes, updating the parser so that it parses inner "JSX" as Astro. It does this by finding the start and end of HTML tags and feeds that back into the parser.
The result is a structure like this:
```
{
type: 'MustacheTag',
expression: [
{
type: 'Expression',
codeStart: 'colors.map(color => (',
codeEnd: '}}'
children: [ {
type: 'Fragment',
children: [ {
type: 'Element',
name: 'div'
} ]
} ]
}
]
}
```
There is a new Node type, `Expression`. Note that `MustacheTag` remains in the tree, all it contains is an Expression though. I could spend some time trying to remove it, there's just a few places that expect it to exist.
* Update import to the transform
* Transform prism components into expressions
* Improve renderer types
Looking at the render code I noticed that the Component rendering is not typed. This adds that, might help prevent a bug in the future.
* Create the supported renderer type
* Add support for syntax highlighting of code blocks
* Escape usage of backtick strings
* Add workspace root for snowpack
* Use prismjs/components as an external module
* Add example blog
* Add author data
* Improve navigation
* Style nav
* Add friendly error message
* Throw error if import glob used for non-Markdown files
* Use import.meta.collection() API instead
* README fixes
* Compiler cleanup
This is general compiler cleanup, especially around the codegen part. Goals here were too:
1. Make it possible to compile HTML recursively (needed for future astro-in-expressions work) by moving that work into its own function.
1. Get rid of collectionItems and have compiling the HTML return just a source string.
Also not planned, this change gets rid of the different between components and pages. All Astro components compile to the same JavaScript.
* Remove unused node types
This adds astro/components/ and moves the Prism.astro component into there. So to use in a project you can do:
```html
---
import Prism from 'astro/components/Prism.astro';
---
<Prism lang="html" code={`<html> ... </html>`}
```
This improves the algorithm for searching for pages. It now works like:
1. If pathname ends with /
1. Look for PATHNAME/index.astro
1. Look for PATHNAME/index.md
1. else
1. Look for PATHNAME.astro
1. Look for PATHNAME.md
1. Look for PATHNAME/index.astro
1. 301
1. Look for PATHNAME/index.md
1. 301
1. 404
* Fix complex MDX parsing
This allows fully MDX support using the micromark MDX extension. One caveat is that if you do something like use the less than sign, you need to escape it because the parser expects these to be tags otherwise.
* Move micromark definition
* Add prism and skeleton www page
This adds a Prism plugin, a Prism component, and the skeleton of our www site (just for testing the Prism component at the moment).
* Remove debugging