-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
3,770 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NEXT_TELEMETRY_DISABLED=1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2021, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"next", | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react/prop-types": "off", | ||
"@next/next/no-img-element": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "warn", | ||
"comma-dangle": [ | ||
"error", | ||
"always-multiline" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"ignoredNodes": [ | ||
"TemplateLiteral" | ||
] | ||
} | ||
], | ||
"quotes": [ | ||
2, | ||
"single", | ||
{ | ||
"avoidEscape": true, | ||
"allowTemplateLiterals": true | ||
} | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build and Deploy on Push | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
|
||
- name: Install and Build 🔧 | ||
run: | | ||
yarn | ||
yarn deploy | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: github-pages | ||
folder: dist # package.json => "... next export -o dist" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
/dist | ||
/.build | ||
|
||
# misc | ||
.DS_Store | ||
*.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# notiflix.github.io | ||
# Notiflix Documentation | ||
|
||
test. | ||
Coming Soon... |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '*.md'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/*! | ||
* Notiflix | ||
* Description: Next.js configuration. | ||
* Version: 1.0.0 | ||
* Author: Furkan MT ('https://github.com/furcan') | ||
* Copyright 2019-Present Notiflix, GPL-3.0 License ('https://opensource.org/licenses/GPL-3.0') | ||
*/ | ||
|
||
// Dependencies | ||
const package = require('./package.json'); | ||
|
||
|
||
// Contstants: begin | ||
const isDev = process.env.NODE_ENV === 'development'; | ||
const isProd = process.env.NODE_ENV === 'production'; | ||
const publicUrl = isProd ? (JSON.stringify((package || {}).homepage) || '').replace(/"/gm, '') : ''; | ||
// Contstants: end | ||
|
||
// Next Config: begin | ||
const nextConfig = { | ||
images: { | ||
loader: 'imgix', | ||
disableStaticImages: true, | ||
}, | ||
|
||
// gzip enabled => default is true | ||
compress: true, | ||
|
||
// remove "x-powered-by" | ||
poweredByHeader: false, | ||
|
||
// remove dev tools | ||
devIndicators: { | ||
autoPrerender: false, | ||
}, | ||
|
||
// add "/" to end of the pages link (true => affects all assets and pages URLs) | ||
trailingSlash: false, | ||
|
||
// custom environments | ||
env: { | ||
isDev: isDev, | ||
isProd: isProd, | ||
PUBLIC_URL: publicUrl, | ||
}, | ||
|
||
// assets prefix | ||
assetPrefix: publicUrl, | ||
|
||
// TODO: | ||
async redirects() { | ||
return [ | ||
{ | ||
source: '/redirect-me', | ||
destination: '/redirect-to', | ||
permanent: false, | ||
}, | ||
] | ||
}, | ||
|
||
// TODO: | ||
exportPathMap: async function ( | ||
defaultPathMap, | ||
{ dev, dir, outDir, distDir, buildId } | ||
) { | ||
return { | ||
'/': { page: '/' }, | ||
'/about': { page: '/about' }, | ||
} | ||
}, | ||
|
||
// Build ID, Dir, and Ext | ||
distDir: '.build', | ||
pageExtensions: ['jsx', 'js', 'ts', 'tsx'], | ||
generateBuildId: async () => { | ||
if (process.env.BUILD_ID) { | ||
return process.env.BUILD_ID; | ||
} else { | ||
return `BID-${new Date().getTime()}`; | ||
} | ||
}, | ||
|
||
// Webpack config | ||
webpack: (config, { dev, isServer }) => { | ||
// frontmatter markdown loader | ||
config.module.rules.push( | ||
{ | ||
test: /\.md$/, | ||
loader: 'frontmatter-markdown-loader', | ||
} | ||
); | ||
|
||
// return extended config | ||
return config; | ||
}, | ||
|
||
}; | ||
// Next Config: end | ||
|
||
module.exports = nextConfig; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "notiflix-documentation", | ||
"homepage": "https://notiflix.github.io", | ||
"version": "3.0.1-beta.01", | ||
"private": true, | ||
"scripts": { | ||
"lint": "next lint", | ||
"dev": "next lint && next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"deploy": "next build && next export -o dist" | ||
}, | ||
"dependencies": { | ||
"next": "11.0.1", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2" | ||
}, | ||
"devDependencies": { | ||
"@ts-stack/markdown": "^1.4.0", | ||
"@types/react": "17.0.14", | ||
"@typescript-eslint/eslint-plugin": "^4.22.1", | ||
"eslint": "7.30.0", | ||
"eslint-config-next": "11.0.1", | ||
"frontmatter-markdown-loader": "^3.6.3", | ||
"typescript": "4.3.5" | ||
} | ||
} |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
pageMeta: | ||
title: About | ||
description: >- | ||
About Us Description | ||
robots: "noindex, nofollow, noodp, noydir" | ||
content: | ||
- isActive: true | ||
title: Title 1 | ||
subtitle: SubTitle 1 | ||
description: >- | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
image: /content/images/nature.jpeg | ||
- isActive: true | ||
title: Title 2 | ||
subtitle: SubTitle 2. | ||
description: >- | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
image: /content/images/nature.jpeg | ||
--- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { AppProps } from 'next/app'; | ||
|
||
function App({ Component, pageProps }: AppProps): React.ReactNode { | ||
return <Component {...pageProps} />; | ||
} | ||
|
||
export default App; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Document, { Html, Head, Main, NextScript, DocumentContext, DocumentInitialProps } from 'next/document'; | ||
|
||
export default class CustomDocument extends Document { | ||
|
||
static async getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps> { | ||
const initialProps = await Document.getInitialProps(ctx); | ||
return { ...initialProps }; | ||
} | ||
|
||
render(): JSX.Element { | ||
const language = this.props.head?.find(x => x?.props.name == 'content-language')?.props.content || 'en'; | ||
|
||
return ( | ||
<Html lang={language} itemScope itemType="https://schema.org/WebSite" prefix="og: http://ogp.me/ns#"> | ||
<Head /> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { NextPageContext } from 'next'; | ||
|
||
interface ICustomError { | ||
statusCode?: number; | ||
} | ||
|
||
// TODO: | ||
function CustomError({ statusCode }: ICustomError): JSX.Element { | ||
return ( | ||
<p> | ||
{statusCode | ||
? `An error ${statusCode} occurred on server` | ||
: 'An error occurred on client'} | ||
</p> | ||
); | ||
} | ||
|
||
CustomError.getInitialProps = ({ res, err }: NextPageContext) => { | ||
const statusCode = res ? res.statusCode : err ? err.statusCode : 404; | ||
return { statusCode }; | ||
}; | ||
|
||
export default CustomError; |
Oops, something went wrong.