Add json-ld schema to the backend roadmap and refactor

pull/3296/head
Kamran Ahmed 2 years ago
parent 6b52baf093
commit aebee9b3a3
  1. 25
      src/components/FAQs/FAQs.astro
  2. 10
      src/pages/[roadmapId]/index.astro
  3. 179
      src/roadmaps/backend/faqs.astro
  4. 18
      src/roadmaps/frontend/faqs.astro
  5. 4
      src/roadmaps/postgresql-dba/postgresql-dba.md

@ -1,8 +1,21 @@
--- ---
import Answer from './Answer.astro';
import Question from './Question.astro';
export type FAQType = { export type FAQType = {
question: string; question: string;
answer: string[]; answer: string[];
}; };
export interface Props {
faqs: FAQType[];
}
const { faqs } = Astro.props;
if (faqs.length === 0) {
return '';
}
--- ---
<div class='border-t bg-gray-100'> <div class='border-t bg-gray-100'>
@ -12,7 +25,17 @@ export type FAQType = {
</div> </div>
<div class='flex flex-col gap-1 pb-8'> <div class='flex flex-col gap-1 pb-8'>
<slot /> {
faqs.map((faq, questionIndex) => (
<Question isActive={questionIndex === 0} question={faq.question}>
<Answer>
{faq.answer.map((answer, index) => (
<p class:list={{ 'mb-3': index !== faq.answer.length - 1 }}>{answer}</p>
))}
</Answer>
</Question>
))
}
</div> </div>
</div> </div>
</div> </div>

@ -1,5 +1,6 @@
--- ---
import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro'; import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro';
import FAQs from '../../components/FAQs/FAQs.astro';
import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro'; import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro';
import MarkdownRoadmap from '../../components/MarkdownRoadmap.astro'; import MarkdownRoadmap from '../../components/MarkdownRoadmap.astro';
import RoadmapHeader from '../../components/RoadmapHeader.astro'; import RoadmapHeader from '../../components/RoadmapHeader.astro';
@ -22,7 +23,7 @@ interface Params extends Record<string, string | undefined> {
const { roadmapId } = Astro.params as Params; const { roadmapId } = Astro.params as Params;
const roadmapFile = await import(`../../roadmaps/${roadmapId}/${roadmapId}.md`); const roadmapFile = await import(`../../roadmaps/${roadmapId}/${roadmapId}.md`);
const questions = await import(`../../roadmaps/${roadmapId}/faqs.astro`); const { faqs: roadmapFAQs = [] } = await import(`../../roadmaps/${roadmapId}/faqs.astro`);
const roadmapData = roadmapFile.frontmatter as RoadmapFrontmatter; const roadmapData = roadmapFile.frontmatter as RoadmapFrontmatter;
let jsonLdSchema = []; let jsonLdSchema = [];
@ -41,8 +42,8 @@ if (roadmapData.schema) {
); );
} }
if (questions.faqs) { if (roadmapFAQs.length) {
jsonLdSchema.push(generateFAQSchema(questions.faqs)); jsonLdSchema.push(generateFAQSchema(roadmapFAQs));
} }
--- ---
@ -84,6 +85,7 @@ if (questions.faqs) {
{roadmapData.isUpcoming && <UpcomingRoadmap />} {roadmapData.isUpcoming && <UpcomingRoadmap />}
<questions.default /> <FAQs faqs={roadmapFAQs} />
<CaptchaScripts slot='after-footer' /> <CaptchaScripts slot='after-footer' />
</BaseLayout> </BaseLayout>

@ -1,140 +1,43 @@
--- ---
import Answer from '../../components/FAQs/Answer.astro'; import type { FAQType } from '../../components/FAQs/FAQs.astro';
import FAQs from '../../components/FAQs/FAQs.astro';
import Question from '../../components/FAQs/Question.astro'; export const faqs: FAQType[] = [
{
const salaryLink = question: 'What is Backend Development',
'https://www.glassdoor.com/Salaries/united-states-backend-developer-salary-SRCH_IL.0,13_IN1_KO14,31.htm'; answer: [
'Backend web development is the part of web development that deals with the server-side of a web application. This includes creating and managing the server-side logic, connecting the application to a database, creating server-side APIs, handling user authentication and authorization, and processing and responding to user requests. It often involves the use of programming languages such as Python, Java, Ruby, PHP, JavaScript (Node.js), and .NET languages.',
'A backend developer is responsible for the development of server-side components of a web application i.e. working with databases, handling requests, creating server-side APIs that can be consumed by frontend developers to retrieve and manipulate data, ensuring the scalability of the systems i.e. making sure that the backend can handle a high volume of traffic and is performant, integrating external services like payment gateways, message queues, cloud services, etc.',
],
},
{
question: 'How to become a Backend Developer?',
answer: [
"If you are a complete beginner who is just getting started, you can start by learning a backend programming language such as Python, Ruby, Java, Go etc. Once you have got the basic to intermediate understanding of the language, learn about the package manager for that language and learn how to install and use external packages into your applications. Learn the basics of some relational database e.g. PostgreSQL and learn how to run simple CRUD operations. Optionally, you can pick up and learn a web framework for the language of your choice as well. Learn how to build a simple RESTful API and implement simple Authentication/Authorization into it. While you are learning all the items mentioned above, don't forget to learn about Git and GitHub as well.",
'After following all the instructions above, you can start applying for the entry level backend developer jobs. Also, look at the backend developer roadmap above to get an idea about the landscape and see what else you are missing. A degree in computer science or related field is not always necessary but networking, building a portfolio and actively seeking internships, junior developer positions or consulting can help to start and advance a career as a backend developer.',
"Note: remember to make a lot of projects while you are learning to solidify your understanding of the concepts. Also, it's important to have the attitude of continuous learning to improve your skills and be prepared for the fast-paced technology evolution in the industry.",
],
},
{
question: 'How long does it take to become a Backend Developer?',
answer: [
'The amount of time it takes to become a backend developer can vary depending on several factors, such as your learning pace, previous experience and the amount of time you are able to dedicate to learning.',
'If you have a background in computer science or a related field, and have experience with programming, you may be able to become a backend developer relatively quickly, potentially within a few months. However, if you are starting with little or no prior experience or education in computer science, it may take longer to develop the necessary skills and gain the experience needed to be a proficient backend developer. It could take anywhere from 6 months to 2 years.',
],
},
{
question: 'What are the Backend Developer salaries?',
answer: [
'Backend developer salaries can vary depending on factors such as location, experience, and company size. According to data from Glassdoor, the average base salary for a backend developer in the United States is around $92,000 per year. However, this number can vary greatly depending on location, with the highest-paying cities such as San Francisco, Seattle and New York having an average salary of $120,000 to $135,000 per year.',
"It's important to keep in mind that these are just averages, and salaries can vary greatly depending on factors such as experience level, specific skills, and the company you work for. With more experience and specific skills relevant to the job you are applying for you can expect to earn more.",
'It is worth looking at a range of resources, including salary surveys, and job boards to get a general understanding of the current market in your location and experience level. Also try reaching out to other professionals in the field and getting an understanding of their own experience and salary ranges.',
],
},
{
question: 'Should I learn everything listed on the Backend Roadmap?',
answer: [
"This roadmap contains everything that you might encounter while working as a Backend Developer. You may not need everything listed on this roadmap to get into the industry; every job is different and most of the jobs will require a subset of the items on the roadmap. However, knowing what you don't know is as important as knowing things, so you can use this roadmap to get an idea of what you are missing as well.",
'If you are a beginner who is just getting started, don\'t feel overwhelmed by looking at this roadmap. Look at the answer to the FAQ "How to become a Backend Developer?"',
],
},
];
--- ---
<FAQs>
<Question isActive question='What is Backend Development?'>
<Answer>
<p class='mb-3'>
Backend web development is the part of web development that deals with
the server-side of a web application. This includes creating and
managing the server-side logic, connecting the application to a
database, creating server-side APIs, handling user authentication and
authorization, and processing and responding to user requests. It often
involves the use of programming languages such as Python, Java, Ruby,
PHP, JavaScript (Node.js), and .NET languages.
</p>
<p>
A backend developer is responsible for the development of server-side
components of a web application i.e. working with databases, handling
requests, creating server-side APIs that can be consumed by frontend
developers to retrieve and manipulate data, ensuring the scalability of
the systems i.e. making sure that the backend can handle a high volume
of traffic and is performant, integrating external services like payment
gateways, message queues, cloud services, etc.
</p>
</Answer>
</Question>
<Question question='How to become a Backend Developer?'>
<Answer>
<p class='mb-3'>
If you are a complete beginner who is just getting started, you can
start by learning <span class='bg-yellow-100'
>a backend programming language</span
> such as Python, Ruby, Java, Go etc. Once you have got the basic to intermediate
understanding of the language, learn about <span class='bg-yellow-100'
>the package manager</span
> for that language and learn how to install and use external packages into
your applications. Learn the basics of some <span class='bg-yellow-100'
>relational database</span
> e.g. PostgreSQL and learn how to run simple CRUD operations. Optionally,
you can pick up and learn a <span class='bg-yellow-100'
>web framework</span
> for the language of your choice as well. Learn how to build a <span
class='bg-yellow-100'>simple RESTful API</span
> and implement simple Authentication/Authorization into it. While you are
learning all the items mentioned above, don't forget to learn about <span
class='bg-yellow-100'>Git and GitHub</span
> as well.
</p>
<p class='mb-3'>
After following all the instructions above, you can start applying for
the entry level backend developer jobs. Also, look at the backend
developer roadmap above to get an idea about the landscape and see what
else you are missing. A degree in computer science or related field is
not always necessary but networking, building a portfolio and actively
seeking internships, junior developer positions or consulting can help
to start and advance a career as a backend developer.
</p>
<p>
Note: remember to make a lot of projects while you are learning to
solidify your understanding of the concepts. Also, it's important to
have the attitude of continuous learning to improve your skills and be
prepared for the fast-paced technology evolution in the industry.
</p>
</Answer>
</Question>
<Question question='How long does it take to become a Backend Developer?'>
<Answer>
<p class='mb-3'>
The amount of time it takes to become a backend developer can vary
depending on several factors, such as your learning pace, previous
experience and the amount of time you are able to dedicate to learning.
</p>
<p>
If you have a background in computer science or a related field, and
have experience with programming, you may be able to become a backend
developer relatively quickly, potentially within a few months. However,
if you are starting with little or no prior experience or education in
computer science, it may take longer to develop the necessary skills and
gain the experience needed to be a proficient backend developer. It
could take anywhere from 6 months to 2 years.
</p>
</Answer>
</Question>
<Question question='What are the Backend Developer salaries?'>
<Answer>
<p class='mb-3'>
Backend developer salaries can vary depending on factors such as
location, experience, and company size. According to data from
Glassdoor, the average base salary for a backend developer in the United
States is around $92,000 per year. However, this number can vary greatly
depending on location, with the highest-paying cities such as San
Francisco, Seattle and New York having an average salary of $120,000 to
$135,000 per year.
</p>
<p class='mb-3'>
It's important to keep in mind that these are just averages, and
salaries can vary greatly depending on factors such as experience level,
specific skills, and the company you work for. With more experience and
specific skills relevant to the job you are applying for you can expect
to earn more.
</p>
<p>
It is worth looking at a range of resources, including salary surveys,
and job boards to get a general understanding of the current market in
your location and experience level. Also try reaching out to other
professionals in the field and getting an understanding of their own
experience and salary ranges.
</p>
</Answer>
</Question>
<Question question='Should I learn everything listed on the Backend Roadmap?'>
<Answer>
<p class='mb-3'>
This roadmap contains everything that you might encounter while working
as a Backend Developer. You may not need everything listed on this
roadmap to get into the industry; every job is different and most of the
jobs will require a subset of the items on the roadmap. However, knowing
what you don't know is as important as knowing things, so you can use
this roadmap to get an idea of what you are missing as well.
</p>
<p>
If you are a beginner who is just getting started, don't feel
overwhelmed by looking at this roadmap. Look at the answer to the FAQ
"How to become a Backend Developer?"
</p>
</Answer>
</Question>
</FAQs>

@ -1,7 +1,5 @@
--- ---
import Answer from '../../components/FAQs/Answer.astro'; import type { FAQType } from '../../components/FAQs/FAQs.astro';
import FAQs, { FAQType } from '../../components/FAQs/FAQs.astro';
import Question from '../../components/FAQs/Question.astro';
export const faqs: FAQType[] = [ export const faqs: FAQType[] = [
{ {
@ -48,17 +46,3 @@ export const faqs: FAQType[] = [
}, },
]; ];
--- ---
<FAQs>
{
faqs.map((faq, questionIndex) => (
<Question isActive={questionIndex === 0} question={faq.question}>
<Answer>
{faq.answer.map((answer, index) => (
<p class:list={{ 'mb-3': index !== faq.answer.length - 1 }}>{answer}</p>
))}
</Answer>
</Question>
))
}
</FAQs>

@ -216,7 +216,3 @@ Get involved to Postgres community and contribute to Postgres; be a useful membe
- pgsql-bugs - pgsql-bugs
- Reviewing patches - Reviewing patches
- Writing patches, attending in [Commitfests](https://commitfest.postgresql.org/) - Writing patches, attending in [Commitfests](https://commitfest.postgresql.org/)
<br />
<br />
<br />

Loading…
Cancel
Save