├── .changeset ├── README.md └── config.json ├── .envrc ├── .github └── workflows │ ├── main.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── codecov.yml ├── docs └── deviations-from-org-mode.org ├── examples ├── astro │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── launch.json │ ├── CHANGELOG.md │ ├── README.md │ ├── astro.config.mjs │ ├── package.json │ ├── public │ │ ├── blog-placeholder-1.jpg │ │ ├── blog-placeholder-2.jpg │ │ ├── blog-placeholder-3.jpg │ │ ├── blog-placeholder-4.jpg │ │ ├── blog-placeholder-5.jpg │ │ ├── blog-placeholder-about.jpg │ │ ├── favicon.svg │ │ └── fonts │ │ │ ├── atkinson-bold.woff │ │ │ └── atkinson-regular.woff │ ├── src │ │ ├── components │ │ │ ├── BaseHead.astro │ │ │ ├── Footer.astro │ │ │ ├── FormattedDate.astro │ │ │ ├── Header.astro │ │ │ └── HeaderLink.astro │ │ ├── consts.ts │ │ ├── content │ │ │ ├── blog │ │ │ │ ├── first-post.org │ │ │ │ ├── org-style-guide.org │ │ │ │ ├── second-post.org │ │ │ │ └── third-post.org │ │ │ └── config.ts │ │ ├── env.d.ts │ │ ├── layouts │ │ │ └── BlogPost.astro │ │ ├── pages │ │ │ ├── about.astro │ │ │ ├── blog │ │ │ │ ├── [...slug].astro │ │ │ │ └── index.astro │ │ │ ├── index.astro │ │ │ └── rss.xml.js │ │ └── styles │ │ │ └── global.css │ └── tsconfig.json ├── example │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ └── package.json ├── extract-keywords-example │ ├── CHANGELOG.md │ ├── README.md │ ├── example.org │ ├── index.js │ └── package.json ├── next-blog-starter │ ├── .gitignore │ ├── CHANGELOG.md │ ├── README.md │ ├── _posts │ │ ├── hello-world.org │ │ ├── preview.org │ │ └── uniorg.org │ ├── components │ │ ├── alert.js │ │ ├── avatar.js │ │ ├── container.js │ │ ├── cover-image.js │ │ ├── date-formatter.js │ │ ├── footer.js │ │ ├── header.js │ │ ├── hero-post.js │ │ ├── intro.js │ │ ├── layout.js │ │ ├── meta.js │ │ ├── more-stories.js │ │ ├── org-styles.module.css │ │ ├── post-body.js │ │ ├── post-header.js │ │ ├── post-preview.js │ │ ├── post-title.js │ │ └── section-separator.js │ ├── lib │ │ ├── api.js │ │ ├── constants.js │ │ └── orgToHtml.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── _document.js │ │ ├── index.js │ │ └── posts │ │ │ └── [slug].js │ ├── postcss.config.js │ ├── public │ │ ├── assets │ │ │ └── blog │ │ │ │ ├── authors │ │ │ │ ├── jj.jpeg │ │ │ │ ├── joe.jpeg │ │ │ │ └── tim.jpeg │ │ │ │ ├── dynamic-routing │ │ │ │ └── cover.jpg │ │ │ │ ├── hello-world │ │ │ │ └── cover.jpg │ │ │ │ └── preview │ │ │ │ └── cover.jpg │ │ └── favicon │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ ├── mstile-150x150.png │ │ │ ├── safari-pinned-tab.svg │ │ │ └── site.webmanifest │ ├── styles │ │ └── index.css │ ├── tailwind.config.js │ └── vercel.json └── org-braindump │ ├── .gitignore │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── public │ ├── archive-page.org │ ├── changing-posts-directory.org │ ├── code-highlight.org │ ├── id-links.org │ ├── index.org │ ├── org-roam.org │ ├── styling.org │ └── uniorg.org │ ├── src │ ├── components │ │ ├── Link.jsx │ │ └── Rehype.jsx │ ├── lib │ │ ├── api.js │ │ ├── orgToHtml.js │ │ └── resolveLinks.js │ ├── pages │ │ ├── [[...slug]].jsx │ │ ├── _app.js │ │ └── archive.jsx │ └── styles │ │ └── globals.css │ └── vercel.json ├── flake.lock ├── flake.nix ├── jest-base.mjs ├── jest.config.js ├── logo.svg ├── package.json ├── packages ├── astro-org │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── plugin │ │ │ └── rehype-export-frontmatter.ts │ │ └── server.ts │ ├── template │ │ └── content-module-types.d.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── orgast-util-to-string │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── index.spec.ts │ │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── orgast-util-visit-ids │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── index.spec.ts │ │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── orgx │ ├── .gitignore │ ├── .npmignore │ ├── CHANGELOG.md │ ├── index.js │ ├── lib │ │ ├── compile.js │ │ ├── condition.browser.js │ │ ├── condition.js │ │ ├── core.js │ │ ├── evaluate.js │ │ ├── node-types.js │ │ ├── plugin │ │ │ ├── recma-document.js │ │ │ ├── recma-jsx-build.js │ │ │ ├── recma-jsx-rewrite.js │ │ │ ├── recma-stringify.js │ │ │ ├── rehype-recma.js │ │ │ └── rehype-remove-raw.js │ │ ├── run.js │ │ └── util │ │ │ ├── estree-util-create.js │ │ │ ├── estree-util-declaration-to-expression.js │ │ │ ├── estree-util-is-declaration.js │ │ │ ├── estree-util-specifiers-to-declarations.js │ │ │ ├── estree-util-to-binary-addition.js │ │ │ ├── estree-util-to-id-or-member-expression.js │ │ │ ├── extnames-to-regex.js │ │ │ ├── extnames.js │ │ │ ├── resolve-evaluate-options.js │ │ │ └── resolve-file-and-options.js │ ├── license │ ├── package.json │ ├── readme.md │ ├── test │ │ ├── compile.js │ │ ├── context │ │ │ ├── components.js │ │ │ └── data.js │ │ └── evaluate.js │ ├── tsconfig.build.json │ └── tsconfig.json ├── rollup-plugin-orgx │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── jest.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── uniorg-attach │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── __snapshots__ │ │ │ └── index.spec.ts.snap │ │ ├── index.spec.ts │ │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── uniorg-extract-keywords │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── index.spec.ts │ │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── uniorg-parse │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── __snapshots__ │ │ │ └── parser.spec.ts.snap │ │ ├── entities.ts │ │ ├── index.ts │ │ ├── parse-options.ts │ │ ├── parser.spec.ts │ │ ├── parser.ts │ │ ├── reader.ts │ │ ├── unified-org-parse.ts │ │ └── utils.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── uniorg-rehype │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── __snapshots__ │ │ │ └── org-to-hast.spec.ts.snap │ │ ├── index.ts │ │ ├── org-to-hast.spec.ts │ │ ├── org-to-hast.ts │ │ ├── rehype-format.d.ts │ │ └── unified-org-rehype.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── uniorg-slug │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── index.spec.ts │ │ ├── index.ts │ │ └── unist-util-find.d.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── uniorg-stringify │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── __snapshots__ │ │ │ └── stringify.spec.ts.snap │ │ ├── index.spec.ts │ │ ├── index.ts │ │ ├── stringify.spec.ts │ │ └── stringify.ts │ ├── tsconfig.build.json │ └── tsconfig.json └── uniorg │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ └── index.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── tsconfig.build.json ├── tsconfig.json └── turbo.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": ["@changesets/changelog-github", { "repo": "rasendubi/uniorg" }], 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "minor", 10 | "bumpVersionsWithWorkspaceProtocolOnly": true, 11 | "ignore": [], 12 | "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { 13 | "onlyUpdatePeerDependentsWhenOutOfRange": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | # reload when these files change 2 | watch_file flake.nix 3 | watch_file flake.lock 4 | # load the flake devShell 5 | eval "$(nix print-dev-env)" 6 | 7 | layout node 8 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: main 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | 8 | jobs: 9 | main: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | - uses: actions/setup-node@v3 15 | with: 16 | node-version: '22' 17 | - uses: pnpm/action-setup@v2 18 | with: 19 | version: 9 20 | - run: pnpm install 21 | - run: pnpm run ci 22 | - uses: codecov/codecov-action@v3 23 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | concurrency: ${{ github.workflow }}-${{ github.ref }} 9 | 10 | jobs: 11 | release: 12 | name: Release 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | # fetch all tags, so changeset tag does not create extra tags 17 | - run: git fetch --tags origin 18 | - uses: actions/setup-node@v3 19 | with: 20 | node-version: '22' 21 | - uses: pnpm/action-setup@v2 22 | with: 23 | version: 9 24 | - run: pnpm install 25 | - uses: changesets/action@v1 26 | with: 27 | title: 'chore: release' 28 | commit: 'chore: bump version' 29 | version: pnpm run version 30 | publish: pnpm run publish 31 | createGithubReleases: true 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | lerna-debug.log 3 | coverage/ 4 | 5 | .turbo 6 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | link-workspace-packages = deep 2 | prefer-workspace-packages = true 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "semi": true, 6 | "trailingComma": "es5" 7 | } 8 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | informational: true 6 | patch: 7 | default: 8 | informational: true 9 | -------------------------------------------------------------------------------- /examples/astro/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | # generated types 4 | .astro/ 5 | 6 | # dependencies 7 | node_modules/ 8 | 9 | # logs 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /examples/astro/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /examples/astro/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /examples/astro/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @uniorgjs/astro-example 2 | 3 | ## 0.0.8 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies [[`392ec12`](https://github.com/rasendubi/uniorg/commit/392ec12e3e2a019d40b2d6efea1456097b25e317), [`392ec12`](https://github.com/rasendubi/uniorg/commit/392ec12e3e2a019d40b2d6efea1456097b25e317)]: 8 | - uniorg-parse@3.2.0 9 | - uniorg-rehype@2.2.0 10 | 11 | ## 0.0.7 12 | 13 | ### Patch Changes 14 | 15 | - Updated dependencies [[`381b67c`](https://github.com/rasendubi/uniorg/commit/381b67cf0d64c5926754fce04b54aa0b86699b85), [`da9d596`](https://github.com/rasendubi/uniorg/commit/da9d596718fb3656833f5c3a3d2e0abd9667eaa1)]: 16 | - uniorg-parse@3.1.0 17 | 18 | ## 0.0.6 19 | 20 | ### Patch Changes 21 | 22 | - Updated dependencies [[`7531419`](https://github.com/rasendubi/uniorg/commit/75314196835ee768fc0689cbc6279cf68fedb58b)]: 23 | - astro-org@4.0.0 24 | 25 | ## 0.0.5 26 | 27 | ### Patch Changes 28 | 29 | - Updated dependencies [[`12d0768`](https://github.com/rasendubi/uniorg/commit/12d076891ef1d643cd3712e6845e0c45d38c98cb)]: 30 | - astro-org@3.0.0 31 | 32 | ## 0.0.4 33 | 34 | ### Patch Changes 35 | 36 | - Updated dependencies [[`3af18d6`](https://github.com/rasendubi/uniorg/commit/3af18d630f64f11afda88b93c31f4779473d8e61)]: 37 | - astro-org@2.1.2 38 | 39 | ## 0.0.3 40 | 41 | ### Patch Changes 42 | 43 | - Updated dependencies []: 44 | - astro-org@2.1.1 45 | 46 | ## 0.0.2 47 | 48 | ### Patch Changes 49 | 50 | - [#96](https://github.com/rasendubi/uniorg/pull/96) [`2ec17b8`](https://github.com/rasendubi/uniorg/commit/2ec17b87a2b58546307f61110785dac47d7b2b10) Thanks [@rasendubi](https://github.com/rasendubi)! - Support Astro Content Collections. 51 | 52 | astro-org now supports Astro's [Content Collections](https://docs.astro.build/en/guides/content-collections/). You can simply drop org files to `src/collections/*/` directories and it should work. 53 | 54 | - Updated dependencies [[`2ec17b8`](https://github.com/rasendubi/uniorg/commit/2ec17b87a2b58546307f61110785dac47d7b2b10)]: 55 | - astro-org@2.1.0 56 | -------------------------------------------------------------------------------- /examples/astro/README.md: -------------------------------------------------------------------------------- 1 | # Astro Starter Kit: Blog 2 | 3 | ```sh 4 | npm create astro@latest -- --template blog 5 | ``` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog) 8 | [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/blog) 9 | [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/blog/devcontainer.json) 10 | 11 | > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! 12 | 13 | ![blog](https://github.com/withastro/astro/assets/2244813/ff10799f-a816-4703-b967-c78997e8323d) 14 | 15 | Features: 16 | 17 | - ✅ Minimal styling (make it your own!) 18 | - ✅ 100/100 Lighthouse performance 19 | - ✅ SEO-friendly with canonical URLs and OpenGraph data 20 | - ✅ Sitemap support 21 | - ✅ RSS Feed support 22 | - ✅ Org-mode support 23 | 24 | ## 🚀 Project Structure 25 | 26 | Inside of your Astro project, you'll see the following folders and files: 27 | 28 | ```text 29 | ├── public/ 30 | ├── src/ 31 | │   ├── components/ 32 | │   ├── content/ 33 | │   ├── layouts/ 34 | │   └── pages/ 35 | ├── astro.config.mjs 36 | ├── README.md 37 | ├── package.json 38 | └── tsconfig.json 39 | ``` 40 | 41 | Astro looks for `.astro` or `.org` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. 42 | 43 | There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. 44 | 45 | The `src/content/` directory contains "collections" of related Org documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more. 46 | 47 | Any static assets, like images, can be placed in the `public/` directory. 48 | 49 | ## 🧞 Commands 50 | 51 | All commands are run from the root of the project, from a terminal: 52 | 53 | | Command | Action | 54 | | :------------------------ | :----------------------------------------------- | 55 | | `npm install` | Installs dependencies | 56 | | `npm run dev` | Starts local dev server at `localhost:4321` | 57 | | `npm run build` | Build your production site to `./dist/` | 58 | | `npm run preview` | Preview your build locally, before deploying | 59 | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | 60 | | `npm run astro -- --help` | Get help using the Astro CLI | 61 | 62 | ## 👀 Want to learn more? 63 | 64 | Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). 65 | 66 | ## Credit 67 | 68 | This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/). 69 | -------------------------------------------------------------------------------- /examples/astro/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | import org from 'astro-org' 3 | 4 | import sitemap from '@astrojs/sitemap'; 5 | 6 | // https://astro.build/config 7 | export default defineConfig({ 8 | site: 'https://example.com', 9 | integrations: [org(), sitemap()], 10 | }); 11 | -------------------------------------------------------------------------------- /examples/astro/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@uniorgjs/astro-example", 3 | "type": "module", 4 | "version": "0.0.8", 5 | "private": true, 6 | "scripts": { 7 | "dev": "astro dev", 8 | "start": "astro dev", 9 | "build": "astro check && astro build", 10 | "preview": "astro preview", 11 | "astro": "astro" 12 | }, 13 | "dependencies": { 14 | "@astrojs/check": "^0.9.4", 15 | "@astrojs/rss": "^4.0.11", 16 | "@astrojs/sitemap": "^3.3.0", 17 | "astro": "^5.5.5", 18 | "astro-org": "workspace:^", 19 | "uniorg-parse": "workspace:^", 20 | "uniorg-rehype": "workspace:^", 21 | "typescript": "^5.4.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/astro/public/blog-placeholder-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/blog-placeholder-1.jpg -------------------------------------------------------------------------------- /examples/astro/public/blog-placeholder-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/blog-placeholder-2.jpg -------------------------------------------------------------------------------- /examples/astro/public/blog-placeholder-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/blog-placeholder-3.jpg -------------------------------------------------------------------------------- /examples/astro/public/blog-placeholder-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/blog-placeholder-4.jpg -------------------------------------------------------------------------------- /examples/astro/public/blog-placeholder-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/blog-placeholder-5.jpg -------------------------------------------------------------------------------- /examples/astro/public/blog-placeholder-about.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/blog-placeholder-about.jpg -------------------------------------------------------------------------------- /examples/astro/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /examples/astro/public/fonts/atkinson-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/fonts/atkinson-bold.woff -------------------------------------------------------------------------------- /examples/astro/public/fonts/atkinson-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rasendubi/uniorg/fc4e3b1105f052709c14f86d9e08d32cb17409a5/examples/astro/public/fonts/atkinson-regular.woff -------------------------------------------------------------------------------- /examples/astro/src/components/BaseHead.astro: -------------------------------------------------------------------------------- 1 | --- 2 | // Import the global.css file here so that it is included on 3 | // all pages through the use of the component. 4 | import '../styles/global.css'; 5 | 6 | interface Props { 7 | title: string; 8 | description: string; 9 | image?: string; 10 | } 11 | 12 | const canonicalURL = new URL(Astro.url.pathname, Astro.site); 13 | 14 | const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props; 15 | --- 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {title} 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /examples/astro/src/components/FormattedDate.astro: -------------------------------------------------------------------------------- 1 | --- 2 | interface Props { 3 | date: Date; 4 | } 5 | 6 | const { date } = Astro.props; 7 | --- 8 | 9 | 18 | -------------------------------------------------------------------------------- /examples/astro/src/components/HeaderLink.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import type { HTMLAttributes } from 'astro/types'; 3 | 4 | type Props = HTMLAttributes<'a'>; 5 | 6 | const { href, class: className, ...props } = Astro.props; 7 | 8 | const { pathname } = Astro.url; 9 | const isActive = href === pathname || href === pathname.replace(/\/$/, ''); 10 | --- 11 | 12 | 13 | 14 | 15 | 25 | -------------------------------------------------------------------------------- /examples/astro/src/consts.ts: -------------------------------------------------------------------------------- 1 | // Place any global data in this file. 2 | // You can import this data from anywhere in your site by using the `import` keyword. 3 | 4 | export const SITE_TITLE = 'Astro Blog'; 5 | export const SITE_DESCRIPTION = 'Welcome to my website!'; 6 | -------------------------------------------------------------------------------- /examples/astro/src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection, z } from 'astro:content'; 2 | 3 | const blog = defineCollection({ 4 | // Type-check frontmatter using a schema 5 | schema: z.object({ 6 | title: z.string(), 7 | description: z.string(), 8 | // Transform string to Date object 9 | date: z.coerce.date(), 10 | last_modified: z.coerce.date().optional(), 11 | hero_image: z.string().optional(), 12 | }), 13 | }); 14 | 15 | export const collections = { blog }; 16 | -------------------------------------------------------------------------------- /examples/astro/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /examples/astro/src/layouts/BlogPost.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import type { CollectionEntry } from 'astro:content'; 3 | import BaseHead from '../components/BaseHead.astro'; 4 | import Header from '../components/Header.astro'; 5 | import Footer from '../components/Footer.astro'; 6 | import FormattedDate from '../components/FormattedDate.astro'; 7 | 8 | type Props = CollectionEntry<'blog'>['data']; 9 | 10 | const { title, description, date, last_modified, hero_image } = Astro.props; 11 | --- 12 | 13 | 14 | 15 | 16 | 55 | 56 | 57 | 58 |
59 |
60 |
61 |
62 | {hero_image && } 63 |
64 |
65 |
66 |
67 | 68 | { 69 | last_modified && ( 70 |
71 | Last updated on 72 |
73 | ) 74 | } 75 |
76 |

{title}

77 |
78 |
79 | 80 |
81 |
82 |
83 |