mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-03-12 17:51:53 +08:00
* Update * Add stats and health endpoints * Add pre-render * fix: redirect to the error page * Fix generate-renderer issue * Rename * Fix best practice topics not loading * Handle SSR for static pages * Refactor faqs * Refactor best practices * Fix absolute import * Fix stats * Add custom roadmap page * Minor UI change * feat: custom roadmap slug routes (#4987) * feat: replace roadmap slug * fix: remove roadmap slug * feat: username route * fix: user public page * feat: show roadmap progress * feat: update public profile * fix: replace with toast * feat: user public profile page * feat: implement profile form * feat: implement user profile roadmap page * refactor: remove logs * fix: increase progress gap * fix: remove title margin * fix: breakpoint for roadmaps * Update dependencies * Upgrade dependencies * fix: improper avatars * fix: heatmap focus * wip: remove `getStaticPaths` * fix: add disable props * wip * feat: add email icon * fix: update pnpm lock * fix: implement author page * Fix beginner roadmaps not working * Changes to form * Refactor profile and form * Refactor public profile form * Rearrange sidebar items * Update UI for public form * Minor text update * Refactor public profile form * Error page for user * Revamp UI for profile page * Add public profile page * Fix vite warnings * Add private profile banner * feat: on blur check username * Update fetch depth * Add error detail * Use hybrid mode of rendering * Do not pre-render stats pages * Update deployment workflow * Update deployment workflow --------- Co-authored-by: Arik Chakma <arikchangma@gmail.com>
67 lines
1.6 KiB
JavaScript
67 lines
1.6 KiB
JavaScript
// https://astro.build/config
|
|
import sitemap from '@astrojs/sitemap';
|
|
import tailwind from '@astrojs/tailwind';
|
|
import node from '@astrojs/node';
|
|
import compress from 'astro-compress';
|
|
import { defineConfig } from 'astro/config';
|
|
import rehypeExternalLinks from 'rehype-external-links';
|
|
import { serializeSitemap, shouldIndexPage } from './sitemap.mjs';
|
|
|
|
import react from '@astrojs/react';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: 'https://roadmap.sh/',
|
|
markdown: {
|
|
shikiConfig: {
|
|
theme: 'dracula',
|
|
},
|
|
rehypePlugins: [
|
|
[
|
|
rehypeExternalLinks,
|
|
{
|
|
target: '_blank',
|
|
rel: function (element) {
|
|
const href = element.properties.href;
|
|
const whiteListedStarts = [
|
|
'/',
|
|
'#',
|
|
'mailto:',
|
|
'https://github.com/kamranahmedse',
|
|
'https://thenewstack.io',
|
|
'https://kamranahmed.info',
|
|
'https://roadmap.sh',
|
|
];
|
|
if (whiteListedStarts.some((start) => href.startsWith(start))) {
|
|
return [];
|
|
}
|
|
return 'noopener noreferrer nofollow';
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
output: 'hybrid',
|
|
adapter: node({
|
|
mode: 'standalone',
|
|
}),
|
|
trailingSlash: 'never',
|
|
integrations: [
|
|
tailwind({
|
|
config: {
|
|
applyBaseStyles: false,
|
|
},
|
|
}),
|
|
sitemap({
|
|
filter: shouldIndexPage,
|
|
serialize: serializeSitemap,
|
|
}),
|
|
compress({
|
|
HTML: false,
|
|
CSS: false,
|
|
JavaScript: false,
|
|
}),
|
|
react(),
|
|
],
|
|
});
|