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:
// https://docs.astro.build/reference/configuration-reference
import tailwind from "@astrojs/tailwind";
import svelte from "@astrojs/svelte";
import { defineConfig } from "astro/config";
import sitemap from "@astrojs/sitemap";
// @type-check enabled!
// VSCode and other TypeScript-enabled text editors will provide auto-completion,
// helpful tooltips, and warnings if your exported object is invalid.
// You can disable this by removing "@ts-check" and `@type` comments below.
// @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
}
});
// https://astro.build/config
export default defineConfig({
site: "https://rafa.page",
integrations: [tailwind(), svelte(), sitemap()]
});

View File

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

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