Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make support relative path from markdown content #2

Merged
merged 4 commits into from Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 21 additions & 9 deletions .github/workflows/ci-check.yaml
@@ -1,17 +1,29 @@
name: CI
name: Build & Test

on:
pull_request:
branches:
- main
push:
branches:
- main

on: [push, pull_request]

jobs:
check-astro:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: checks
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- uses: actions/setup-node@v3
with:
node-version: 18.14.1
cache: "npm"
- run: npm install
- run: npm run check
node-version: "18"
cache: "pnpm"

- run: pnpm install
- run: pnpm all
8 changes: 8 additions & 0 deletions .prettierrc
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "avoid"
}
55 changes: 3 additions & 52 deletions README.md
@@ -1,54 +1,5 @@
# 👨‍🚀 Astro - Portfolio Template
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
# My Next Site

![Template](https://github.com/MaeWolff/astro-portfolio-template/blob/main/public/opengraph-image.jpg)
[![Build & Test](https://github.com/mildronize/mildronize.github.io/actions/workflows/ci-check.yaml/badge.svg)](https://github.com/mildronize/mildronize.github.io/actions/workflows/ci-check.yaml)

This theme/template is designed and crafted by [me](https://www.maxencewolff.com).
NB: Additional color themes can also be configured on the `src/data/theme.ts` file.

## 🥷 Usage

- You can modify all the information in the files in the `data` folder (presentation, social links, projects list, colors).
- You can write articles in `markdown` format in the `content/posts` folder.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## Contributors ✨

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SterbenVD"><img src="https://avatars.githubusercontent.com/u/90999906?v=4?s=100" width="100px;" alt="Vishal Vijay Devadiga"/><br /><sub><b>Vishal Vijay Devadiga</b></sub></a><br /><a href="https://github.com/MaeWolff/astro-portfolio-template/commits?author=SterbenVD" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/khushChopra"><img src="https://avatars.githubusercontent.com/u/43996455?v=4?s=100" width="100px;" alt="Khush Chopra"/><br /><sub><b>Khush Chopra</b></sub></a><br /><a href="https://github.com/MaeWolff/astro-portfolio-template/commits?author=khushChopra" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://jbrave.ir"><img src="https://avatars.githubusercontent.com/u/57140027?v=4?s=100" width="100px;" alt="Javad Shoja"/><br /><sub><b>Javad Shoja</b></sub></a><br /><a href="#maintenance-javadshoja" title="Maintenance">🚧</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
Original by https://github.com/MaeWolff/astro-portfolio-template
29 changes: 16 additions & 13 deletions astro.config.mjs
@@ -1,19 +1,22 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import robotsTxt from "astro-robots-txt";
import { SITE_URL } from "./src/data/config";

import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import sitemap from '@astrojs/sitemap';
import robotsTxt from 'astro-robots-txt';
import { SITE_URL } from './src/data/config';
import remarkImageLink from './src/plugins/remark-plugins/remark-image-links';
import { contentDirectory } from './src/data/config';

// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), sitemap(), robotsTxt()],
site: SITE_URL,
markdown: {
syntaxHighlight: "shiki",
shikiConfig: {
theme: "nord",
wrap: false
}
}
});
syntaxHighlight: 'prism',
/**
* Refer to: https://docs.astro.build/en/guides/markdown-content/#markdown-plugins
* Applied to .md and .mdx files
*/
remarkPlugins: [[remarkImageLink, { contentDirectory }]],
rehypePlugins: [],
},
});
21 changes: 18 additions & 3 deletions package.json
Expand Up @@ -4,27 +4,42 @@
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"all": "run-s test:ci check build",
"start": "astro dev",
"build": "astro build",
"build": "run-s build:astro build:posts-assets",
"preview": "astro preview",
"check": "astro check",
"build:astro": "astro build",
"build:posts-assets": "tsx scripts/copy-assets.ts",
"test": "vitest",
"test:ci": "vitest run",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.4.1",
"@astrojs/sitemap": "^3.0.0",
"@astrojs/tailwind": "^5.0.0",
"@fontsource/open-sans": "^5.0.12",
"astro": "^4.1.3",
"astro-robots-txt": "^1.0.0",
"astro-seo": "0.8.0",
"tailwindcss": "^3.3.3"
"remark": "13.0.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.3.3",
"unist-util-visit": "^2.0.3"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/mdast": "^4.0.3",
"@typescript-eslint/parser": "5.59.7",
"eslint": "8.41.0",
"eslint-plugin-astro": "0.27.1",
"npm-run-all": "^4.1.5",
"prettier": "2.8.8",
"prettier-plugin-astro": "0.9.0",
"prettier-plugin-tailwindcss": "0.3.0"
"prettier-plugin-tailwindcss": "0.3.0",
"recursive-copy": "^2.0.14",
"tsx": "^4.7.0",
"vitest": "^1.2.0"
}
}