Merge pull request #1033 from alxshelepenok/gatsby-v4

Upgrade and move to Typescript
This commit is contained in:
Alexander Shelepenok 2022-04-16 18:27:19 +03:00 committed by GitHub
commit 1388b1f139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
423 changed files with 64715 additions and 37762 deletions

View File

@ -12,12 +12,12 @@ jobs:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn install --frozen-lockfile
- dependencies-{{ checksum "package-lock.json" }}
- run: npm ci
- save_cache:
paths:
- node_modules
key: dependencies-{{ checksum "yarn.lock" }}
key: dependencies-{{ checksum "package-lock.json" }}
lint:
<<: *defaults
@ -25,8 +25,8 @@ jobs:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn lint
- dependencies-{{ checksum "package-lock.json" }}
- run: npm run lint
test:
<<: *defaults
@ -34,8 +34,8 @@ jobs:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn test --runInBand --no-cache
- dependencies-{{ checksum "package-lock.json" }}
- run: npm run test --runInBand --no-cache
coverage:
<<: *defaults
@ -43,8 +43,8 @@ jobs:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:coverage --runInBand --no-cache
- dependencies-{{ checksum "package-lock.json" }}
- run: npm run test:coverage --runInBand --no-cache
- save_cache:
key: coverage-{{ .Environment.CIRCLE_SHA1 }}
paths:
@ -56,13 +56,12 @@ jobs:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- dependencies-{{ checksum "package-lock.json" }}
- restore_cache:
keys:
- coverage-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn global add codecov
- run: yarn codecov
- run: npx codecov
workflows:
version: 2
test:

View File

@ -1,4 +0,0 @@
.git
node_modules
npm-debug.log
yarn-error.log

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
css

View File

@ -1,3 +1,4 @@
/flow-typed/*
/public/*
/node_modules/*
*.*
!*.ts
!*.tsx
/public/

76
.eslintrc Normal file
View File

@ -0,0 +1,76 @@
{
"env": {
"node": true,
"browser": true,
"jasmine": true,
"jest/globals": true
},
"extends": [
"plugin:import/typescript",
"plugin:import/errors",
"airbnb-typescript",
"@alxshelepenok/eslint-config",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"import",
"react",
"jest",
"@typescript-eslint",
"simple-import-sort"
],
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.ts",
"**/*.test.tsx",
"**/internal/**/*.ts"
]
}
],
"import/order": ["off"],
"import/no-internal-modules": ["off"],
"import/no-named-as-default": ["off"],
"import/prefer-default-export": ["off"],
"sort-keys": ["off"],
"camelcase": ["off"],
"comma-dangle": ["error", "always-multiline"],
"sort-imports": ["off"],
"no-restricted-globals": ["off"],
"@typescript-eslint/no-unused-vars": ["off"],
"@typescript-eslint/no-use-before-define": ["off"],
"@typescript-eslint/quotes": ["error", "double"],
"@typescript-eslint/naming-convention": ["error", {
"format": ["camelCase", "UPPER_CASE", "snake_case", "PascalCase"],
"leadingUnderscore": "allow",
"selector": "parameter"
}],
"react/static-property-placement": ["off"],
"react/prop-types": ["off"],
"simple-import-sort/imports": [
"error",
{
"groups": [
["react|path"],
["^\\u0000"],
["^@?\\w"],
["^[^. ]"],
["^\\."],
["^(images|!!raw-loader)"],
["w*(w*.*css)"]
]
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}

View File

@ -1,65 +0,0 @@
{
"parser": "babel-eslint",
"extends": "airbnb-base",
"env": {
"browser": true,
"node": true,
"es6": true,
"jest/globals": true
},
"plugins": [
"react",
"jest",
"jsx-a11y",
"import"
],
"globals": {
"graphql": true
},
"rules": {
"comma-dangle": 0,
"import/imports-first": 0,
"global-require": 0,
"class-methods-use-this": 0,
"arrow-body-style": [
2,
"as-needed"
],
"arrow-parens": [
"error",
"always"
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"no-debugger": 0,
"dot-notation": 0,
"no-console": 0,
"new-cap": 0,
"strict": 0,
"no-param-reassign": [
"error",
{
"props": false
}
],
"no-underscore-dangle": 0,
"no-use-before-define": 0,
"eol-last": 0,
"no-shadow": 0,
"quotes": [
2,
"single"
],
"jsx-quotes": [
0,
"prefer-single"
],
"react/jsx-no-undef": 1,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1
}
}

View File

@ -1,17 +0,0 @@
[ignore]
.*/node_modules/*
.*/public/*
[libs]
flow-typed
[options]
module.name_mapper.extension='scss' -> '<PROJECT_ROOT>/flow/css-module-stub.js'
server.max_workers=1
[strict]
nonstrict-import
unclear-type
untyped-type-import
unsafe-getters-setters
sketchy-null

6
.gitattributes vendored
View File

@ -1,6 +0,0 @@
/.github export-ignore
/.gitattributes export-ignore
/.editorconfig export-ignore
/.travis.yml export-ignore
**/*.js.snap export-ignore
/static/css export-ignore

BIN
.github/screenshot.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

View File

@ -1,32 +0,0 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn run lint
- run: yarn run test --runInBand --no-cache
env:
CI: true

33
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14.17
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run semantic-release

47
.gitignore vendored
View File

@ -1,8 +1,41 @@
node_modules/
.cache/
public/
npm-debug.log
.eslintcache
.gatsby-context.js
# logs
logs
*.log
# runtime data
.DS_Store
*.seed
*.pid
pids
# editors
.idea
gatsby-starter-lumen.iml
.vscode
# build
public
# cache
.cache
# directory for instrumented libs generated by jscoverage
lib-cov
# coverage directory used by tools like istanbul
coverage
# swc
.swc
# node-waf configuration
.lock-wscript
# eslint cache
.eslintcache
# dependency directory
node_modules
# only apps should have lockfiles
npm-shrinkwrap.json
yarn.lock

4
.husky/commint-msg Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint:commit

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint:staged

4
.husky/pre-push Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run test

6
.postcssrc Normal file
View File

@ -0,0 +1,6 @@
{
"plugins": {
"autoprefixer": {},
"lost": {}
}
}

10
.prettierignore Normal file
View File

@ -0,0 +1,10 @@
*.*
!*.json
!*.md
!*.mdx
!*.ts
!*.tsx
!*.yml
!*.js
/coverage/
/public/

4
.prettierrc Normal file
View File

@ -0,0 +1,4 @@
{
"arrowParens": "avoid",
"trailingComma": "all"
}

59
.releaserc Normal file
View File

@ -0,0 +1,59 @@
{
"branches": ["master"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{ "type": "chore", "release": "patch" },
{ "type": "chore", "scope": "release", "release": false },
{ "type": "refactor", "release": "patch" }
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "revert",
"section": "Reverts"
}
]
}
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "npm version ${nextRelease.version} --no-git-tag-version --allow-same-version",
}
],
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}

4
.stylelintignore Normal file
View File

@ -0,0 +1,4 @@
*.*
!*.css
!*.scss
/public/

View File

@ -1,25 +1,21 @@
{
"defaultSeverity": "error",
"extends": "stylelint-config-recommended-scss",
"plugins": ["stylelint-order"],
"rules": {
"color-named": "never",
"font-family-name-quotes": "always-where-required",
"font-family-no-missing-generic-family-keyword": null,
"font-weight-notation": "named-where-possible",
"function-url-no-scheme-relative": true,
"function-url-quotes": "always",
"string-quotes": "single",
"value-keyword-case": "lower",
"unit-blacklist": [],
"max-empty-lines": 2,
"max-empty-lines": 1,
"no-descending-specificity": true,
"no-duplicate-selectors": true,
"font-family-no-missing-generic-family-keyword": null,
"property-no-unknown": [true, {
"ignoreProperties": ["/^lost-/"]
}]
},
"ignoreFiles": [
"node_modules/*",
"src/assets/**"
],
"defaultSeverity": "error"
}
"order/order": ["custom-properties", "declarations"],
"order/properties-alphabetical-order": true,
"property-no-unknown": [true, { "ignoreProperties": ["/^lost-/"] }],
"string-quotes": "double",
"value-keyword-case": "lower"
}
}

View File

@ -1,14 +0,0 @@
language: node_js
node_js:
- '10'
install:
- npm install -g codecov
script:
- yarn install
- yarn lint
- yarn test:coverage --runInBand --no-cache
- yarn test --runInBand --no-cache
- codecov
cache:
directories:
- node_modules

View File

@ -1,45 +1,59 @@
# Change Log
All notable changes to this project will be documented in this file.
## [4.0.0] - 2021-10-24
- Upgrade to Gatsby 4.0
## [3.0.3] - 2019-07-25
### Added
- [Pull #321](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/321): Add title to <Icon /> for accessibility
- [Pull #319](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/319): Fixed invalid Telegram contact url
- [Pull #314](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/314): Hides the contact icon if empty in config
- [Pull #295](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/295): Add external link defaults for markdown
- [Pull #283](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/283): Add pathPrefix configuration
- [Pull #231](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/231): Add Twitter Card
- [Pull #210](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/210): Bug fixes
- [Pull #181](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/181): Add More Flow typings
- [Pull #178](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/178): Integrate Flow typing
- [Pull #321](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/321) - Add title to <Icon /> for accessibility
- [Pull #319](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/319) - Fixed invalid Telegram contact url
- [Pull #314](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/314) - Hides the contact icon if empty in config
- [Pull #295](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/295) - Add external link defaults for markdown
- [Pull #283](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/283) - Add pathPrefix configuration
- [Pull #231](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/231) - Add Twitter Card
- [Pull #210](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/210) - Bug fixes
- [Pull #181](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/181) - Add More Flow typings
- [Pull #178](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/178) - Integrate Flow typing
## [3.0.1] - 2019-03-03
### Added
- [Pull #118](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/118): feat: add gatsby-remark-autolink-headers support
- [Pull #99](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/99): Add lang="en" to <html>
- [Pull #95](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/95): Fixed url prop bug for <ReactDisqusComments />
- [Pull #94](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/94): Add isIndex prop to Sidebar in index-template
- [Pull #93](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/93): Upgrade React version to 16.8.1
- [Pull #89](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/89): Removed .gatsby-highlight selectors
- [Pull #118](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/118) - feat: add gatsby-remark-autolink-headers support
- [Pull #99](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/99) - Add lang="en" to <html>
- [Pull #95](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/95) - Fixed url prop bug for <ReactDisqusComments />
- [Pull #94](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/94) - Add isIndex prop to Sidebar in index-template
- [Pull #93](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/93) - Upgrade React version to 16.8.1
- [Pull #89](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/89) - Removed .gatsby-highlight selectors
## [3.0.0] - 2019-01-22
- Heavy refactoring
- Netlify CMS support
- Pagination support
- Reorganize content
## [2.0.4] - 2019-01-22
### Added
- [Pull #78](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/78): Upgrade gatsby-remark-prismjs
- [Pull #77](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/77): Add more service urls and tweak a layout
- [Pull #78](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/78) - Upgrade gatsby-remark-prismjs
- [Pull #77](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/77) - Add more service urls and tweak a layout
## [2.0.3] - 2018-11-09
### Added
- [Pull #70](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/70): Refactor the React logic and introduce Fragment
- [Pull #63](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/63): We want `yarn.lock` in git
- [Pull #56](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/56): Add Simple Netlify Deploy Support
- [Pull #55](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/55): Fix prefix-links error upon deploy
- [Pull #54](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/54): Improve RSS channel defaults
- [Pull #51](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/51): Decouple the node side code and the browser side code
- [Pull #50](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/50): Fixed two typos.
- [Pull #49](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/49): Fix twitter link in post details
- [Pull #70](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/70) - Refactor the React logic and introduce Fragment
- [Pull #63](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/63) - We want `yarn.lock` in git
- [Pull #56](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/56) - Add Simple Netlify Deploy Support
- [Pull #55](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/55) - Fix prefix-links error upon deploy
- [Pull #54](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/54) - Improve RSS channel defaults
- [Pull #51](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/51) - Decouple the node side code, and the browser side code
- [Pull #50](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/50) - Fixed two typos.
- [Pull #49](https://github.com/alxshelepenok/gatsby-starter-lumen/pull/49) - Fix twitter link in post details

View File

@ -3,7 +3,7 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
contributors and maintainers pledge to making participation in our project, and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities

View File

@ -1,19 +1,19 @@
# Contributing
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
## Pull Request Process
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
3. Increase the version numbers in any examples files, and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
## Code of Conduct
@ -21,7 +21,7 @@ Please note we have a code of conduct, please follow it in all your interactions
### Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
contributors and maintainers pledge to making participation in our project, and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
@ -32,21 +32,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting
### Our Responsibilities

View File

@ -1,6 +0,0 @@
FROM node:alpine
EXPOSE 8000
VOLUME /usr/src/app
WORKDIR /usr/src/app

View File

@ -1,21 +0,0 @@
FROM node:alpine as builder
RUN apk update && apk add --no-cache make git python3 autoconf g++ libc6-compat libjpeg-turbo-dev libpng-dev nasm libtool automake vips-dev
WORKDIR /usr/src/app
COPY . .
RUN yarn install
RUN yarn build
RUN rm -rf ./src ./node_modules /usr/local/lib/node_modules /usr/local/share/.cache/yarn/
RUN mkdir -p /run/nginx
FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /usr/src/app/public /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016-2021 Alexander Shelepenok
Copyright (c) 2016-2022 Alexander Shelepenok
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

166
README.md
View File

@ -1,5 +1,5 @@
<h1 align="center">
<img alt="Lumen" title="Lumen" src="https://github.com/alxshelepenok/gatsby-starter-lumen/blob/gatsby-v2/.github/logo.png" width="140"> </br>
<img alt="Lumen" title="Lumen" src="https://github.com/alxshelepenok/gatsby-starter-lumen/blob/master/.github/logo.png" width="140"> </br>
Lumen
</h1>
@ -12,113 +12,50 @@
</p>
## Table of contents
+ [Features](http://github.com/alxshelepenok/gatsby-starter-lumen#features)
+ [Web Performance Tests](http://github.com/alxshelepenok/gatsby-starter-lumen#web-performance-tests)
+ [Quick Start](http://github.com/alxshelepenok/gatsby-starter-lumen#quick-start)
+ [Deploy with Netlify](http://github.com/alxshelepenok/gatsby-starter-lumen#deploy-with-netlify)
+ [Folder Structure](http://github.com/alxshelepenok/gatsby-starter-lumen#folder-structure)
+ [Sponsors](http://github.com/alxshelepenok/gatsby-starter-lumen#sponsors)
+ [Contributors](http://github.com/alxshelepenok/gatsby-starter-lumen#contributors)
+ [License](http://github.com/alxshelepenok/gatsby-starter-lumen#license)
- [Features](http://github.com/alxshelepenok/gatsby-starter-lumen#features)
- [Quick Start](http://github.com/alxshelepenok/gatsby-starter-lumen#quick-start)
- [Folder Structure](http://github.com/alxshelepenok/gatsby-starter-lumen#folder-structure)
- [Sponsors](http://github.com/alxshelepenok/gatsby-starter-lumen#sponsors)
- [Contributors](http://github.com/alxshelepenok/gatsby-starter-lumen#contributors)
- [License](http://github.com/alxshelepenok/gatsby-starter-lumen#license)
## Features
+ [Lost Grid](http://lostgrid.org).
+ [Modern font stack](https://bitsofco.de/the-new-system-font-stack).
+ Beautiful typography inspired by [matejlatin/Gutenberg](https://github.com/matejlatin/Gutenberg).
+ Syntax highlighting in code blocks using [PrismJS](http://prismjs.com).
+ [Mobile-First](https://medium.com/@mrmrs_/mobile-first-css-48bc4cc3f60f) approach in development.
+ Archive organized by tags and categories.
+ Pagination support.
+ [Netlify CMS](https://www.netlifycms.org) support.
+ Google Analytics.
+ Disqus Comments.
+ [Flow](https://flow.org/) static type checking.
## Web Performance Tests
+ Lighthouse Report - [WebPageTest](https://www.webpagetest.org/result/190510_FE_3f2b13d0beed320f477467d433f56f43/)
+ Visual Comparison - [WebPageTest](https://www.webpagetest.org/video/compare.php?tests=190510_KZ_1228c343ccf04148619a5d0b89a41f71,190510_RE_b3bfad442f32c690a9f420fe46025b8d,190510_RS_3b5f0bff2d95161351dc6934cadbf1cf,190510_SC_5c458c451941f81b12911ccf4171a817,190510_63_52d5edd8743773815fbacb2e9c66d228,190510_AS_741b29f5af5a6e54980d82826d7bb5bb)
- Beautiful typography.
- Mobile-First approach in development.
- Syntax highlighting in code blocks using PrismJS.
- Pagination support.
## Quick Start
#### Create a Gatsby site
Use the Gatsby CLI to create a new site, specifying the Lumen starter.
```sh
# Create a new Gatsby site using the Lumen starter
gatsby new blog https://github.com/alxshelepenok/gatsby-starter-lumen
```
#### Start Developing
Navigate into your new sites directory and start it up.
```sh
cd blog
gatsby develop
```
#### Open the source code and start editing!
Your site is now running at `http://localhost:8000`!
Note: You'll also see a second link: `http://localhost:8000/___graphql`. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql).
Open the `blog` directory in your code editor of choice and edit `src/templates/index-template.js`. Save your changes and the browser will update in real time!
## Deploy with Netlify
[Netlify](https://netlify.com) CMS can run in any frontend web environment, but the quickest way to try it out is by running it on a pre-configured starter site with Netlify. Use the button below to build and deploy your own copy of the repository:
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/alxshelepenok/gatsby-starter-lumen" target="_blank"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"></a>
After clicking that button, youll authenticate with GitHub and choose a repository name. Netlify will then automatically create a repository in your GitHub account with a copy of the files from the template. Next, it will build and deploy the new site on Netlify, bringing you to the site dashboard when the build is complete. Next, youll need to set up Netlifys Identity service to authorize users to log in to the CMS.
## Deploy to Github Pages
To deploy to github pages, simply do the following:
- Ensure that your `package.json` file correctly reflects where this repo lives
- Change the `pathPrefix` in your `config.js`
- Run the standard deploy command
```sh
yarn deploy
```
#### Access Locally
```
$ git clone https://github.com/[GITHUB_USERNAME]/[REPO_NAME].git
$ cd [REPO_NAME]
$ yarn
$ yarn develop
```
To test the CMS locally, you'll need run a production build of the site:
```
$ yarn build
$ gatsby serve
$ npm install
$ npm run start
```
## Folder Structure
```
└── content
├── pages
└── posts
└── static
├── admin
└── media
.
├── internal
│   ├── definitions
│   ├── gatsby
│   │   ├── constants
│   │   ├── queries
│   │   ├── types
│   │   └── utils
│   └── testing
│   └── __mocks__
└── src
├── assets
│   └── scss
│   ├── base
│   └── mixins
├── cms
│   └── preview-templates
├── components
│   ├── Feed
│   ├── Icon
│   ├── Image
│   ├── Layout
│   ├── Page
│   ├── Pagination
@ -134,9 +71,18 @@ $ gatsby serve
│   ├── Copyright
│   └── Menu
├── constants
├── hooks
├── templates
│   ├── CategoriesTemplate
│   ├── CategoryTemplate
│   ├── IndexTemplate
│   ├── NotFoundTemplate
│   ├── PageTemplate
│   ├── PostTemplate
│   ├── TagsTemplate
│   └── TagTemplate
├── types
└── utils
```
## Sponsors
@ -144,35 +90,41 @@ $ gatsby serve
Development efforts are supported by the sponsors. I'm very grateful for their donations, please check them out!
| <a href="https://www.browserstack.com" target="_blank"><img width="250" src="https://gist.githubusercontent.com/alxshelepenok/94cbc6dc4a2cb8167ee188ddab33893a/raw/f869c9a67db7bfd5440a49178195efe811d8f7d8/browserstack.svg"></a> | <a href="https://sentry.io" target="_blank"><img width="250" src="https://gist.githubusercontent.com/alxshelepenok/1a74dbe123b2f7ad538f41c94e2da0a2/raw/aaeb3b38ef0873bae1f23f3605696b4e65362e67/sentry.svg"></a> |
:---: |:---: |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
## Contributors
Thanks goes to these wonderful people!
[<img alt="vzhou842" src="https://avatars3.githubusercontent.com/u/10209814?v=4&s=117" width="117">](https://github.com/vzhou842) |[<img alt="alehel" src="https://avatars2.githubusercontent.com/u/22277624?v=4&s=117" width="117">](https://github.com/alehel) |[<img alt="abisz" src="https://avatars3.githubusercontent.com/u/7287780?v=4&s=117" width="117">](https://github.com/abisz) |[<img alt="remi-bruguier" src="https://avatars0.githubusercontent.com/u/7031328?v=4&s=117" width="117">](https://github.com/remi-bruguier) |[<img alt="mariolopjr" src="https://avatars3.githubusercontent.com/u/2067324?v=4&s=117" width="117">](https://github.com/mariolopjr) |[<img alt="ihororlovskyi" src="https://avatars3.githubusercontent.com/u/7969737?v=4&s=117" width="117">](https://github.com/ihororlovskyi) |
:---: |:---: |:---: |:---: |:---: |:---: |
[vzhou842](https://github.com/vzhou842) |[alehel](https://github.com/alehel) |[abisz](https://github.com/abisz) |[remi-bruguier](https://github.com/remi-bruguier) |[mariolopjr](https://github.com/mariolopjr) |[ihororlovskyi](https://github.com/ihororlovskyi) |
Thanks to these wonderful people!
[<img alt="timbroder" src="https://avatars2.githubusercontent.com/u/121503?v=4&s=117" width="117">](https://github.com/timbroder) |[<img alt="vinnymac" src="https://avatars0.githubusercontent.com/u/1832781?v=4&s=117" width="117">](https://github.com/vinnymac) |[<img alt="yodahuang" src="https://avatars2.githubusercontent.com/u/11242657?v=4&s=117" width="117">](https://github.com/yodahuang) |[<img alt="axelclark" src="https://avatars1.githubusercontent.com/u/16856928?v=4&s=117" width="117">](https://github.com/axelclark) |[<img alt="BigTony666" src="https://avatars2.githubusercontent.com/u/29159357?v=4&s=117" width="117">](https://github.com/BigTony666) |[<img alt="stigrune" src="https://avatars0.githubusercontent.com/u/1052748?v=4&s=117" width="117">](https://github.com/stigrune) |
:---: |:---: |:---: |:---: |:---: |:---: |
[timbroder](https://github.com/timbroder) |[vinnymac](https://github.com/vinnymac) |[yodahuang](https://github.com/yodahuang) |[axelclark](https://github.com/axelclark) |[BigTony666](https://github.com/BigTony666) |[stigrune](https://github.com/stigrune) |
| [<img alt="vzhou842" src="https://avatars.githubusercontent.com/u/10209814?v=4&s=117" width="117">](https://github.com/vzhou842) | [<img alt="abisz" src="https://avatars.githubusercontent.com/u/7287780?v=4&s=117" width="117">](https://github.com/abisz) | [<img alt="remi-bruguier" src="https://avatars.githubusercontent.com/u/7031328?v=4&s=117" width="117">](https://github.com/remi-bruguier) | [<img alt="sparklesam" src="https://avatars.githubusercontent.com/u/10287995?v=4&s=117" width="117">](https://github.com/sparklesam) | [<img alt="vinnymac" src="https://avatars.githubusercontent.com/u/1832781?v=4&s=117" width="117">](https://github.com/vinnymac) | [<img alt="mariolopjr" src="https://avatars.githubusercontent.com/u/2067324?v=4&s=117" width="117">](https://github.com/mariolopjr) |
| :------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: |
| [vzhou842](https://github.com/vzhou842) | [abisz](https://github.com/abisz) | [remi-bruguier](https://github.com/remi-bruguier) | [sparklesam](https://github.com/sparklesam) | [vinnymac](https://github.com/vinnymac) | [mariolopjr](https://github.com/mariolopjr) |
[<img alt="ybbarng" src="https://avatars2.githubusercontent.com/u/1793950?v=4&s=117" width="117">](https://github.com/ybbarng) |[<img alt="marktani" src="https://avatars1.githubusercontent.com/u/1780597?v=4&s=117" width="117">](https://github.com/marktani) |[<img alt="concreted" src="https://avatars2.githubusercontent.com/u/4016897?v=4&s=117" width="117">](https://github.com/concreted) |[<img alt="chmac" src="https://avatars0.githubusercontent.com/u/690997?v=4&s=117" width="117">](https://github.com/chmac) |[<img alt="charandas" src="https://avatars2.githubusercontent.com/u/542168?v=4&s=117" width="117">](https://github.com/charandas) |[<img alt="marcelabomfim" src="https://avatars0.githubusercontent.com/u/6224547?v=4&s=117" width="117">](https://github.com/marcelabomfim) |
:---: |:---: |:---: |:---: |:---: |:---: |
[ybbarng](https://github.com/ybbarng) |[marktani](https://github.com/marktani) |[concreted](https://github.com/concreted) |[chmac](https://github.com/chmac) |[charandas](https://github.com/charandas) |[marcelabomfim](https://github.com/marcelabomfim) |
| [<img alt="ihororlovskyi" src="https://avatars.githubusercontent.com/u/7969737?v=4&s=117" width="117">](https://github.com/ihororlovskyi) | [<img alt="rtveitch" src="https://avatars.githubusercontent.com/u/25228001?v=4&s=117" width="117">](https://github.com/rtveitch) | [<img alt="timbroder" src="https://avatars.githubusercontent.com/u/121503?v=4&s=117" width="117">](https://github.com/timbroder) | [<img alt="yodahuang" src="https://avatars.githubusercontent.com/u/11242657?v=4&s=117" width="117">](https://github.com/yodahuang) | [<img alt="axelclark" src="https://avatars.githubusercontent.com/u/16856928?v=4&s=117" width="117">](https://github.com/axelclark) | [<img alt="tonyz0x0" src="https://avatars.githubusercontent.com/u/29159357?v=4&s=117" width="117">](https://github.com/tonyz0x0) |
| :---------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: |
| [ihororlovskyi](https://github.com/ihororlovskyi) | [rtveitch](https://github.com/rtveitch) | [timbroder](https://github.com/timbroder) | [yodahuang](https://github.com/yodahuang) | [axelclark](https://github.com/axelclark) | [tonyz0x0](https://github.com/tonyz0x0) |
[<img alt="zollillo" src="https://avatars3.githubusercontent.com/u/8833904?v=4&s=117" width="117">](https://github.com/zollillo) |[<img alt="codejet" src="https://avatars3.githubusercontent.com/u/802203?v=4&s=117" width="117">](https://github.com/codejet) |[<img alt="reed-jones" src="https://avatars0.githubusercontent.com/u/11511864?v=4&s=117" width="117">](https://github.com/reed-jones) |[<img alt="rtveitch" src="https://avatars3.githubusercontent.com/u/25228001?v=4&s=117" width="117">](https://github.com/rtveitch) |[<img alt="SayakaOno" src="https://avatars0.githubusercontent.com/u/33141219?v=4&s=117" width="117">](https://github.com/SayakaOno) |[<img alt="swapnilmishra" src="https://avatars2.githubusercontent.com/u/875450?v=4&s=117" width="117">](https://github.com/swapnilmishra) |
:---: |:---: |:---: |:---: |:---: |:---: |
[zollillo](https://github.com/zollillo) |[codejet](https://github.com/codejet) |[reed-jones](https://github.com/reed-jones) |[rtveitch](https://github.com/rtveitch) |[SayakaOno](https://github.com/SayakaOno) |[swapnilmishra](https://github.com/swapnilmishra) |
| [<img alt="tranlehaiquan" src="https://avatars.githubusercontent.com/u/17347993?v=4&s=117" width="117">](https://github.com/tranlehaiquan) | [<img alt="seandearnaley" src="https://avatars.githubusercontent.com/u/5084762?v=4&s=117" width="117">](https://github.com/seandearnaley) | [<img alt="stigrune" src="https://avatars.githubusercontent.com/u/1052748?v=4&s=117" width="117">](https://github.com/stigrune) | [<img alt="ybbarng" src="https://avatars.githubusercontent.com/u/1793950?v=4&s=117" width="117">](https://github.com/ybbarng) | [<img alt="marktani" src="https://avatars.githubusercontent.com/u/1780597?v=4&s=117" width="117">](https://github.com/marktani) | [<img alt="concreted" src="https://avatars.githubusercontent.com/u/4016897?v=4&s=117" width="117">](https://github.com/concreted) |
| :----------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------: |
| [tranlehaiquan](https://github.com/tranlehaiquan) | [seandearnaley](https://github.com/seandearnaley) | [stigrune](https://github.com/stigrune) | [ybbarng](https://github.com/ybbarng) | [marktani](https://github.com/marktani) | [concreted](https://github.com/concreted) |
[<img alt="vvasiloud" src="https://avatars1.githubusercontent.com/u/5891530?v=4&s=117" width="117">](https://github.com/vvasiloud) |[<img alt="vstoms" src="https://avatars2.githubusercontent.com/u/22646173?v=4&s=117" width="117">](https://github.com/vstoms) |[<img alt="wichopy" src="https://avatars2.githubusercontent.com/u/24414632?v=4&s=117" width="117">](https://github.com/wichopy) |[<img alt="yairmark" src="https://avatars1.githubusercontent.com/u/28291977?v=4&s=117" width="117">](https://github.com/yairmark) |
:---: |:---: |:---: |:---: |
[vvasiloud](https://github.com/vvasiloud) |[vstoms](https://github.com/vstoms) |[wichopy](https://github.com/wichopy) |[yairmark](https://github.com/yairmark) |
| [<img alt="gipcompany" src="https://avatars.githubusercontent.com/u/130989?v=4&s=117" width="117">](https://github.com/gipcompany) | [<img alt="chmac" src="https://avatars.githubusercontent.com/u/690997?v=4&s=117" width="117">](https://github.com/chmac) | [<img alt="charandas" src="https://avatars.githubusercontent.com/u/542168?v=4&s=117" width="117">](https://github.com/charandas) | [<img alt="ibraheemdev" src="https://avatars.githubusercontent.com/u/34988408?v=4&s=117" width="117">](https://github.com/ibraheemdev) | [<img alt="sladinji" src="https://avatars.githubusercontent.com/u/8300799?v=4&s=117" width="117">](https://github.com/sladinji) | [<img alt="marcelabomfim" src="https://avatars.githubusercontent.com/u/6224547?v=4&s=117" width="117">](https://github.com/marcelabomfim) |
| :--------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: |
| [gipcompany](https://github.com/gipcompany) | [chmac](https://github.com/chmac) | [charandas](https://github.com/charandas) | [ibraheemdev](https://github.com/ibraheemdev) | [sladinji](https://github.com/sladinji) | [marcelabomfim](https://github.com/marcelabomfim) |
| [<img alt="zollillo" src="https://avatars.githubusercontent.com/u/8833904?v=4&s=117" width="117">](https://github.com/zollillo) | [<img alt="codejet" src="https://avatars.githubusercontent.com/u/802203?v=4&s=117" width="117">](https://github.com/codejet) | [<img alt="reed-jones" src="https://avatars.githubusercontent.com/u/11511864?v=4&s=117" width="117">](https://github.com/reed-jones) | [<img alt="SayakaOno" src="https://avatars.githubusercontent.com/u/33141219?v=4&s=117" width="117">](https://github.com/SayakaOno) | [<img alt="Puterism" src="https://avatars.githubusercontent.com/u/2542730?v=4&s=117" width="117">](https://github.com/Puterism) | [<img alt="swapnilmishra" src="https://avatars.githubusercontent.com/u/875450?v=4&s=117" width="117">](https://github.com/swapnilmishra) |
| :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: |
| [zollillo](https://github.com/zollillo) | [codejet](https://github.com/codejet) | [reed-jones](https://github.com/reed-jones) | [SayakaOno](https://github.com/SayakaOno) | [Puterism](https://github.com/Puterism) | [swapnilmishra](https://github.com/swapnilmishra) |
| [<img alt="vvasiloud" src="https://avatars.githubusercontent.com/u/5891530?v=4&s=117" width="117">](https://github.com/vvasiloud) | [<img alt="lune-sta" src="https://avatars.githubusercontent.com/u/1887764?v=4&s=117" width="117">](https://github.com/lune-sta) | [<img alt="yaaooo" src="https://avatars.githubusercontent.com/u/16640310?v=4&s=117" width="117">](https://github.com/yaaooo) | [<img alt="vstoms" src="https://avatars.githubusercontent.com/u/22646173?v=4&s=117" width="117">](https://github.com/vstoms) | [<img alt="wichopy" src="https://avatars.githubusercontent.com/u/24414632?v=4&s=117" width="117">](https://github.com/wichopy) | [<img alt="yairmark" src="https://avatars.githubusercontent.com/u/28291977?v=4&s=117" width="117">](https://github.com/yairmark) |
| :-------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: |
| [vvasiloud](https://github.com/vvasiloud) | [lune-sta](https://github.com/lune-sta) | [yaaooo](https://github.com/yaaooo) | [vstoms](https://github.com/vstoms) | [wichopy](https://github.com/wichopy) | [yairmark](https://github.com/yairmark) |
## License
The MIT License (MIT)
Copyright (c) 2016-2021 Alexander Shelepenok
Copyright (c) 2016-2022 Alexander Shelepenok
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,50 +0,0 @@
'use strict';
module.exports = {
url: 'https://lumen.netlify.com',
pathPrefix: '/',
title: 'Blog by John Doe',
subtitle: 'Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.',
copyright: '© All rights reserved.',
disqusShortname: '',
postsPerPage: 4,
googleAnalyticsId: 'UA-73379983-2',
useKatex: false,
menu: [
{
label: 'Articles',
path: '/'
},
{
label: 'About me',
path: '/pages/about'
},
{
label: 'Contact me',
path: '/pages/contacts'
}
],
author: {
name: 'John Doe',
photo: '/photo.jpg',
bio: 'Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.',
contacts: {
email: '',
facebook: '#',
telegram: '#',
twitter: '#',
github: '#',
rss: '',
vkontakte: '',
linkedin: '#',
instagram: '#',
line: '',
gitlab: '',
weibo: '',
codepen: '',
youtube: '',
soundcloud: '',
medium: '',
}
}
};

46
content/config.json Normal file
View File

@ -0,0 +1,46 @@
{
"title": "Blog by John Doe",
"url": "https://lumen.alxshelepenok.com",
"subtitle": "Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.",
"copyright": "© All rights reserved.",
"googleAnalyticsId": "UA-73379983-2",
"disqusShortname": "",
"postsLimit": 4,
"pathPrefix": "/",
"menu": [
{
"label": "Articles",
"path": "/"
},
{
"label": "About me",
"path": "/pages/about"
},
{
"label": "Contact me",
"path": "/pages/contacts"
}
],
"author": {
"name": "John Doe",
"photo": "/photo.jpg",
"bio": "Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.",
"contacts": {
"rss": "",
"email": "",
"github": "#",
"facebook": "#",
"telegram": "#",
"twitter": "#",
"linkedin": "#",
"instagram": "#",
"line": "",
"weibo": "",
"gitlab": "",
"medium": "",
"youtube": "",
"codepen": "",
"soundcloud": ""
}
}
}

View File

@ -1,13 +1,13 @@
---
title: "About me"
template: "page"
socialImage: "/media/image-2.jpg"
socialImage: "/notebook.jpg"
---
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.
![Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.](/media/image-2.jpg)
![Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.](/notebook.jpg)
*Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.*
_Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi._
Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus
Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus

View File

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -1,24 +1,24 @@
---
title: "Contact me"
template: "page"
socialImage: "/media/image-4.jpg"
socialImage: "/book.jpg"
---
Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.
![Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.](/media/image-4.jpg)
![Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.](/book.jpg)
*Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.*
_Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi._
## Header Level 2
Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
+ **Lorem ipsum** dolor sit amet, consectetuer adipiscing elit.
+ Aliquam tincidunt mauris eu risus.
+ Vestibulum auctor dapibus neque.
- **Lorem ipsum** dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
- Vestibulum auctor dapibus neque.
### Header Level 3
@ -28,4 +28,4 @@ Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut
#### Header Level 4
Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.

BIN
content/photo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -9,13 +9,13 @@ tags:
- "Handwriting"
- "Learning to write"
description: "Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum."
socialImage: "/media/image-2.jpg"
socialImage: "/media/notebook.jpg"
---
Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum.
![Nulla faucibus vestibulum eros in tempus. Vestibulum tempor imperdiet velit nec dapibus](/media/image-2.jpg)
![Nulla faucibus vestibulum eros in tempus. Vestibulum tempor imperdiet velit nec dapibus](/media/notebook.jpg)
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis.
Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -6,21 +6,21 @@ draft: false
slug: "the-origins-of-social-stationery-lettering"
category: "Design Culture"
description: "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante."
socialImage: "/media/image-3.jpg"
socialImage: "/media/square.jpg"
---
**Pellentesque habitant morbi tristique** senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. *Aenean ultricies mi vitae est.* Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
**Pellentesque habitant morbi tristique** senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. _Aenean ultricies mi vitae est._ Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. [Donec non enim](#) in turpis pulvinar facilisis.
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. [Donec non enim](#) in turpis pulvinar facilisis.
![Nulla faucibus vestibulum eros in tempus. Vestibulum tempor imperdiet velit nec dapibus](/media/image-3.jpg)
![Nulla faucibus vestibulum eros in tempus. Vestibulum tempor imperdiet velit nec dapibus](/media/square.jpg)
## Header Level 2
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Aliquam tincidunt mauris eu risus.
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat.
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat.
<figure>
<blockquote>
@ -33,8 +33,8 @@ Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque i
### Header Level 3
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Aliquam tincidunt mauris eu risus.
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
@ -48,4 +48,4 @@ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac tu
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
![Test SVG](/media/cpu.svg)
![Test SVG](/media/logo.svg)

View File

@ -0,0 +1,50 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 300 300">
<title>SVG Logo</title>
<desc>Designed for the SVG Logo Contest in 2006 by Harvey Rayner, and adopted by W3C in 2009. It is available under the Creative Commons license for those who have an SVG product or who are using SVG on their site.</desc>
<metadata id="license">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/">
<cc:Work rdf:about="">
<dc:title>SVG Logo</dc:title>
<dc:date>14-08-2009</dc:date>
<dc:creator>
<cc:Agent><dc:title>W3C</dc:title></cc:Agent>
<cc:Agent><dc:title>Harvey Rayner, designer</dc:title></cc:Agent>
</dc:creator>
<dc:description>See document description</dc:description>
<cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.5/"/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/">
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
<cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
<cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/>
<cc:prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/>
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<g id="SVG" fill="#ffffff" transform="scale(2) translate(20,79)">
<path id="S" d="M 5.482,31.319 C2.163,28.001 0.109,23.419 0.109,18.358 C0.109,8.232 8.322,0.024 18.443,0.024 C28.569,0.024 36.782,8.232 36.782,18.358 L26.042,18.358 C26.042,14.164 22.638,10.765 18.443,10.765 C14.249,10.765 10.850,14.164 10.850,18.358 C10.850,20.453 11.701,22.351 13.070,23.721 L13.075,23.721 C14.450,25.101 15.595,25.500 18.443,25.952 L18.443,25.952 C23.509,26.479 28.091,28.006 31.409,31.324 L31.409,31.324 C34.728,34.643 36.782,39.225 36.782,44.286 C36.782,54.412 28.569,62.625 18.443,62.625 C8.322,62.625 0.109,54.412 0.109,44.286 L10.850,44.286 C10.850,48.480 14.249,51.884 18.443,51.884 C22.638,51.884 26.042,48.480 26.042,44.286 C26.042,42.191 25.191,40.298 23.821,38.923 L23.816,38.923 C22.441,37.548 20.468,37.074 18.443,36.697 L18.443,36.692 C13.533,35.939 8.800,34.638 5.482,31.319 L5.482,31.319 L5.482,31.319 Z"/>
<path id="V" d="M 73.452,0.024 L60.482,62.625 L49.742,62.625 L36.782,0.024 L47.522,0.024 L55.122,36.687 L62.712,0.024 L73.452,0.024 Z"/>
<path id="G" d="M 91.792,25.952 L110.126,25.952 L110.126,44.286 L110.131,44.286 C110.131,54.413 101.918,62.626 91.792,62.626 C81.665,62.626 73.458,54.413 73.458,44.286 L73.458,44.286 L73.458,18.359 L73.453,18.359 C73.453,8.233 81.665,0.025 91.792,0.025 C101.913,0.025 110.126,8.233 110.126,18.359 L99.385,18.359 C99.385,14.169 95.981,10.765 91.792,10.765 C87.597,10.765 84.198,14.169 84.198,18.359 L84.198,44.286 L84.198,44.286 C84.198,48.481 87.597,51.880 91.792,51.880 C95.981,51.880 99.380,48.481 99.385,44.291 L99.385,44.286 L99.385,36.698 L91.792,36.698 L91.792,25.952 L91.792,25.952 Z"/>
</g>
</defs>
<path id="base" fill="#000" d="M8.5,150 H291.5 V250 C291.5,273.5 273.5,291.5 250,291.5 H50 C26.5,291.5 8.5,273.5 8.5,250 Z"/>
<g stroke-width="38.0086" stroke="#000">
<g id="svgstar" transform="translate(150, 150)">
<path id="svgbar" fill="#ffb13b" d="M-84.1487,-15.8513 a22.4171,22.4171 0 1 0 0,31.7026 h168.2974 a22.4171,22.4171 0 1 0 0,-31.7026 Z"/>
<use xlink:href="#svgbar" transform="rotate(45)"/>
<use xlink:href="#svgbar" transform="rotate(90)"/>
<use xlink:href="#svgbar" transform="rotate(135)"/>
</g>
</g>
<use xlink:href="#svgstar"/>
<use xlink:href="#base" opacity="0.85"/>
<use xlink:href="#SVG"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 350 KiB

View File

@ -7,25 +7,24 @@ slug: "a-brief-history-of-typography"
category: "Design Inspiration"
tags:
- "Linotype"
- "Monotype"
- "History of typography"
- "Helvetica"
- "History of typography"
description: "Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat."
socialImage: "/media/image-0.jpg"
socialImage: "/media/cherry.jpg"
---
**Pellentesque habitant morbi tristique** senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. *Aenean ultricies mi vitae est.* Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
**Pellentesque habitant morbi tristique** senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. _Aenean ultricies mi vitae est._ Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. [Donec non enim](#) in turpis pulvinar facilisis.
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. [Donec non enim](#) in turpis pulvinar facilisis.
![Nulla faucibus vestibulum eros in tempus. Vestibulum tempor imperdiet velit nec dapibus](/media/image-0.jpg)
![Nulla faucibus vestibulum eros in tempus. Vestibulum tempor imperdiet velit nec dapibus](/media/cherry.jpg)
## Header Level 2
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Aliquam tincidunt mauris eu risus.
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat.
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat.
<figure>
<blockquote>
@ -38,8 +37,8 @@ Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque i
### Header Level 3
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Aliquam tincidunt mauris eu risus.
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
@ -51,4 +50,4 @@ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac tu
}
```
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.

View File

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 645 KiB

View File

@ -70,7 +70,7 @@ In 1462, during a conflict between two archbishops, Mainz was sacked by archbish
In January 1465, Gutenberg's achievements were recognized and he was given the title Hofmann (gentleman of the court) by von Nassau. This honor included a stipend, an annual court outfit, as well as 2,180 litres of grain and 2,000 litres of wine tax-free. It is believed he may have moved back to Mainz around this time, but this is not certain.
***
---
Gutenberg died in 1468 and was buried in the Franciscan church at Mainz, his contributions largely unknown. This church and the cemetery were later destroyed, and Gutenberg's grave is now lost.
@ -82,7 +82,7 @@ Gutenberg's early printing process, and what tests he may have made with movable
![Movable metal type, and composing stick, descended from Gutenberg's press. Photo by Willi Heidelbach. Licensed under CC BY 2.5](/media/movable-type.jpg)
*Movable metal type, and composing stick, descended from Gutenberg's press. Photo by Willi Heidelbach. Licensed under CC BY 2.5*
_Movable metal type, and composing stick, descended from Gutenberg's press. Photo by Willi Heidelbach. Licensed under CC BY 2.5_
Gutenberg's technique of making movable type remains unclear. In the following decades, punches and copper matrices became standardized in the rapidly disseminating printing presses across Europe. Whether Gutenberg used this sophisticated technique or a somewhat primitive version has been the subject of considerable debate.
@ -107,4 +107,4 @@ A 1568 history by Hadrianus Junius of Holland claims that the basic idea of the
The 19th century printer and typefounder Fournier Le Jeune suggested that Gutenberg might not have been using type cast with a reusable matrix, but possibly wooden types that were carved individually. A similar suggestion was made by Nash in 2004. This remains possible, albeit entirely unproven.
It has also been questioned whether Gutenberg used movable types at all. In 2004, Italian professor Bruno Fabbiani claimed that examination of the 42-line Bible revealed an overlapping of letters, suggesting that Gutenberg did not in fact use movable type (individual cast characters) but rather used whole plates made from a system somewhat like a modern typewriter, whereby the letters were stamped successively into the plate and then printed. However, most specialists regard the occasional overlapping of type as caused by paper movement over pieces of type of slightly unequal height.
It has also been questioned whether Gutenberg used movable types at all. In 2004, Italian professor Bruno Fabbiani claimed that examination of the 42-line Bible revealed an overlapping of letters, suggesting that Gutenberg did not in fact use movable type (individual cast characters) but rather used whole plates made from a system somewhat like a modern typewriter, whereby the letters were stamped successively into the plate and then printed. However, most specialists regard the occasional overlapping of type as caused by paper movement over pieces of type of slightly unequal height.

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

Before

Width:  |  Height:  |  Size: 546 KiB

After

Width:  |  Height:  |  Size: 546 KiB

View File

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View File

@ -32,7 +32,7 @@ The first printed books were, at first, perceived as inferior to the handwritten
![42-line-bible.jpg](/media/42-line-bible.jpg)
*The 42Line Bible, printed by Gutenberg.*
_The 42Line Bible, printed by Gutenberg._
But, through this transition, the book lost a large part of its humanity. The machine took over most of the process but craftsmanship was still a part of it. The typefaces were cut manually by the first punch cutters. The paper was made by hand. The illustrations and ornaments were still being hand drawn. These were the remains of the craftsmanship that went almost extinct in the times of Eric Gill.
@ -42,7 +42,7 @@ The first transition took away a large part of humanity from written communicati
> In the new computer age the proliferation of typefaces and type manipulations represents a new level of visual pollution threatening our culture. Out of thousands of typefaces, all we need are a few basic ones, and trash the rest.
>
— Massimo Vignelli
> — Massimo Vignelli
Typography is not about typefaces. Its not about what looks best, its about what feels right. What communicates the message best. Typography, in its essence, is about the message. “Typographical design should perform optically what the speaker creates through voice and gesture of his thoughts.”, as El Lissitzky, a famous Russian typographer, put it.
@ -69,7 +69,7 @@ Weve come close to “perfection” in the last five centuries. The letters a
![type-through-time.jpg](/media/type-through-time.jpg)
*Type through 5 centuries.*
_Type through 5 centuries._
We lost a part of ourselves because of this chase after perfection. We forgot about the craftsmanship along the way. And the worst part is that we dont care. The transition to the digital age made that clear. We choose typefaces like clueless zombies. Theres no meaning in our work. Type sizes, leading, margins… Its all just a few clicks or lines of code. The message isnt important anymore. Theres no more “why” behind the “what”.
@ -77,4 +77,4 @@ We lost a part of ourselves because of this chase after perfection. We forgot ab
Human beings arent perfect. Perfection is something that will always elude us. There will always be a small part of humanity in everything we do. No matter how small that part, we should make sure that it transcends the limits of the medium. We have to think about the message first. What typeface should we use and why? Does the typeface match the message and what we want to communicate with it? What will be the leading and why? Will there be more typefaces in our design? On what ground will they be combined? What makes our design unique and why? This is the part of humanity that is left in typography. It might be the last part. Are we really going to give it up?
*Originally published by [Matej Latin](http://matejlatin.co.uk/) on [Medium](https://medium.com/design-notes/humane-typography-in-the-digital-age-9bd5c16199bd?ref=webdesignernews.com#.lygo82z0x).*
_Originally published by [Matej Latin](http://matejlatin.co.uk/) on [Medium](https://medium.com/design-notes/humane-typography-in-the-digital-age-9bd5c16199bd?ref=webdesignernews.com#.lygo82z0x)._

View File

Before

Width:  |  Height:  |  Size: 656 KiB

After

Width:  |  Height:  |  Size: 656 KiB

View File

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -1,12 +0,0 @@
version: '2'
services:
web:
image: alxshelepenok/gatsby-starter-lumen:development
build:
context: ./
dockerfile: Dockerfile.development
tty: true
volumes:
- ./:/usr/src/app
ports:
- "8000:8000"

View File

@ -1,12 +0,0 @@
version: '2'
services:
web:
image: alxshelepenok/gatsby-starter-lumen:production
build:
context: ./
dockerfile: Dockerfile.production
tty: true
volumes:
- ./:/usr/src/app
ports:
- "80:80"

View File

@ -1,23 +0,0 @@
// flow-typed signature: a00cf41b09af4862583460529d5cfcb9
// flow-typed version: c6154227d1/classnames_v2.x.x/flow_>=v0.104.x
type $npm$classnames$Classes =
| string
| { [className: string]: *, ... }
| false
| void
| null;
declare module "classnames" {
declare module.exports: (
...classes: Array<$npm$classnames$Classes | $npm$classnames$Classes[]>
) => string;
}
declare module "classnames/bind" {
declare module.exports: $Exports<"classnames">;
}
declare module "classnames/dedupe" {
declare module.exports: $Exports<"classnames">;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,80 +0,0 @@
// flow-typed signature: f7a01ad2bfbdcbd9940769b886f4bb48
// flow-typed version: <<STUB>>/netlify-cms-app_v2.12.18/flow_v0.129.0
/**
* This is an autogenerated libdef stub for:
*
* 'netlify-cms-app'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'netlify-cms-app' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'netlify-cms-app/dist/esm/extensions' {
declare module.exports: any;
}
declare module 'netlify-cms-app/dist/esm' {
declare module.exports: any;
}
declare module 'netlify-cms-app/dist/esm/locales' {
declare module.exports: any;
}
declare module 'netlify-cms-app/dist/netlify-cms-app' {
declare module.exports: any;
}
declare module 'netlify-cms-app/src/extensions' {
declare module.exports: any;
}
declare module 'netlify-cms-app/src' {
declare module.exports: any;
}
declare module 'netlify-cms-app/src/locales' {
declare module.exports: any;
}
// Filename aliases
declare module 'netlify-cms-app/dist/esm/extensions.js' {
declare module.exports: $Exports<'netlify-cms-app/dist/esm/extensions'>;
}
declare module 'netlify-cms-app/dist/esm/index' {
declare module.exports: $Exports<'netlify-cms-app/dist/esm'>;
}
declare module 'netlify-cms-app/dist/esm/index.js' {
declare module.exports: $Exports<'netlify-cms-app/dist/esm'>;
}
declare module 'netlify-cms-app/dist/esm/locales.js' {
declare module.exports: $Exports<'netlify-cms-app/dist/esm/locales'>;
}
declare module 'netlify-cms-app/dist/netlify-cms-app.js' {
declare module.exports: $Exports<'netlify-cms-app/dist/netlify-cms-app'>;
}
declare module 'netlify-cms-app/src/extensions.js' {
declare module.exports: $Exports<'netlify-cms-app/src/extensions'>;
}
declare module 'netlify-cms-app/src/index' {
declare module.exports: $Exports<'netlify-cms-app/src'>;
}
declare module 'netlify-cms-app/src/index.js' {
declare module.exports: $Exports<'netlify-cms-app/src'>;
}
declare module 'netlify-cms-app/src/locales.js' {
declare module.exports: $Exports<'netlify-cms-app/src/locales'>;
}

View File

@ -1,67 +0,0 @@
// flow-typed signature: fe55856ebce3b66ab6c0a8a6de309111
// flow-typed version: <<STUB>>/react-disqus-comments_v1.4.0/flow_v0.129.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-disqus-comments'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-disqus-comments' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-disqus-comments/build/components/DisqusThread' {
declare module.exports: any;
}
declare module 'react-disqus-comments/build/main' {
declare module.exports: any;
}
declare module 'react-disqus-comments/dist/react-disqus-thread' {
declare module.exports: any;
}
declare module 'react-disqus-comments/dist/react-disqus-thread.min' {
declare module.exports: any;
}
declare module 'react-disqus-comments/lib/components/DisqusThread' {
declare module.exports: any;
}
declare module 'react-disqus-comments/lib/main' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-disqus-comments/build/components/DisqusThread.js' {
declare module.exports: $Exports<'react-disqus-comments/build/components/DisqusThread'>;
}
declare module 'react-disqus-comments/build/main.js' {
declare module.exports: $Exports<'react-disqus-comments/build/main'>;
}
declare module 'react-disqus-comments/dist/react-disqus-thread.js' {
declare module.exports: $Exports<'react-disqus-comments/dist/react-disqus-thread'>;
}
declare module 'react-disqus-comments/dist/react-disqus-thread.min.js' {
declare module.exports: $Exports<'react-disqus-comments/dist/react-disqus-thread.min'>;
}
declare module 'react-disqus-comments/lib/components/DisqusThread.js' {
declare module.exports: $Exports<'react-disqus-comments/lib/components/DisqusThread'>;
}
declare module 'react-disqus-comments/lib/main.js' {
declare module.exports: $Exports<'react-disqus-comments/lib/main'>;
}

View File

@ -1,39 +0,0 @@
// flow-typed signature: 6f9a156495d9cbd0d3987c641280e19f
// flow-typed version: <<STUB>>/react-helmet_v6.1.0/flow_v0.129.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-helmet'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-helmet' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-helmet/es/Helmet' {
declare module.exports: any;
}
declare module 'react-helmet/lib/Helmet' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-helmet/es/Helmet.js' {
declare module.exports: $Exports<'react-helmet/es/Helmet'>;
}
declare module 'react-helmet/lib/Helmet.js' {
declare module.exports: $Exports<'react-helmet/lib/Helmet'>;
}

View File

@ -1,79 +0,0 @@
// flow-typed signature: 7bac6c05f7415881918d3d510109e739
// flow-typed version: fce74493f0/react-test-renderer_v16.x.x/flow_>=v0.104.x
// Type definitions for react-test-renderer 16.x.x
// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer
type ReactComponentInstance = React$Component<any>;
type ReactTestRendererJSON = {
type: string,
props: { [propName: string]: any, ... },
children: null | ReactTestRendererJSON[],
...
};
type ReactTestRendererTree = ReactTestRendererJSON & {
nodeType: "component" | "host",
instance: ?ReactComponentInstance,
rendered: null | ReactTestRendererTree,
...
};
type ReactTestInstance = {
instance: ?ReactComponentInstance,
type: string,
props: { [propName: string]: any, ... },
parent: null | ReactTestInstance,
children: Array<ReactTestInstance | string>,
find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance,
findByType(type: React$ElementType): ReactTestInstance,
findByProps(props: { [propName: string]: any, ... }): ReactTestInstance,
findAll(
predicate: (node: ReactTestInstance) => boolean,
options?: { deep: boolean, ... }
): ReactTestInstance[],
findAllByType(
type: React$ElementType,
options?: { deep: boolean, ... }
): ReactTestInstance[],
findAllByProps(
props: { [propName: string]: any, ... },
options?: { deep: boolean, ... }
): ReactTestInstance[],
...
};
type TestRendererOptions = { createNodeMock(element: React$Element<any>): any, ... };
declare module "react-test-renderer" {
declare export type ReactTestRenderer = {
toJSON(): null | ReactTestRendererJSON,
toTree(): null | ReactTestRendererTree,
unmount(nextElement?: React$Element<any>): void,
update(nextElement: React$Element<any>): void,
getInstance(): ?ReactComponentInstance,
root: ReactTestInstance,
...
};
declare type Thenable = { then(resolve: () => mixed, reject?: () => mixed): mixed, ... };
declare function create(
nextElement: React$Element<any>,
options?: TestRendererOptions
): ReactTestRenderer;
declare function act(callback: () => void | Promise<void>): Thenable;
}
declare module "react-test-renderer/shallow" {
declare export default class ShallowRenderer {
static createRenderer(): ShallowRenderer;
getMountedInstance(): ReactTestInstance;
getRenderOutput<E: React$Element<any>>(): E;
getRenderOutput(): React$Element<any>;
render(element: React$Element<any>, context?: any): void;
unmount(): void;
}
}

View File

@ -1,8 +0,0 @@
// @flow strict
type CSSModule = {
[key: string]: string,
};
const emptyCSSModule: CSSModule = {};
export default emptyCSSModule;

View File

@ -1,4 +0,0 @@
'use strict';
require('./src/assets/scss/init.scss');
require('./static/css/prismjs/theme.min.css');

1
gatsby-browser.ts Normal file
View File

@ -0,0 +1 @@
import "./src/assets/scss/main.scss";

View File

@ -1,244 +0,0 @@
'use strict';
const siteConfig = require('./config.js');
const postCssPlugins = require('./postcss-config.js');
module.exports = {
pathPrefix: siteConfig.pathPrefix,
siteMetadata: {
url: siteConfig.url,
title: siteConfig.title,
subtitle: siteConfig.subtitle,
copyright: siteConfig.copyright,
disqusShortname: siteConfig.disqusShortname,
menu: siteConfig.menu,
author: siteConfig.author
},
plugins: [
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/static`,
name: 'assets'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/static/media`,
name: 'media'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/content`,
name: 'pages'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'css',
path: `${__dirname}/static/css`
}
},
{
resolve: 'gatsby-plugin-feed',
options: {
query: `
{
site {
siteMetadata {
site_url: url
title
description: subtitle
}
}
}
`,
feeds: [{
serialize: ({ query: { site, allMarkdownRemark } }) => (
allMarkdownRemark.edges.map((edge) => ({
...edge.node.frontmatter,
description: edge.node.frontmatter.description,
date: edge.node.frontmatter.date,
url: site.siteMetadata.site_url + edge.node.fields.slug,
guid: site.siteMetadata.site_url + edge.node.fields.slug,
custom_elements: [{ 'content:encoded': edge.node.html }]
}))
),
query: `
{
allMarkdownRemark(
limit: 1000,
sort: { order: DESC, fields: [frontmatter___date] },
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
edges {
node {
html
fields {
slug
}
frontmatter {
title
date
template
draft
description
}
}
}
}
}
`,
output: '/rss.xml',
title: siteConfig.title
}]
}
},
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
'gatsby-remark-relative-images',
{
resolve: 'gatsby-remark-katex',
options: {
strict: 'ignore'
}
},
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 960,
withWebp: true
}
},
{
resolve: 'gatsby-remark-responsive-iframe',
options: { wrapperStyle: 'margin-bottom: 1.0725rem' }
},
'gatsby-remark-autolink-headers',
'gatsby-remark-prismjs',
'gatsby-remark-copy-linked-files',
'gatsby-remark-smartypants',
'gatsby-remark-external-links'
]
}
},
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
'gatsby-plugin-netlify',
{
resolve: 'gatsby-plugin-netlify-cms',
options: {
modulePath: `${__dirname}/src/cms/index.js`
}
},
{
resolve: 'gatsby-plugin-google-gtag',
options: {
trackingIds: [siteConfig.googleAnalyticsId],
pluginConfig: {
head: true
}
}
},
{
resolve: 'gatsby-plugin-sitemap',
options: {
query: `
{
site {
siteMetadata {
siteUrl: url
}
}
allSitePage(
filter: {
path: { regex: "/^(?!/404/|/404.html|/dev-404-page/)/" }
}
) {
edges {
node {
path
}
}
}
}
`,
output: '/sitemap.xml',
serialize: ({ site, allSitePage }) => allSitePage.edges.map((edge) => ({
url: site.siteMetadata.siteUrl + edge.node.path,
changefreq: 'daily',
priority: 0.7
}))
}
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: siteConfig.title,
short_name: siteConfig.title,
start_url: '/',
background_color: '#FFF',
theme_color: '#F7A046',
display: 'standalone',
icon: 'static/photo.jpg'
},
},
{
resolve: 'gatsby-plugin-offline',
options: {
workboxConfig: {
runtimeCaching: [{
// Use cacheFirst since these don't need to be revalidated (same RegExp
// and same reason as above)
urlPattern: /(\.js$|\.css$|[^:]static\/)/,
handler: 'CacheFirst',
},
{
// page-data.json files, static query results and app-data.json
// are not content hashed
urlPattern: /^https?:.*\/page-data\/.*\.json/,
handler: 'StaleWhileRevalidate',
},
{
// Add runtime caching of various other page resources
urlPattern: /^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
handler: 'StaleWhileRevalidate',
},
{
// Google Fonts CSS (doesn't end in .css so we need to specify it)
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
handler: 'StaleWhileRevalidate',
},
],
},
},
},
'gatsby-plugin-catch-links',
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-sass',
options: {
implementation: require('sass'),
postCssPlugins: [...postCssPlugins],
cssLoaderOptions: {
camelCase: false
}
}
},
{
resolve: '@sentry/gatsby',
options: {
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1
}
},
'gatsby-plugin-flow',
'gatsby-plugin-optimize-svgs'
]
};

199
gatsby-config.ts Normal file
View File

@ -0,0 +1,199 @@
import path from "path";
import config from "./content/config.json";
import * as types from "./internal/gatsby/types";
export default {
pathPrefix: config.pathPrefix,
siteMetadata: {
url: config.url,
menu: config.menu,
title: config.title,
author: config.author,
subtitle: config.subtitle,
copyright: config.copyright,
postsLimit: config.postsLimit,
disqusShortname: config.disqusShortname,
},
plugins: [
{
resolve: "gatsby-source-filesystem",
options: {
name: "content",
path: path.resolve("content"),
},
},
{
resolve: "gatsby-plugin-feed",
options: {
query: `
{
site {
siteMetadata {
url
}
}
}
`,
feeds: [
{
serialize: ({
query: { site, allMarkdownRemark },
}: {
query: {
site: {
siteMetadata: {
url: string;
};
};
allMarkdownRemark: {
edges: Array<types.Edge>;
};
};
}) =>
allMarkdownRemark.edges.map(({ node }) => ({
...node.frontmatter,
date: node?.frontmatter?.date,
description: node?.frontmatter?.description,
url: site.siteMetadata.url + node?.fields?.slug,
guid: site.siteMetadata.url + node?.fields?.slug,
custom_elements: [{ "content:encoded": node.html }],
})),
query: `
{
allMarkdownRemark(
limit: 1000,
sort: { order: DESC, fields: [frontmatter___date] },
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
edges {
node {
html
fields {
slug
}
frontmatter {
date
title
description
}
}
}
}
}
`,
output: "/rss.xml",
title: config.title,
},
],
},
},
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
{
resolve: "gatsby-remark-images",
options: {
maxWidth: 960,
withWebp: true,
},
},
{
resolve: "gatsby-remark-responsive-iframe",
options: { wrapperStyle: "margin-bottom: 1.0725rem" },
},
"gatsby-remark-autolink-headers",
"gatsby-remark-prismjs",
"gatsby-remark-copy-linked-files",
"gatsby-remark-smartypants",
"gatsby-remark-external-links",
],
},
},
"gatsby-transformer-sharp",
"gatsby-plugin-sharp",
{
resolve: "gatsby-plugin-google-gtag",
options: {
trackingIds: [config.googleAnalyticsId],
pluginConfig: {
head: true,
},
},
},
{
resolve: "gatsby-plugin-sitemap",
options: {
query: `
{
site {
siteMetadata {
siteUrl: url
}
}
allSitePage(
filter: {
path: { regex: "/^(?!/404/|/404.html|/dev-404-page/)/" }
}
) {
nodes {
path
}
}
}
`,
},
},
{
resolve: "gatsby-plugin-manifest",
options: {
name: config.title,
short_name: config.title,
theme_color: "hsl(31, 92%, 62%)",
background_color: "hsl(0, 0%, 100%)",
icon: "content/photo.jpg",
display: "standalone",
start_url: "/",
},
},
{
resolve: "gatsby-plugin-offline",
options: {
workboxConfig: {
runtimeCaching: [
{
urlPattern: /(\.js$|\.css$|[^:]static\/)/,
handler: "CacheFirst",
},
{
urlPattern: /^https?:.*\/page-data\/.*\.json/,
handler: "StaleWhileRevalidate",
},
{
urlPattern:
/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
handler: "StaleWhileRevalidate",
},
{
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
handler: "StaleWhileRevalidate",
},
],
},
},
},
{
resolve: "@sentry/gatsby",
options: {
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1,
},
},
"gatsby-plugin-image",
"gatsby-plugin-catch-links",
"gatsby-plugin-react-helmet",
"gatsby-plugin-optimize-svgs",
"gatsby-plugin-sass",
],
};

View File

@ -1,4 +0,0 @@
'use strict';
exports.createPages = require('./gatsby/create-pages');
exports.onCreateNode = require('./gatsby/on-create-node');

3
gatsby-node.ts Normal file
View File

@ -0,0 +1,3 @@
export { createPages } from "./internal/gatsby/create-pages";
export { onCreateNode } from "./internal/gatsby/on-create-node";
export { onCreateWebpackConfig } from "./internal/gatsby/on-create-webpack-config";

View File

@ -1,3 +0,0 @@
'use strict';
exports.onRenderBody = require('./gatsby/on-render-body.js');

View File

@ -1,74 +0,0 @@
'use strict';
const path = require('path');
const _ = require('lodash');
const createCategoriesPages = require('./pagination/create-categories-pages.js');
const createTagsPages = require('./pagination/create-tags-pages.js');
const createPostsPages = require('./pagination/create-posts-pages.js');
const createPages = async ({ graphql, actions }) => {
const { createPage } = actions;
// 404
createPage({
path: '/404',
component: path.resolve('./src/templates/not-found-template.js')
});
// Tags list
createPage({
path: '/tags',
component: path.resolve('./src/templates/tags-list-template.js')
});
// Categories list
createPage({
path: '/categories',
component: path.resolve('./src/templates/categories-list-template.js')
});
// Posts and pages from markdown
const result = await graphql(`
{
allMarkdownRemark(
filter: { frontmatter: { draft: { ne: true } } }
) {
edges {
node {
frontmatter {
template
}
fields {
slug
}
}
}
}
}
`);
const { edges } = result.data.allMarkdownRemark;
_.each(edges, (edge) => {
if (_.get(edge, 'node.frontmatter.template') === 'page') {
createPage({
path: edge.node.fields.slug,
component: path.resolve('./src/templates/page-template.js'),
context: { slug: edge.node.fields.slug }
});
} else if (_.get(edge, 'node.frontmatter.template') === 'post') {
createPage({
path: edge.node.fields.slug,
component: path.resolve('./src/templates/post-template.js'),
context: { slug: edge.node.fields.slug }
});
}
});
// Feeds
await createTagsPages(graphql, actions);
await createCategoriesPages(graphql, actions);
await createPostsPages(graphql, actions);
};
module.exports = createPages;

View File

@ -1,38 +0,0 @@
'use strict';
const _ = require('lodash');
const { createFilePath } = require('gatsby-source-filesystem');
const onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions;
if (node.internal.type === 'MarkdownRemark') {
if (typeof node.frontmatter.slug !== 'undefined') {
const dirname = getNode(node.parent).relativeDirectory;
createNodeField({
node,
name: 'slug',
value: `/${dirname}/${node.frontmatter.slug}`
});
} else {
const value = createFilePath({ node, getNode });
createNodeField({
node,
name: 'slug',
value
});
}
if (node.frontmatter.tags) {
const tagSlugs = node.frontmatter.tags.map((tag) => `/tag/${_.kebabCase(tag)}/`);
createNodeField({ node, name: 'tagSlugs', value: tagSlugs });
}
if (node.frontmatter.category) {
const categorySlug = `/category/${_.kebabCase(node.frontmatter.category)}/`;
createNodeField({ node, name: 'categorySlug', value: categorySlug });
}
}
};
module.exports = onCreateNode;

View File

@ -1,22 +0,0 @@
'use strict';
const React = require('react');
const siteConfig = require('../config.js');
// eslint-disable-next-line import/no-webpack-loader-syntax, import/no-unresolved
const katexStylesheet = require('!css-loader!../static/css/katex/katex.min.css');
const onRenderBody = ({ setHeadComponents }) => {
const { useKatex } = siteConfig;
if (useKatex) {
setHeadComponents([
React.createElement('style', {
key: 'katex-inline-stylesheet',
dangerouslySetInnerHTML: { __html: katexStylesheet.toString() }
})
]);
}
};
module.exports = onRenderBody;

View File

@ -1,45 +0,0 @@
'use strict';
const _ = require('lodash');
const path = require('path');
const siteConfig = require('../../config.js');
module.exports = async (graphql, actions) => {
const { createPage } = actions;
const { postsPerPage } = siteConfig;
const result = await graphql(`
{
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
group(field: frontmatter___category) {
fieldValue
totalCount
}
}
}
`);
_.each(result.data.allMarkdownRemark.group, (category) => {
const numPages = Math.ceil(category.totalCount / postsPerPage);
const categorySlug = `/category/${_.kebabCase(category.fieldValue)}`;
for (let i = 0; i < numPages; i += 1) {
createPage({
path: i === 0 ? categorySlug : `${categorySlug}/page/${i}`,
component: path.resolve('./src/templates/category-template.js'),
context: {
category: category.fieldValue,
currentPage: i,
postsLimit: postsPerPage,
postsOffset: i * postsPerPage,
prevPagePath: i <= 1 ? categorySlug : `${categorySlug}/page/${i - 1}`,
nextPagePath: `${categorySlug}/page/${i + 1}`,
hasPrevPage: i !== 0,
hasNextPage: i !== numPages - 1
}
});
}
});
};

View File

@ -1,35 +0,0 @@
'use strict';
const path = require('path');
const siteConfig = require('../../config.js');
module.exports = async (graphql, actions) => {
const { createPage } = actions;
const result = await graphql(`
{
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) { totalCount }
}
`);
const { postsPerPage } = siteConfig;
const numPages = Math.ceil(result.data.allMarkdownRemark.totalCount / postsPerPage);
for (let i = 0; i < numPages; i += 1) {
createPage({
path: i === 0 ? '/' : `/page/${i}`,
component: path.resolve('./src/templates/index-template.js'),
context: {
currentPage: i,
postsLimit: postsPerPage,
postsOffset: i * postsPerPage,
prevPagePath: i <= 1 ? '/' : `/page/${i - 1}`,
nextPagePath: `/page/${i + 1}`,
hasPrevPage: i !== 0,
hasNextPage: i !== numPages - 1
}
});
}
};

View File

@ -1,45 +0,0 @@
'use strict';
const _ = require('lodash');
const path = require('path');
const siteConfig = require('../../config.js');
module.exports = async (graphql, actions) => {
const { createPage } = actions;
const { postsPerPage } = siteConfig;
const result = await graphql(`
{
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
group(field: frontmatter___tags) {
fieldValue
totalCount
}
}
}
`);
_.each(result.data.allMarkdownRemark.group, (tag) => {
const numPages = Math.ceil(tag.totalCount / postsPerPage);
const tagSlug = `/tag/${_.kebabCase(tag.fieldValue)}`;
for (let i = 0; i < numPages; i += 1) {
createPage({
path: i === 0 ? tagSlug : `${tagSlug}/page/${i}`,
component: path.resolve('./src/templates/tag-template.js'),
context: {
tag: tag.fieldValue,
currentPage: i,
postsLimit: postsPerPage,
postsOffset: i * postsPerPage,
prevPagePath: i <= 1 ? tagSlug : `${tagSlug}/page/${i - 1}`,
nextPagePath: `${tagSlug}/page/${i + 1}`,
hasPrevPage: i !== 0,
hasNextPage: i !== numPages - 1
}
});
}
});
};

4
internal/definitions/scss.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module "*.scss" {
const styles: { [className: string]: string };
export = styles;
}

View File

@ -0,0 +1,2 @@
export { default as routes } from "./routes";
export { default as templates } from "./templates";

View File

@ -0,0 +1,10 @@
const routes = Object.freeze({
categoriesListRoute: "/categories",
categoryRoute: "/category",
tagsListRoute: "/tags",
notFoundRoute: "/404",
tagRoute: "/tag",
indexRoute: "/",
});
export default routes;

View File

@ -0,0 +1,22 @@
import path from "path";
const templates = Object.freeze({
indexTemplate: path.resolve(
"./src/templates/IndexTemplate/IndexTemplate.tsx",
),
notFoundTemplate: path.resolve(
"./src/templates/NotFoundTemplate/NotFoundTemplate.tsx",
),
categoryTemplate: path.resolve(
"./src/templates/CategoryTemplate/CategoryTemplate.tsx",
),
categoriesTemplate: path.resolve(
"./src/templates/CategoriesTemplate/CategoriesTemplate.tsx",
),
tagTemplate: path.resolve("./src/templates/TagTemplate/TagTemplate.tsx"),
tagsTemplate: path.resolve("./src/templates/TagsTemplate/TagsTemplate.tsx"),
pageTemplate: path.resolve("./src/templates/PageTemplate/PageTemplate.tsx"),
postTemplate: path.resolve("./src/templates/PostTemplate/PostTemplate.tsx"),
});
export default templates;

View File

@ -0,0 +1,150 @@
import { GatsbyNode } from "gatsby";
import * as constants from "./constants";
import * as queries from "./queries";
import * as utils from "./utils";
type CreateWithPagination = (parameters: {
limit: number;
group?: string;
template: string;
total: number;
page: number;
path: string;
}) => void;
const getPaginationPath = (basePath: string, page: number): string =>
[basePath === "/" ? "" : basePath, "page", page].join("/");
const createPages: GatsbyNode["createPages"] = async ({ graphql, actions }) => {
const { createPage } = actions;
createPage({
path: constants.routes.notFoundRoute,
component: constants.templates.notFoundTemplate,
context: {},
});
createPage({
path: constants.routes.tagsListRoute,
component: constants.templates.tagsTemplate,
context: {},
});
createPage({
path: constants.routes.categoriesListRoute,
component: constants.templates.categoriesTemplate,
context: {},
});
const pages = await queries.pagesQuery(graphql);
pages.forEach(edge => {
const { node } = edge;
if (node?.frontmatter?.template === "page" && node?.fields?.slug) {
createPage({
path: node.fields.slug,
component: constants.templates.pageTemplate,
context: { slug: node.fields.slug },
});
} else if (node?.frontmatter?.template === "post" && node?.fields?.slug) {
createPage({
path: node.fields.slug,
component: constants.templates.postTemplate,
context: { slug: node.fields.slug },
});
}
});
const createWithPagination: CreateWithPagination = ({
group,
template,
page,
path,
total,
limit,
}) => {
createPage({
component: template,
path: page === 0 ? path : getPaginationPath(path, page),
context: {
group,
limit,
offset: page * limit,
pagination: {
currentPage: page,
prevPagePath:
page <= 1 ? path : getPaginationPath(path, utils.decrement(page)),
nextPagePath: getPaginationPath(path, utils.increment(page)),
hasNextPage: page !== utils.decrement(total),
hasPrevPage: page !== 0,
},
},
});
};
const categories = await queries.categoriesQuery(graphql);
const metadata = await queries.metadataQuery(graphql);
const postsLimit = metadata?.postsLimit ?? 1;
categories.forEach(category => {
const total = Math.ceil(category.totalCount / postsLimit);
const path = utils.concat(
constants.routes.categoryRoute,
"/",
utils.toKebabCase(category.fieldValue),
);
for (let page = 0; page < total; page += 1) {
createWithPagination({
limit: postsLimit,
group: category.fieldValue,
template: constants.templates.categoryTemplate,
total,
page,
path,
});
}
});
const tags = await queries.tagsQuery(graphql);
tags.forEach(tag => {
const path = utils.concat(
constants.routes.tagRoute,
"/",
utils.toKebabCase(tag.fieldValue),
);
const total = Math.ceil(tag.totalCount / postsLimit);
for (let page = 0; page < total; page += 1) {
createWithPagination({
limit: postsLimit,
group: tag.fieldValue,
template: constants.templates.tagTemplate,
total,
page,
path,
});
}
});
const path = constants.routes.indexRoute;
const template = constants.templates.indexTemplate;
const posts = await queries.postsQuery(graphql);
const total = Math.ceil((posts?.edges?.length ?? 0) / postsLimit);
for (let page = 0; page < total; page += 1) {
createWithPagination({
limit: postsLimit,
template,
total,
page,
path,
});
}
};
export { createPages };

View File

@ -0,0 +1,58 @@
import { GatsbyNode } from "gatsby";
import { createFilePath } from "gatsby-source-filesystem";
import * as constants from "./constants";
import * as types from "./types";
import * as utils from "./utils";
const onCreateNode: GatsbyNode["onCreateNode"] = ({
node,
actions,
getNode,
}) => {
const { createNodeField } = actions;
if (node.internal.type === "MarkdownRemark") {
const { frontmatter, parent }: types.Edge["node"] = node;
const { tags, category, slug } = frontmatter || {};
if (slug) {
const dirname = parent && getNode(parent)?.relativeDirectory;
const value =
typeof dirname === "string"
? utils.concat("/", dirname, "/", slug)
: utils.concat("/", slug);
createNodeField({ node, name: "slug", value });
} else {
const value = createFilePath({ node, getNode });
createNodeField({ node, name: "slug", value });
}
if (tags) {
const value = tags.map(tag =>
utils.concat(
constants.routes.tagRoute,
"/",
utils.toKebabCase(tag),
"/",
),
);
createNodeField({ node, name: "tagSlugs", value });
}
if (category) {
const value = utils.concat(
constants.routes.categoryRoute,
"/",
utils.toKebabCase(category),
"/",
);
createNodeField({ node, name: "categorySlug", value });
}
}
};
export { onCreateNode };

View File

@ -0,0 +1,25 @@
import path from "path";
import { CreateWebpackConfigArgs } from "gatsby";
import { CompilerOptions } from "typescript";
import { compilerOptions } from "../../tsconfig.json";
const onCreateWebpackConfig = (
(options: Pick<CompilerOptions, "paths">) =>
({ actions }: CreateWebpackConfigArgs) => {
actions.setWebpackConfig({
resolve: {
alias: Object.entries(options.paths || []).reduce(
(aliases, [name, [target]]) => ({
...aliases,
[name]: path.resolve(target),
}),
{},
),
},
});
}
)(compilerOptions);
export { onCreateWebpackConfig };

View File

@ -0,0 +1,32 @@
import { CreatePagesArgs } from "gatsby";
interface CategoriesQueryResult {
allMarkdownRemark: {
group: Array<{
fieldValue: string;
totalCount: number;
}>;
};
}
const categoriesQuery = async (graphql: CreatePagesArgs["graphql"]) => {
const result = await graphql<CategoriesQueryResult>(`
{
allMarkdownRemark(
filter: {
frontmatter: { template: { eq: "post" }, draft: { ne: true } }
}
sort: { order: DESC, fields: [frontmatter___date] }
) {
group(field: frontmatter___category) {
fieldValue
totalCount
}
}
}
`);
return result?.data?.allMarkdownRemark?.group ?? [];
};
export default categoriesQuery;

View File

@ -0,0 +1,5 @@
export { default as categoriesQuery } from "./categories-query";
export { default as metadataQuery } from "./metadata-query";
export { default as postsQuery } from "./posts-query";
export { default as pagesQuery } from "./pages-query";
export { default as tagsQuery } from "./tags-query";

View File

@ -0,0 +1,25 @@
import { CreatePagesArgs } from "gatsby";
interface MetadataQueryResult {
site: {
siteMetadata: {
postsLimit?: number;
};
};
}
const metadataQuery = async (graphql: CreatePagesArgs["graphql"]) => {
const result = await graphql<MetadataQueryResult>(`
query SiteMetaData {
site {
siteMetadata {
postsLimit
}
}
}
`);
return result?.data?.site.siteMetadata ?? {};
};
export default metadataQuery;

View File

@ -0,0 +1,32 @@
import { CreatePagesArgs } from "gatsby";
import * as types from "../types";
export interface PagesQueryResult {
allMarkdownRemark: {
edges?: Array<types.Edge>;
};
}
const pagesQuery = async (graphql: CreatePagesArgs["graphql"]) => {
const result = await graphql<PagesQueryResult>(`
{
allMarkdownRemark(filter: { frontmatter: { draft: { ne: true } } }) {
edges {
node {
frontmatter {
template
}
fields {
slug
}
}
}
}
}
`);
return result?.data?.allMarkdownRemark?.edges ?? [];
};
export default pagesQuery;

View File

@ -0,0 +1,29 @@
import { CreatePagesArgs } from "gatsby";
import * as types from "../types";
export interface PostsQueryResult {
allMarkdownRemark: {
edges?: Array<types.Edge>;
};
}
const postsQuery = async (graphql: CreatePagesArgs["graphql"]) => {
const result = await graphql<PostsQueryResult>(`
{
allMarkdownRemark(filter: { frontmatter: { draft: { ne: true } } }) {
edges {
node {
fields {
slug
}
}
}
}
}
`);
return result?.data?.allMarkdownRemark;
};
export default postsQuery;

View File

@ -0,0 +1,31 @@
import { CreatePagesArgs } from "gatsby";
interface TagsQueryResult {
allMarkdownRemark: {
group: Array<{
fieldValue: string;
totalCount: number;
}>;
};
}
const tagsQuery = async (graphql: CreatePagesArgs["graphql"]) => {
const result = await graphql<TagsQueryResult>(`
{
allMarkdownRemark(
filter: {
frontmatter: { template: { eq: "post" }, draft: { ne: true } }
}
) {
group(field: frontmatter___tags) {
fieldValue
totalCount
}
}
}
`);
return result?.data?.allMarkdownRemark?.group || [];
};
export default tagsQuery;

View File

@ -0,0 +1,27 @@
import { Node as GatsbyNode } from "gatsby";
interface Frontmatter {
date?: string;
slug?: string;
template?: string;
category?: string;
description?: string;
tags?: Array<string>;
}
interface Fields {
slug?: string;
categorySlug?: string;
tagSlugs?: Array<string>;
}
interface Node extends GatsbyNode {
fields?: Fields;
frontmatter?: Frontmatter;
}
interface Edge {
node: Node;
}
export default Edge;

View File

@ -0,0 +1 @@
export type { default as Edge } from "./edge";

View File

@ -0,0 +1,3 @@
const concat = (...args: string[]): string => args.join("");
export default concat;

View File

@ -0,0 +1,3 @@
const decrement = (n: number): number => n - 1;
export default decrement;

View File

@ -0,0 +1,3 @@
const increment = (n: number): number => n + 1;
export default increment;

View File

@ -0,0 +1,4 @@
export { default as toKebabCase } from "./to-kebab-case";
export { default as decrement } from "./decrement";
export { default as increment } from "./increment";
export { default as concat } from "./concat";

View File

@ -0,0 +1,10 @@
const toKebabCase = (str: string = ""): string =>
str
.toLowerCase()
.replace(/[^\w\s]/gi, "")
.split(" ")
.join("-")
.split("_")
.join("-");
export default toKebabCase;

View File

@ -0,0 +1,4 @@
import edges from "./edges";
import group from "./group";
export default { group, edges };

View File

@ -0,0 +1,8 @@
import contacts from "./contacts";
export default {
photo: "/photo.jpg",
bio: "Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.",
name: "John Doe",
contacts,
};

View File

@ -0,0 +1,7 @@
export default {
rss: "#",
email: "#",
github: "#",
twitter: "#",
telegram: "#",
};

View File

@ -0,0 +1,38 @@
export default [
{
node: {
id: "08870ea6-bdc8-4ec6-bf72-1e7d4488eb72",
fields: {
slug: "/posts/perfecting-the-art-of-perfection",
categorySlug: "/typography",
},
frontmatter: {
date: "2016-09-01",
description:
"An Essay on Typography by Eric Gill takes the reader back to the year 1930. The year when a conflict between two worlds came to its term. The machines of the industrial world finally took over the handicrafts.",
category: "typography",
title: "Perfecting the Art of Perfection",
template: "post",
},
html: "<p>An Essay on Typography by Eric Gill takes the reader back to the year 1930. The year when a conflict between two worlds came to its term. The machines of the industrial world finally took over the handicrafts.</p>",
},
},
{
node: {
id: "066adc91-f87a-4e57-9fef-7a677baf5c1d",
fields: {
slug: "/posts/the-birth-of-movable-type",
categorySlug: "/design-inspiration",
},
frontmatter: {
date: "2016-09-01",
description:
"German inventor Johannes Gutenberg developed a method of movable type and used it to create one of the western worlds first major printed books, the “FortyTwoLine” Bible.",
category: "design inspiration",
title: "Johannes Gutenberg: The Birth of Movable Type",
template: "post",
},
html: "<p>German inventor Johannes Gutenberg developed a method of movable type and used it to create one of the western worlds first major printed books, the “FortyTwoLine” Bible.</p>",
},
},
];

Some files were not shown because too many files have changed in this diff Show More