Code for Derek Perry's Portfolio/Website, derek-perry.com.
Made Using: Astro v5, Decap CMS, DecapBridge, Netlify
- Derek-Perry.com Website: derek-perry.com
- Derek-Perry.com GitHub: github.com/derek-perry/derek-perry.com
- Website By: Derek Perry
Copyright © 2025 Derek Perry
Some rights reserved.
Use of the code for the Derek-Perry.com is licensed under the Creative Commons Zero v1.0 Universal license. Derek-Perry.com uses the Output Starter which is also licensed under the Creative Commons Zero v1.0 Universal license.
The font used on this website is Saira by Omnibus-Type (omnibus-type.com | omnibus.type@gmail.com) (Copyright 2020 Omnibus-Type) (Licensed under SIL Open Font License 1.1).
- Clone this repository to your local machine.
- Open a cmd window in the root of that cloned folder.
- Run
npm installto install all dependencies. - Run
npm run devto start the project and spin up a development server onlocalhost:4321and a Decap CMS admin server. Access the admin dashboard atlocalhost:4321/admin.
In public/admin/ , you'll find a config.yml file which contains the configuration for the blog. While this project is set up to work with a blog out of the box, you are welcome to make changes using
the Decap CMS documentation.
Blog content lives in /src/content/blog in the form of markdown files, with a front matter similar to that of the pages. MDX files can also be used if you want to include JSX components. The title, description, and tags are defined in the frontmatter of the markdown. The permalink will be the same as the file name.
Files uploaded through the dashboard's media library will be stored in src/assets/images/media so that they can be accessed and optimised by Astro components if you wish.
When npm run dev is run, a proxy server for the CMS is spun up on localhost:8081 . That can often mean you run into errors if localhost:8080 is already taken, so look out for that. You can locally access the blog via navigating to the /admin path (e.g. http://localhost:4321/admin ). While running the local dev server, you won't need to login to access the admin dashboard. All blog content can be easily created, updated and deleted via this admin panel, and is the very system that your clients can use to manage their website without your involvement.
Everything on the blog should be fairly intuitive, but feel free to experiment with using this panel first.
NOTE: With this kit, you can add featured to the comma-separated list of tags to have them show up as so in the frontend.
In /src/content , you will see a config.ts file. This is where you can configure Astro Content Collections. This step is not necessary to run the blog with Decap CMS, but it will supercharge your Astro pages and content. Collections help to
- organize your documents,
- validate your frontmatter,
- provide automatic TypeScript type-safety for all of your content,
- use Astro's
<Image />and<Picture />components with user-uploaded images via the CMS.
This template already has Content Collections configured for immediate use of the blog content, but you could use them to power up the Portfolio or Gallery for example.
Content Collections can also be used on content that is not created via the CMS.
This template includes automatic sitemap generation using @astrojs/sitemap . The sitemap helps search engines better crawl and index your site.
- Automatically generates
sitemap-index.xmlandsitemap-0.xml - Excludes admin routes from indexing
- No manual XML creation needed
The sitemap is pre-configured in astro.config.mjs . Here's what's included:
import sitemap from '@astrojs/sitemap';
export default defineConfig({
site: 'https://yourwebsite.com', // Replace with your site URL
integrations: [
sitemap({
filter: (page) => !page.includes('/admin'),
changefreq: 'weekly',
priority: 0.7
})
]
});Note: Make sure to replace
https://yourwebsite.comwith your actual site URL inastro.config.mjsandrobots.txt.
Fore more configuration options, read the full Astro Sitemap documentation
- Before you deploy, it is recommended to test the build. Run
npm run buildto build the project. Once done, runnpm run previewwhich you can access onhttp://localhost:4321/. This allows you to test your website as if it was deployed on your host. - Ensure the astro.config.mjs, client.json, robots.txt and _redirects have been filled out.
- Navigate to your Netlify Admin Panel, click Add new site | Import an existing project
- Follow the instructions to connect your GitHub repository to Netlify.
- Once deployed, go to the project's page, click on
Site configurationthenIdentityin the navigation, then clickEnable Identity - Invite yourself, and the client, to the site
- While in the Identity tab, click the "Settings and usage" button to open the settings options. Then, do the following:
- Go to
Registration / Registration Preferences, and set registration from Public to Invite Only - Go to
Registration / External Providersand add a provider. We recommend Google, so the client can login with Google in 1 click. - Go to
Services / Git Gatewayand enable it.
- Go to