Skip to content

Commit

Permalink
feat: add rest of solution pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck committed Mar 1, 2024
1 parent 3613684 commit 789bbc3
Show file tree
Hide file tree
Showing 19 changed files with 180 additions and 117 deletions.
8 changes: 8 additions & 0 deletions src/content/geothermal/cost.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: How Much Do a Geothermal Energy Solutions Cost?
description: The cost to install a geothermal system can range anywhere from $10,000 all the way up to $25,000
---

The cost to install a geothermal system can range anywhere from $10,000 all the way up to $25,000.
These costs can vary depending on factors such as region, type of system, and how much renovation your house needs.
Feel free to use our [price calculator](/calculator/) to get an estimate on much it would cost you!
11 changes: 11 additions & 0 deletions src/content/geothermal/environment.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: How Does Geothermal Energy Impact the Environment?
description: When it comes to carbon emissions, geothermal energy is very efficient
---

When it comes to carbon emissions, geothermal energy is very efficient.
It produces 10 times less CO2 than coal!
But it still isn’t as efficient as solar as it produces roughly 3x more CO2.
Possibly the biggest issue with geothermal though is the land it takes to build the infrastructure.
The building of larger plants can often disrupt ecosystems but this effect comes with all types of energy.
This effect is mitigated though with smaller systems such as ones installed on houses.
18 changes: 0 additions & 18 deletions src/content/geothermal/geothermal.mdx

This file was deleted.

12 changes: 12 additions & 0 deletions src/content/geothermal/what.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Geothermal Energy Solutions
description: Geothermal Energy is an undertapped energy resource
---

Geothermal energy is heat energy captured from within the earth and is then used for various things such as heating, cooking, and even electricity.
What’s fascinating about geothermal energy is that it’s actually all around us.
Just about anywhere on the planet this energy can be captured. In fact if we were to harness all of it, it would be enough to power the earth 3 times over.
That’s an incredible amount of energy.
However, it’s important to remember that geothermal energy isn’t a new concept.
Humans have been using it for over 10,000 years for functions such as heating hot springs, cooking, and even space heating in cities such as Pompeii.
Nowadays, it’s still mainly used for heating; however, if you install a converter, it can also be used for electricity.
12 changes: 12 additions & 0 deletions src/content/geothermal/worth-it.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Is Geothermal Energy Worth the Investment?
description: Deciding to invest in a geothermal energy solution can be tricky
---

Deciding to invest in a geothermal energy solution can be tricky.
When comparing it to solar it’s a lot more expensive to start and can take up to 20 years to pay itself off.
The pumps also require electricity to power so it’s not technically _free_.
Similar to solar energy, there are also federal tax credits that range from 22% to 30%, applicable on the install.
However, geothermal can be much more efficient than wind and solar as it isn’t impacted by weather.
It will always run as long as it’s powered.
Overall, investing in geothermal can be a smart choice depending on your location and budget as it will save you money over time and lessen carbon emissions.
9 changes: 9 additions & 0 deletions src/content/recycling/cost.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: The Cost of Recycling
description: The cost of recycling on municipal governments can vary anywhere from $100 to $300 per ton
---

The cost to collect, transport, clean, and process recycled material can vary anywhere from $100 to $300 per ton!
However, the cost to recycle is not a complete loss: recycled materials that are made into new products and sold help make money back.

It was reported that in Atlantic County, New Jersey, the sale of goods made from recycled material generated $2.45 million, while the cost of processing the recycled materials cost the county over $3 million.
13 changes: 13 additions & 0 deletions src/content/recycling/environment.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: How Does Recycling Affect the Environment?
description: The process of recycling reduces pollution and emissions
---

The process of recycling prevents these waste materials from ending up in landfills or the environment, reducing pollution and emissions.
Recycling also reduces the need to extract natural resources from the environment for new products, reduces carbon dioxide emissions, and conserves energy.

However, material that is recycled doesn't always get recycled: only around 32% of all recycling is actually recycled.
This number is even worse when it comes to plastics specifically: only 5-6% of all plastics are recycled.
This is due to the fact that many often don't recycle them correctly: many throw non-recyclable plastics in the recycling bin, such as plastic bags, packing peanuts, batteries, straws, etc.
Another issue is that there is a huge variety of plastics.
Different types of plastics with different chemical additives and dyes are unable to be recycled together.
16 changes: 0 additions & 16 deletions src/content/recycling/recycle.mdx

This file was deleted.

9 changes: 9 additions & 0 deletions src/content/recycling/what.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Recycling
description: Recycling is the process of taking inorganic waste materials and turning them into new products
---

Recycling is the process of taking inorganic waste materials and turning them into new products.
These materials include paper, glass, metal, and plastic.
Recyclable material is collected by consumers and businesses, which is then collected by private or government entities.
The material is then sorted, cleaned, processed, and shipped to manufacturing facilities to be made into new products.
13 changes: 13 additions & 0 deletions src/content/recycling/worth-it.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Is Recycling Worth It?
description: The process of recycling prevents waste materials from ending up in landfills
---

The process of recycling prevents these waste materials from ending up in landfills or the environment, reducing pollution and emissions.
Recycling also reduces the need to extract natural resources from the environment for new products, reduces carbon dioxide emissions, and conserves energy.

However, material that is recycled doesn't always get recycled: only around 32% of all recycling is actually recycled.
This number is even worse when it comes to plastics specifically: only 5-6% of all plastics are recycled.
This is due to the fact that many often don't recycle them correctly: many throw non-recyclable plastics in the recycling bin, such as plastic bags, packing peanuts, batteries, straws, etc.
Another issue is that there is a huge variety of plastics.
Different types of plastics with different chemical additives and dyes are unable to be recycled together.
2 changes: 1 addition & 1 deletion src/content/solar/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: The best thing about solar power is that it has nearly zero negativ
---

The best thing about solar power is that it has nearly zero negative effects on the environment!
It doesn't produce greenhouse gasses and has little effect on local wildlife.
It doesnt produce greenhouse gasses and has little effect on local wildlife.
They can be placed on rooftops, which means that they are incredibly space-efficient.
The only harmful effect of solar power on the environment is its production.
A major component of solar panels is lithium, which is plagued by unsustainable mining practices.
Expand Down
33 changes: 0 additions & 33 deletions src/content/solar/index.mdx

This file was deleted.

8 changes: 4 additions & 4 deletions src/content/solar/what.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: Solar power is a fascinating technology that converts energy from t
import { Admonition } from "../../components/Admonition.tsx";

Solar power is a fascinating technology that converts energy from the sun into electricity.
It is a renewable and near infinite resource as the sun isn't expected to run out of energy for billions of years to come.
Unlike coal and oil, it doesn't emit greenhouse gasses, meaning that it doesn't contribute to global warming.
It is a renewable and near infinite resource as the sun isnt expected to run out of energy for billions of years to come.
Unlike coal and oil, it doesnt emit greenhouse gasses, meaning that it doesnt contribute to global warming.
Nowadays, solar power is used for powering a wide array of things, from satellites to homes.
The government has also been working on constructing solar farms, where thousands of solar panels are connected together to power an energy grid.

<Admonition type="fun-fact">
Solar power was first harnessed circa 213 B.C.E by the Greeks, who allegedly
used reflected the sun's rays with mirrors to light enemy ships on fire during
the Siege of Syracuse.
reflected the suns rays with mirrors to light enemy ships on fire during the
Siege of Syracuse.
</Admonition>
4 changes: 2 additions & 2 deletions src/content/solar/worth-it.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Overall, solar panels are a worthwhile investment for most homeowners.
Their cost of entry is fairly high, but they do pay themselves off= after around 9 to 12 years.
This does depend on the region you live in and the model of solar panel you purchase.
Monocrystalline solar panels, for example, are more expensive but last longer and are more energy efficient.
Polycrystalline panels, on the other hand, are much cheaper; however, they don't last as long and are not nearly as efficient.
Polycrystalline panels, on the other hand, are much cheaper; however, they dont last as long and are not nearly as efficient.
Due to their cheaper price, polycrystalline panels are very popular for residential areas.
More often than not, your region will have a much greater impact than the type of solar panels.
In places like Arizona, your panels will get more hours of sunlight and therefore generate more energy.
Sunnier regions also tend to have more legislation that support solar panels, such as tax rebates.
Even if you don't live in one of those areas, there's still a 30% federal tax credit on _all_ solar systems.
Even if you dont live in one of those areas, theres still a 30% federal tax credit on _all_ solar systems.
In conclusion solar panels are a amazing investment that can help your budget and the environment
1 change: 1 addition & 0 deletions src/routes/solutions/[category]/[[slug]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const handler: Handlers<SolutionProps> = {
return ctx.render({ page: file });
} catch (e) {
console.error(e);

return ctx.renderNotFound();
}
},
Expand Down
32 changes: 17 additions & 15 deletions src/routes/solutions/[category]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { solutions } from "../../../utils/categories.gen.ts";
import type { FreshContextHelper } from "../../../utils/handlers.ts";
import { IconSolarPanel } from "../../../utils/icons.ts";
import { kebabToCamel } from "../../../utils/strings.ts";
import { hasSlug, isKey, isSlug } from "../../../utils/type-helpers.ts";
import { hasSlug, isKey } from "../../../utils/type-helpers.ts";

export type CategoryProps = z.infer<typeof categoryProps>;
export type CategoryPages = z.infer<typeof categoryPropsPages>;
Expand All @@ -29,7 +29,7 @@ const categoryPropsPages = z.object({
const categoryProps = z.object({
page: categoryPropsPages,
title: z.string(),
description: z.string(),
description: z.string().refine((value) => !value.endsWith(",")),
});

/**
Expand All @@ -52,7 +52,7 @@ export const handler: Handlers<CategoryProps> = {
const { slug, data: solutionData } = solution;
const camelSlug = kebabToCamel(slug);

if (solutionData.category === category && isSlug(camelSlug)) {
if (solutionData.category === category) {
data = {
...data,
[camelSlug]: {
Expand All @@ -65,20 +65,14 @@ export const handler: Handlers<CategoryProps> = {
}
}

const parsedData = categoryPropsPages.safeParse(data);

if (parsedData.success) {
return ctx.render({
page: parsedData.data,
title: categoryMetadata[category].title,
description: categoryMetadata[category].description,
});
}

console.error(parsedData.error);
return ctx.renderNotFound();
return ctx.render({
page: categoryPropsPages.parse(data),
title: categoryMetadata[category].title,
description: categoryMetadata[category].description,
});
} catch (e) {
console.error(e);

return ctx.renderNotFound();
}
},
Expand All @@ -89,6 +83,14 @@ const categoryMetadata = {
title: "Solar Energy",
description: "Solar Energy is an undertapped energy resource",
},
geothermal: {
title: "Geothermal Energy",
description: "Geothermal Energy is an undertapped energy resource",
},
recycling: {
title: "Recycling",
description: "Recycling saves energy and reduces pollution",
},
};

/**
Expand Down
77 changes: 59 additions & 18 deletions src/utils/categories.gen.ts

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

Loading

0 comments on commit 789bbc3

Please sign in to comment.