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

Multiple Additions #2

Merged
merged 5 commits into from
Jan 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added shikiji for some better highlighting
eduardo-escoto committed Jan 16, 2024
commit fb8f13f47a011596436562bf635276dba7246e7a
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
.eslintrc.cjs
global.css

node_modules
pnpm-lock.yaml
package.json

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
This site started with the tailwind astro started blog and has diverged in many places.

## TODO:

- [ ] Dark mode and light mode logo
- [ ] Actions for notebooks and obsidian markdown to automatically be pulled into repo
- [ ] Add content config for obsidian and notebooks separatey?
- Add reading time
- change from prism to shikiji
18 changes: 17 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'
import rehypeShikiji from 'rehype-shikiji'
import { transformerNotationDiff } from 'shikiji-transformers'

import { SITE_METADATA } from './src/consts.ts'

@@ -13,7 +15,21 @@ export default defineConfig({
site: SITE_METADATA.siteUrl,
integrations: [mdx(), sitemap(), tailwind()],
markdown: {
rehypePlugins: [rehypeKatex],
syntaxHighlight: false,
rehypePlugins: [
rehypeKatex,
[
rehypeShikiji,
{
themes: {
light: 'catppuccin-latte',
dark: 'catppuccin-mocha',
},
transformers: [transformerNotationDiff()],
wrap: true,
},
],
],
remarkPlugins: [remarkMath],
},
})
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -40,6 +40,9 @@
"prettier": "^3.2.2",
"prettier-plugin-astro": "^0.12.3",
"prettier-plugin-tailwindcss": "^0.5.11",
"rehype-shikiji": "0.10.0-beta.3",
"shikiji": "0.10.0-beta.3",
"shikiji-transformers": "0.10.0-beta.3",
"tailwindcss": "^3.4.1"
}
}
71 changes: 57 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

291 changes: 282 additions & 9 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/static/favicons/android-chrome-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/static/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/static/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/static/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/static/favicons/favicon.ico
Binary file not shown.
Binary file modified public/static/favicons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ import ThemeSwitcher from './ThemeSwitcher.astro'
</div>
{
typeof SITE_METADATA.headerTitle === 'string' ? (
<div class="hidden h-6 text-2xl font-semibold sm:block">
<div class="flex h-6 items-center space-x-4 text-2xl font-semibold leading-5 sm:block sm:space-x-6">
{SITE_METADATA.headerTitle}
</div>
) : (
770 changes: 726 additions & 44 deletions src/components/Logo.astro

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -25,3 +25,13 @@ input:-webkit-autofill:focus {
background-color 600000s 0s,
color 600000s 0s;
}

html.dark .shiki,
html.dark .shiki span {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
/* Optional, if you also want font styles */
font-style: var(--shiki-dark-font-style) !important;
font-weight: var(--shiki-dark-font-weight) !important;
text-decoration: var(--shiki-dark-text-decoration) !important;
}
18 changes: 18 additions & 0 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
darkMode: 'class',
theme: {
colors: {
white: '#ffffff',
pre_grey_text: '#4C4F69',
pre_grey_dark_text: '#CDD6F4',
pre_bg_grey: '#eff1f5',
pre_bg_dark_grey: '#1e1e2e',
},
extend: {
lineHeight: {
11: '2.75rem',
@@ -40,6 +47,10 @@ module.exports = {
code: {
color: theme('colors.indigo.500'),
},
pre: {
color: theme('colors.pre_grey_text'),
backgroundColor: theme('colors.pre_bg_grey'),
},
},
},
invert: {
@@ -54,6 +65,13 @@ module.exports = {
'h1,h2,h3,h4,h5,h6': {
color: theme('colors.gray.100'),
},
img: {
backgroundColor: theme('colors.white'),
},
pre: {
color: theme('colors.pre_grey_dark_text'),
backgroundColor: theme('colors.pre_bg_dark_grey'),
},
},
},
}),