This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] /home/radewala_2/my-app | |
├─┬ @testing-library/[email protected] | |
│ ├── @babel/[email protected] | |
│ ├── @types/[email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
radewala_2@cloudshell:~/npmTutorial/my-app$ npm ls --all | |
[email protected] /home/radewala_2/npmTutorial/my-app | |
├─┬ [email protected] | |
│ ├─┬ @next/[email protected] | |
│ │ └─┬ [email protected] | |
│ │ ├── [email protected] | |
│ │ ├─┬ [email protected] | |
│ │ │ ├── [email protected] deduped | |
│ │ │ └── [email protected] | |
│ │ ├── [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] /home/radewala_2/my-next | |
├─┬ [email protected] | |
│ ├─┬ @next/[email protected] | |
│ │ └─┬ [email protected] | |
│ │ ├── [email protected] | |
│ │ ├─┬ [email protected] | |
│ │ │ ├── [email protected] deduped | |
│ │ │ └── [email protected] | |
│ │ ├── [email protected] | |
│ │ ├── [email protected] deduped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This XML file does not appear to have any style information associated with it. The document tree is shown below. | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> | |
<url> | |
<loc>/blog/</loc> | |
<lastmod>2022-04-03T09:54:55+00:00</lastmod> | |
</url> | |
<url> | |
<loc>/categories/</loc> | |
<lastmod>2022-04-03T09:54:55+00:00</lastmod> | |
</url> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{- $pctx := . -}} | |
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} | |
{{- $pages := slice -}} | |
// change file code in default template | |
{{- if or $.IsHome $.IsSection -}} | |
{{- $pages = (where (where $pctx.RegularPages ".Section" "posts") "Kind" "page") -}} | |
{{- else -}} | |
{{- $pages = (where (where $pctx.Pages ".Section" "posts") "Kind" "page") -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextSeo } from 'next-seo'; | |
import Post from '../../components/Post' | |
import Banner from "../../components/Banner"; | |
import Sidebar from "../../components/Sidebar" | |
import { sortByDate, ImageUrl,pageCount } from '../../utils' | |
import { allPosts } from "contentlayer/generated"; | |
import { pick } from "@contentlayer/client"; | |
import Pagnation from '../../components/Pagnation'; | |
import { show_per_page } from "../../config" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Link from "next/link"; | |
import { useRouter } from "next/router"; | |
function Pagnation({totalPostCount}) { | |
let router = useRouter() | |
/* | |
pages give number,base on number we create a array. base on array we map a list elements | |
totalPostCount = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fetch first ten posts | |
export async function getStaticProps() { | |
// help of pich get require filter value | |
const posts = allPosts.map((post) => pick(post, ["title", "date", "slug", "description", "summary", "draft", "image", "images", "tags", "categories","id"])); | |
// sort article base on date | |
let postSortByDate = posts.sort(sortByDate) | |
// filter publish posts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import Head from 'next/head'; | |
import { AppProps } from 'next/app'; | |
import { ThemeProvider } from '@mui/material/styles'; | |
import CssBaseline from '@mui/material/CssBaseline'; | |
import { CacheProvider, EmotionCache } from '@emotion/react'; | |
import theme from '../config/theme'; | |
import createEmotionCache from '../config/createEmotionCache'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import Head from 'next/head'; | |
import { ThemeProvider } from '@mui/material/styles'; | |
import CssBaseline from '@mui/material/CssBaseline'; | |
import { CacheProvider } from '@emotion/react'; | |
import theme from '../config/theme'; | |
import createEmotionCache from '../config/createEmotionCache'; | |
// Client-side cache, shared for the whole session of the user in the browser. | |
const clientSideEmotionCache = createEmotionCache(); |