Skip to content

Commit

Permalink
chore: try cloudflare-pages again
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Nov 11, 2024
1 parent ccd231e commit b655e4c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
9 changes: 3 additions & 6 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ import tailwindcss from 'tailwindcss'
import { config } from 'vinxi/plugins/config'

export default defineConfig({
appRoot: 'src',
islands: false,
server: {
compatibilityDate: '2024-11-11',
preset: 'cloudflare-pages',
sourceMap: 'inline',
rollupConfig: {
external: ['__STATIC_CONTENT_MANIFEST', 'node:async_hooks']
external: ['node:async_hooks']
}
// prerender: {
// crawlLinks: true
// }
},
vite: {
optimizeDeps: {
entries: []
},
plugins: [
config('tailwind', {
css: {
Expand Down
30 changes: 15 additions & 15 deletions src/routes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ function Stats(props) {
)
}

const readmeData = query(async () => {
'use server'
const readmeFile = await graphql(fileQuery.gql(), {
repository: '.github',
path: 'README.md',
...fileQuery.vars
})
return bodyParser(readmeFile.repository.object.text)
}, 'readmeData')
// const readmeData = query(async () => {
// 'use server'
// const readmeFile = await graphql(fileQuery.gql(), {
// repository: '.github',
// path: 'README.md',
// ...fileQuery.vars
// })
// return bodyParser(readmeFile.repository.object.text)
// }, 'readmeData')

const organizationData = query(async () => {
return graphql(organizationQuery.gql, organizationQuery.vars)
Expand All @@ -190,24 +190,24 @@ const eventsData = query(async () => {
}, 'eventsData')

export const route = {
load: () => [eventsData(), readmeData(), organizationData()]
preload: () => organizationData()
}

export default function App() {
const events = createAsync(eventsData)
const readme = createAsync(readmeData)
// const readme = createAsync(readmeData)
const organization = createAsync(organizationData)

return (
<>
<Container class="mt-9">
<div class="max-w-2xl">
<H1>{organization()?.organization.name}</H1>
<Show when={readme}>
{/* <Show when={readme}>
<p class="mt-6 text-base text-zinc-600 dark:text-zinc-400">
{readme()?.about?.content}
</p>
</Show>
</Show> */}
<div class="mt-6 flex gap-6">
<SocialLink
href="https://github.com/boulder-js"
Expand All @@ -232,9 +232,9 @@ export default function App() {
<Container class="bg-white py-24 sm:py-32">
<H2>Upcoming Events</H2>
<div class="mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3">
<For each={events()?.repository?.issues.nodes}>
{/* <For each={events()?.repository?.issues.nodes}>
{(node) => <EventBox event={node} />}
</For>
</For> */}
</div>
</Container>
</>
Expand Down
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "boulderjs-org"
compatibilityDate = "2024-11-11"
compatibility_date = "2024-11-11"
account_id = "2c1139e40b2ed1b0a3fed3d2204af46f"

main = "./.output/server/index.mjs"
Expand Down

0 comments on commit b655e4c

Please sign in to comment.