Added astro 1

This commit is contained in:
Rafael González 2022-08-12 14:54:04 -05:00
parent 25d0980f3a
commit e3a23f9eee
7 changed files with 1563 additions and 1857 deletions

View File

@ -1,19 +1,10 @@
// Full Astro Configuration API Documentation: import tailwind from "@astrojs/tailwind";
// https://docs.astro.build/reference/configuration-reference import svelte from "@astrojs/svelte";
import { defineConfig } from "astro/config";
import sitemap from "@astrojs/sitemap";
// @type-check enabled! // https://astro.build/config
// VSCode and other TypeScript-enabled text editors will provide auto-completion, export default defineConfig({
// helpful tooltips, and warnings if your exported object is invalid. site: "https://rafa.page",
// You can disable this by removing "@ts-check" and `@type` comments below. integrations: [tailwind(), svelte(), sitemap()]
});
// @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({
// Comment out "renderers: []" to enable Astro's default component support.
renderers: [
'@astrojs/renderer-svelte'
],
buildOptions:{
site: "https://rafa.page",
sitemap: true
}
});

View File

@ -1,5 +1,5 @@
{ {
"name": "@example/minimal", "name": "@rafaremo/links-page",
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"scripts": { "scripts": {
@ -9,11 +9,10 @@
"preview": "astro preview" "preview": "astro preview"
}, },
"devDependencies": { "devDependencies": {
"astro": "^0.22.5", "@astrojs/sitemap": "^1.0.0",
"autoprefixer": "^10.4.1", "@astrojs/svelte": "^1.0.0",
"tailwindcss": "^3.0.10" "@astrojs/tailwind": "^1.0.0",
}, "astro": "^1.0.3",
"dependencies": { "svelte": "^3.49.0"
"@astrojs/renderer-svelte": "^0.3.1"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
module.exports = {
plugins: [require("autoprefixer"), require("tailwindcss")],
};

View File

@ -2,13 +2,20 @@
import profileData from '../data/profile.json'; import profileData from '../data/profile.json';
import Icon from "../components/icon.svelte"; import Icon from "../components/icon.svelte";
type IconData = {
name: string;
url: string;
icon: string;
iconUrl?: string;
}
const profileName = profileData.name; const profileName = profileData.name;
const personalLinks = []; const personalLinks = [];
const profesionalLinks = []; const profesionalLinks = [];
for (let link of profileData.personalLinks) { for (let link of profileData.personalLinks) {
const withUrl = {...link}; const withUrl: IconData = {...link};
withUrl.iconUrl = `/icons/${link.icon}.svg`; withUrl.iconUrl = `/icons/${link.icon}.svg`;
@ -16,7 +23,7 @@ for (let link of profileData.personalLinks) {
} }
for (let link of profileData.profesionalLinks) { for (let link of profileData.profesionalLinks) {
const withUrl = {...link}; const withUrl: IconData = {...link};
withUrl.iconUrl = `/icons/${link.icon}.svg`; withUrl.iconUrl = `/icons/${link.icon}.svg`;
@ -44,7 +51,6 @@ for (let link of profileData.profesionalLinks) {
<meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href={Astro.resolve('../styles/global.css')}>
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<title>{profileName} | Links</title> <title>{profileName} | Links</title>
<meta name="description" content={profileData.description}> <meta name="description" content={profileData.description}>

View File

@ -1,3 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -1,7 +0,0 @@
module.exports = {
content: [
'./public/**/*.html',
'./src/**/*.{astro,js,jsx,svelte,ts,tsx,vue}',
],
// more options here
};