diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..52de427 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,28 @@ +module.exports = { + "env": { + "browser": true, + "es6": true, + }, + "plugins": [ + "react", + ], + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 2018, + "ecmaFeatures": { + "jsx": true, + }, + }, + "rules": { + "react/jsx-uses-vars": 2, + 'no-console': [ + 'warn', + { + allow: [ + 'error', + 'warn', + ], + }, + ], + } +} diff --git a/.gitignore b/.gitignore index 2b66e8a..aa27ced 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,9 @@ - +node_modules/ +public +.gatsby-context.js +.DS_Store +.intermediate-representation/ +.cache/ +yarn.lock +package-lock.json deploy.js diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5149b1b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "trailingComma": "es5", + "semi": false, + "singleQuote": true +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..acfec92 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +sudo: required +language: node_js + +cache: + directories: + - node_modules + +dist: trusty + +jobs: + include: + - stage: test + node_js: lts/* + script: + - yarn lint + - yarn build --prefix-paths + - stage: performance_budget + node_js: lts/* + if: type = pull_request + script: + - ./scripts/budget.sh + # Define the release stage that runs semantic-release + - stage: release + if: branch = master + node_js: lts/* + script: skip + deploy: + provider: script + skip_cleanup: true + script: + - npx semantic-release + - stage: deploy + if: branch = master + node_js: lts/* + script: yarn build --prefix-paths + deploy: + provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN + local_dir: public + on: + branch: master diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9156779 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2019 Maxence Poutord + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..12cc097 --- /dev/null +++ b/README.md @@ -0,0 +1,209 @@ +[![Build Status](https://travis-ci.org/maxpou/gatsby-starter-morning-dew.svg?branch=master)](https://travis-ci.org/maxpou/gatsby-starter-morning-dew) [![Netlify Status](https://api.netlify.com/api/v1/badges/d68027bd-19b5-44fd-a2a3-d1f05fc8201e/deploy-status)](https://app.netlify.com/sites/gatsby-starter-morning-dew/deploys) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) [![Maintainability](https://api.codeclimate.com/v1/badges/e09f1ac1a5cdb2987a6f/maintainability)](https://codeclimate.com/github/maxpou/gatsby-starter-morning-dew/maintainability) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) + + +# gatsby-starter-morning-dew + +:rocket: A gatsby-starter-morning-dew is a Gatsby starter to build lightning-fast websites! +:dizzy: You can also use gatsby-starter-morning-dew as a Gatsby Theme + +[Demo website.](https://maxpou.github.io/gatsby-starter-morning-dew/) + +![screenshot](https://i.imgur.com/Tv4SFqT.png) + +## Features + +- [:purple_heart: Gatsby v2](https://www.gatsbyjs.org/) / React 16 +- :mag: SEO optimized +- :love_letter: Write posts/pages in Markdown or [MDX](https://mdxjs.com/) + - :art: Code syntax highlight + - :books: Multilang support (blog post) +- :iphone: Mobile Friendly (Responsive design) +- :sparkles: PWA ready + - :airplane: Offline support + - :page_with_curl: Manifest support +- [:wrench: Fully configurable (see data/siteConfig.js)](./data/siteConfig.js) +- :speech_balloon: Disqus support +- :nail_care: css-in-js (with [styled-components v4](https://www.styled-components.com)) +- :bookmark: Groups post with tags +- :bar_chart: Google Analytics support +- :bird: post preview image generation (Twitter, Facebook) +- :gem: Developer tools: + - eslint + - prettier +- :construction_worker: Travis CI support + + +![Lighthouse scores (locally :bowtie:)](https://lighthouse.now.sh/?perf=100&pwa=100&a11y=100&bp=100&seo=100) + +## Installation (starter) + +* with Gatsby-cli: + +```bash +npm install --global gatsby-cli +gatsby new gatsby-blog https://github.com/maxpou/gatsby-starter-morning-dew +``` + +* without Gatsby-cli + +```bash +git clone my-site git@github.com:maxpou/gatsby-starter-morning-dew.git +cd my-site +npm install +``` + +Then run `npm run develop` to try it locally. + + +## Installation (theme) + +You can also use `gatsby-starter-morning-dew` as a [Gatsby theme](https://www.gatsbyjs.org/blog/2018-11-11-introducing-gatsby-themes/)! + +1. Add the theme + ```bash + npm install gatsby-starter-morning-dew + ``` +2. In your `gatsby-config.js`, add: + ```js + const config = require('./data/siteConfig') + // ... + plugins: [ + { + resolve: "gatsby-starter-morning-dew", + options: {}, + }, + { + resolve: `gatsby-plugin-manifest`, + options: { + name: config.siteTitle, + short_name: config.siteTitle, + start_url: config.pathPrefix, + background_color: config.background_color, + theme_color: config.theme_color, + display: config.display, + icon: 'content/images/company-icon.png', // path to your image + }, + }, + ], + ``` +3. Add an image called `baymax.png` in `content/images/baymax.png`. +๐ŸžThis is due to a bug. +๐Ÿ˜ฌ Don't worry, this picture will not appear on your website! + +Need more details? Checkout: +* [maxpou.fr source](https://github.com/maxpou/maxpou.fr): Maxence Poutord's personnal blog; +* [gatsby-groot source](https://github.com/maxpou/gatsby-groot/): a minimalist blog that use this template! + + +## Commands + +```sh +# working locally +npm run dev + +# generate build +npm run build + +# format code +npm run format + +# lint code +npm run lint + +# Generate generate post preview images (npm run dev need to run before) +npm run generatePostPreviewImages +``` + +**:warning: Add `--prefix-paths` if you are using path prefix!** + +## Configure + +```js +module.exports = { + siteTitle: 'gatsby-starter-morning-dew', + siteDescription: 'A Gatsby theme/starter to build lightning-fast websites', + authorName: 'Maxence Poutord', + twitterUsername: '_maxpou', + authorAvatar: 'avatar.jpeg', // file in content/images + multilangPosts: true, // enable/disable flags in post lists + authorDescription: ` + For the last decade, Maxence Poutord has worked with a variety of web technologies. He is currently focused on front-end development. + On his day to day job, he is working as a senior front-end engineer at VSware. He is also a frequent tech speaker and a mentor. + As a new digital nomad, he is living where the WIFI and sun is ๐Ÿ˜Ž
+ Do you want to know more? Visit my website! + `, + siteUrl: 'https://maxpou.github.io/', + disqusSiteUrl: 'https://www.maxpou.fr/', + // Prefixes all links. For cases when deployed to maxpou.fr/gatsby-starter-morning-dew/ + pathPrefix: '/gatsby-starter-morning-dew', // Note: it must *not* have a trailing slash. + siteCover: 'cover-baymax.jpeg', // file in content/images + googleAnalyticsId: 'UA-67868977-1', + background_color: '#ffffff', + theme_color: '#222222', + display: 'standalone', + icon: 'content/images/baymax.png', + postsPerPage: 6, + disqusShortname: 'maxpou', + headerTitle: 'gatsby-starter-morning-dew', + headerLinksIcon: 'baymax.png', // file in content/images (leave empty to disable: '') + headerLinks: [ + { + label: 'Blog', + url: '/', + }, + { + label: 'About', + url: '/about-gatsby-starter-morning-dew', + }, + { + label: 'Installation', + url: '/how-to-install', + }, + ], + // Footer information (ex: Github, Netlify...) + websiteHost: { + name: 'GitHub', + url: 'https://github.com', + }, + footerLinks: [ + { + sectionName: 'Explore', + links: [ + { + label: 'Blog', + url: '/', + }, + { + label: 'About', + url: '/about-gatsby-starter-morning-dew', + }, + { + label: 'Installation', + url: '/how-to-install', + }, + ], + }, + { + sectionName: 'Follow the author', + links: [ + { + label: 'Github', + url: 'https://github.com/maxpou/gatsby-starter-morning-dew', + }, + { + label: 'Website', + url: 'https://www.maxpou.fr', + }, + { + label: 'Twitter', + url: 'https://twitter.com/_maxpou', + }, + ], + }, + ], +} +``` + +## Deploy + +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/maxpou/gatsby-starter-morning-dew) \ No newline at end of file diff --git a/components.js b/components.js new file mode 100644 index 0000000..eef565f --- /dev/null +++ b/components.js @@ -0,0 +1 @@ +export * from './src/components'; diff --git a/content/images/avatar.jpeg b/content/images/avatar.jpeg new file mode 100644 index 0000000..302e0a2 Binary files /dev/null and b/content/images/avatar.jpeg differ diff --git a/content/images/baymax.png b/content/images/baymax.png new file mode 100644 index 0000000..84cd754 Binary files /dev/null and b/content/images/baymax.png differ diff --git a/content/images/blog-cover-900x300.psd b/content/images/blog-cover-900x300.psd new file mode 100644 index 0000000..d56a20a Binary files /dev/null and b/content/images/blog-cover-900x300.psd differ diff --git a/content/images/cover-850x350.psd b/content/images/cover-850x350.psd new file mode 100644 index 0000000..478de5f Binary files /dev/null and b/content/images/cover-850x350.psd differ diff --git a/content/images/cover-baymax.jpeg b/content/images/cover-baymax.jpeg new file mode 100644 index 0000000..4636ca1 Binary files /dev/null and b/content/images/cover-baymax.jpeg differ diff --git a/content/images/cover.jpg b/content/images/cover.jpg new file mode 100644 index 0000000..8a1af7f Binary files /dev/null and b/content/images/cover.jpg differ diff --git a/content/images/gatsby-icon.png b/content/images/gatsby-icon.png new file mode 100644 index 0000000..908bc78 Binary files /dev/null and b/content/images/gatsby-icon.png differ diff --git a/content/images/logo.png b/content/images/logo.png new file mode 100644 index 0000000..84cd754 Binary files /dev/null and b/content/images/logo.png differ diff --git a/content/pages/about/about.md b/content/pages/about/about.md new file mode 100644 index 0000000..b6c5775 --- /dev/null +++ b/content/pages/about/about.md @@ -0,0 +1,25 @@ +--- +title: "Ce este WebsiteMarket" +slug: about +cover: ./cover.png +disqus: false +--- + +WebsiteMarket este un proiect open-source care isi propune sa livreze site-uri simple de prezentare companiilor mici si mijlocii. +Proiectele livrate si aplicatiile demo, sunt open-source (sursele sunt publice) si pot fi accesate de catre oricine, +putand reprezenta o sursa de invatare pentru programatorii incepatori. + +## De ce noi? + +WebsiteMarket utilizeaza doar tehnologii de ultima ora si este un sustinator activ al ecosistemului open-source. +Toate aplicatiile noastre se bazeaza pe tehnologii noi, rapide si sigure. + +## Resurse + + - Sursele site-ului [WebsiteMarket](https://github.com/creare-site/websitemarket) + - Sursele acestui [blog](https://github.com/creare-site/blog) + +## Contact & Suport + +Prin Email **hello [@ ] websitemarket.ro** sau pe LIVE chat-ul [Discord](https://discord.gg/MFRQmAk) + diff --git a/content/pages/about/cover.jpg b/content/pages/about/cover.jpg new file mode 100644 index 0000000..8a1af7f Binary files /dev/null and b/content/pages/about/cover.jpg differ diff --git a/content/posts/2017-01-01-bold-mage/cover.jpg b/content/posts/2017-01-01-bold-mage/cover.jpg new file mode 100644 index 0000000..8a1af7f Binary files /dev/null and b/content/posts/2017-01-01-bold-mage/cover.jpg differ diff --git a/content/posts/2017-01-01-bold-mage/index.md b/content/posts/2017-01-01-bold-mage/index.md new file mode 100644 index 0000000..6dfa0b1 --- /dev/null +++ b/content/posts/2017-01-01-bold-mage/index.md @@ -0,0 +1,79 @@ +--- +title: Bold Mage (fake post) +slug: bold-mage +date: 2017-01-01 +cover: ./cover.jpg +generate-card: false +language: en +tags: + - programming + - stuff + - fake +--- + +## Sedisti civiliter + +Lorem **markdownum** Ixione palus **semper peritura barbaque** in aureus +obliquum erigitur gemmae utque cur natus, aera supplice de nudae. Manus +ambrosiam tendens, saecula tenet, conponere et ense et cucurri. Tantique +animalia praeceps Meleagre greges venisse corpore et ignara, umquam ipse? Quam +*Talibus ausis*. + +## Vultusque subsequitur Pallas regis datis inde animaque + +At securim cautum capitis, creatos sanguinis turbant iam concita videor, edere. +Alis genas rudis felix quas **longum** suorum manu ante prima **usque**. Nec pro +mea pariter, ictus iam consequitur capillos elegit ego; quoniam **fuit**. Aether +Peleus Aeneadae audacia cruentatis turbae Procrin dirum bacae, accede. + +```rust +fn main() { + let strings = vec!["tofu", "93", "18"]; + let numbers: Vec<_> = strings + .into_iter() + .map(|s| s.parse::()) + .filter_map(Result::ok) + .collect(); + println!("Results: {:?}", numbers); +} +``` + +## Fortis dextrae humo limina Tempus singultibus illa + +Nate muros orbe [patris](http://debebuntilla.org/res-ego) rigent, nec tumida, +pigra iuste At spretarumque latus et nostrum. Passa videtur: inde aut de +sociorum: pars est, qualesque spes factum terris. Custodia sum animumque; iubet +in pulvere carus, relinquunt incitat. Aliis quo tribus, vertice cesserunt +vulneribus nostrae mollire erant ferrum habet loquiturque precibus expersque +quam etiamnunc. Puraque [repetitque](http://mihi-aiax.io/suaferunt.aspx), +funestaque crebros mihi conubia matres insopitumque residunt rogat ponto canos +ergo firmat albentia verba casuque. + +```jsx +const Hero = props => { + const { siteCover } = useSiteMetadata() + const { fluid } = useSiteImages(siteCover) + const heroImg = props.heroImg || fluid.src + + return ( + + + {props.title} + {props.subTitle && {props.subTitle}} + + + ) +} + +export default Hero +``` + +## Nati expugnacior nympha milia nascuntur amico + +Multis timidus hic si auctor hausit. Suos taedasque, malis est nitente sceleri +sunt florem. + +Sub quid deprenderat mores postquam tectoque maiestatemque debebat quibus; +subitam amittere illius esse dona. Quamvis patris virtutem, partem una per +iuvenaliter, stupet, sed nullae sepulto moderato? Nec phaedimus aequoris dixit. +Hic bis parenti: e petunt satis. \ No newline at end of file diff --git a/content/posts/2017-01-02-the-fallen-time/cover.jpg b/content/posts/2017-01-02-the-fallen-time/cover.jpg new file mode 100644 index 0000000..8a1af7f Binary files /dev/null and b/content/posts/2017-01-02-the-fallen-time/cover.jpg differ diff --git a/content/posts/2017-01-02-the-fallen-time/index.md b/content/posts/2017-01-02-the-fallen-time/index.md new file mode 100644 index 0000000..1bd704f --- /dev/null +++ b/content/posts/2017-01-02-the-fallen-time/index.md @@ -0,0 +1,98 @@ +--- +title: "The Fallen Time (fake post)" +slug: the-fallen-time +cover: ./cover.jpg +generate-card: false +date: 2017-01-02 +language: en +tags: + - test + - something + - fake +--- + +## Hoc domum solitos veteremque nostrum + +Lorem markdownum huc suo ara, dubites celeri mihi bicolor. Secuti non? Suo opus +quales dant, puppim hanc! + +```js +const ThemeContext = React.createContext('light'); + +class ThemeProvider extends React.Component { + state = {theme: 'light'}; + + render() { + return ( + + {this.props.children} + + ); + } +} + +class ThemedButton extends React.Component { + render() { + return ( + + {theme =>