Skip to content
Permalink
Browse files

πŸŽ‰ Blog initialisation.

  • Loading branch information...
mathieutu committed Mar 11, 2019
0 parents commit bbe4f0bb0ee2add4ab2bf234b6fe5f8bb5714ad3
Showing with 8,531 additions and 0 deletions.
  1. +8 βˆ’0 .editorconfig
  2. +25 βˆ’0 .gitignore
  3. +28 βˆ’0 .travis.yml
  4. +19 βˆ’0 package.json
  5. +46 βˆ’0 src/.vuepress/config.js
  6. +16 βˆ’0 src/.vuepress/plugins/lastCommit.js
  7. BIN src/.vuepress/public/favicon.png
  8. +10 βˆ’0 src/.vuepress/public/manifest.json
  9. +23 βˆ’0 src/.vuepress/styles/index.styl
  10. +7 βˆ’0 src/.vuepress/styles/palette.styl
  11. +59 βˆ’0 src/.vuepress/theme/components/Bio.vue
  12. +43 βˆ’0 src/.vuepress/theme/components/Date.vue
  13. +8 βˆ’0 src/.vuepress/theme/components/ExternalLink.vue
  14. +43 βˆ’0 src/.vuepress/theme/components/Hints.vue
  15. +11 βˆ’0 src/.vuepress/theme/components/Navbar.vue
  16. +29 βˆ’0 src/.vuepress/theme/components/Page.vue
  17. +111 βˆ’0 src/.vuepress/theme/components/PageEdit.vue
  18. +109 βˆ’0 src/.vuepress/theme/components/PageNav.vue
  19. +11 βˆ’0 src/.vuepress/theme/components/ReadingTime.vue
  20. +63 βˆ’0 src/.vuepress/theme/components/SearchBox.vue
  21. +47 βˆ’0 src/.vuepress/theme/components/TagBadges.vue
  22. +27 βˆ’0 src/.vuepress/theme/components/TitleWithLink.vue
  23. +37 βˆ’0 src/.vuepress/theme/global-components/Avatar.vue
  24. +39 βˆ’0 src/.vuepress/theme/global-components/MySWUpdatePopup.vue
  25. +23 βˆ’0 src/.vuepress/theme/global-components/PageTitle.vue
  26. +74 βˆ’0 src/.vuepress/theme/global-components/Posts.vue
  27. +3 βˆ’0 src/.vuepress/theme/index.js
  28. +18 βˆ’0 src/.vuepress/theme/layouts/LayoutWithBio.vue
  29. +67 βˆ’0 src/.vuepress/theme/layouts/Post.vue
  30. +37 βˆ’0 src/.vuepress/theme/layouts/Tag.vue
  31. +25 βˆ’0 src/.vuepress/theme/layouts/Tags.vue
  32. +10 βˆ’0 src/Readme.md
  33. +22 βˆ’0 src/blog/Readme.md
  34. +7,433 βˆ’0 yarn.lock
@@ -0,0 +1,8 @@
[*]
charset=utf-8
end_of_line=lf
trim_trailing_whitespace=true
insert_final_newline=true
indent_style=space
indent_size=2

@@ -0,0 +1,25 @@
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# vuepress build output
dist
@@ -0,0 +1,28 @@
language: node_js
node_js:
- node
cache:
yarn: true
directories:
- "node_modules"

branches:
only:
- master

script:
- echo "Skipping tests..."

before_deploy:
- yarn build

deploy:
provider: pages
repo: mathieutu/mathieutu.github.io
target-branch: master
fqdn: mathieutu.dev
local-dir: src/.vuepress/dist
github-token: $GITHUB_TOKEN
committer-from-gh: true
skip-cleanup: true
verborse: true
@@ -0,0 +1,19 @@
{
"name": "mathieutu.dev",
"version": "0.0.1",
"description": "Personal blog",
"author": "Mathieu TUDISCO",
"license": "MIT",
"devDependencies": {
"@vuepress/plugin-blog": "^1.0.0-alpha.44",
"@vuepress/plugin-medium-zoom": "^1.0.0-alpha.44",
"@vuepress/plugin-pwa": "^1.0.0-alpha.44",
"date-fns": "^2.0.0-alpha.27",
"vuepress": "^1.0.0-alpha.44",
"vuepress-plugin-reading-time": "^0.1.1"
},
"scripts": {
"start": "vuepress dev src",
"build": "vuepress build src"
}
}
@@ -0,0 +1,46 @@
module.exports = {
title: 'Mathieu TUDISCO',
description: 'Un blog',
plugins: [
['@vuepress/blog', {
postsDir: 'blog',
permalink: false
}],
['@vuepress/medium-zoom', {
selector: '.post .content img'
}],
['@vuepress/pwa', {
serviceWorker: true,
//popupComponent: 'MySWUpdatePopup',
updatePopup: true
}],
'vuepress-plugin-reading-time',
'@vuepress/last-updated',
require('./plugins/lastCommit'),
],
head: [
['link', { rel: 'manifest', href: '/manifest.json' }],
['link', { rel: 'shortcut icon', href: '/favicon.png' }],
],
themeConfig: {
sidebar: false,

docsRepo: 'mathieutu/blog',
docsDir: 'src',
docsBranch: 'master',

editLinks: true,
lastUpdated: true,
nav: [
{ text: 'About', link: '/' },
{ text: 'Blog', link: '/blog/' },
{
text: 'Links', items: [
{ text: 'Github', link: 'https://github.com/mathieutu' },
{ text: 'Linkedin', link: 'https://www.linkedin.com/in/mathieutu/' },
{ text: 'Twitter', link: 'https://twitter.com/mathieutu' },
]
}
]
}
};
@@ -0,0 +1,16 @@
const spawn = require('cross-spawn');

module.exports = () => ({
extendPageData($page) {
$page.lastCommit = getGitLastCommit($page._filePath);
}
});

function getGitLastCommit(filePath) {
let lastCommit;
try {
lastCommit = spawn.sync('git', ['log', '-1', '--format=%h', filePath]).stdout.toString('utf-8').trim();
} catch (e) { /* do not handle for now */
}
return lastCommit;
}
Binary file not shown.
@@ -0,0 +1,10 @@
{
"short_name": "mathieutu",
"name": "mathieutu",
"start_url": ".",
"background_color": "#ded4d4",
"display": "standalone",
"description": "The website of Mathieu TUDISCO",
"theme_color": "#ded4d4",
"splash_pages": null
}
@@ -0,0 +1,23 @@
:root {
--accent-color: $accentColor;
--text-color: $textColor;
--border-color: $borderColor;
--code-bg-color: $codeBgColor;
--tag-badge-color: $tagBadgeColor;
--content-width: $contentWidth;
}

h1 {
font-family: monospace;
}

.wrapper {
max-width: var(--content-width, 640px);
padding: 0 1.5rem 0;
margin: 0 auto;
}

.bottom {
margin: 0 auto;
margin-bottom: 2rem;
}
@@ -0,0 +1,7 @@
$accentColor = #b2786b
//$textColor = #2c3e50
//$borderColor = #eaecef
//$codeBgColor = #282c34
$tagBadgeColor = #ded4d4
$contentWidth = 740px

@@ -0,0 +1,59 @@
<template>
<div class="bio-wrapper">
<div class="bio">
<Avatar class="avatar"/>
<div class="bio-text">
Thanks for reading! <br>
I'm Mathieu TUDISCO, a lead developer at
<ExternalLink href="https://link-value.fr">Linkvalue</ExternalLink>
. <br>
You can find me anywhere with <strong>@mathieutu</strong>. <br>
As a start you can follow me on
<ExternalLink href="https://www.twitter.com/mathieutu">Twitter</ExternalLink>
or want to find out more about
<router-link to="/">me</router-link>
or the
<router-link to="/blog/">blog</router-link>
.
</div>
</div>
</div>
</template>
<script>
import ExternalLink from '@theme/components/ExternalLink.vue';
import Avatar from '@theme/global-components/Avatar.vue';
export default {
components: {
Avatar, ExternalLink
}
}
</script>
<style lang="stylus">
.bio-wrapper {
background-color: hsl(220, 12%, 97%);
.bio {
max-width: var(--content-width, 640px);
margin: 0 auto;
display: flex;
padding: 2rem;
.bio-text {
font-size: .9rem;
font-weight: 400;
padding: 0.25rem 0;
}
.avatar {
padding-right: 1rem;
}
a {
&:hover {
text-decoration underline
}
}
}
}
</style>
@@ -0,0 +1,43 @@
<template>
<div class="date-container">
<span class="date">{{ dateFormatted }}</span>
</div>
</template>

<script>
export default {
props: {
page: {
type: Object,
required: false,
default: () => null
},
options: {
type: Object,
required: false,
default: () => {},
},
lang: {
type: String,
required: false,
default: null
}
},
computed: {
dateFormatted() {
const page = this.page || this.$page;
const lang = this.lang || this.$lang;
return new Date(page.frontmatter.date || page.lastUpdated).toLocaleDateString(lang, this.options);
}
},
};
</script>

<style>
.date {
font-weight: 400;
font-size: 14px;
color: hsl(0, 0%, 60%);
}
</style>
@@ -0,0 +1,8 @@
<template>
<a v-bind="$attrs" target="_blank" rel="noopener noreferrer"><slot/><OutboundLink/></a>
</template>
<script>
export default {
name: 'ExternalLink',
};
</script>
@@ -0,0 +1,43 @@
<template>
<div class="hints" v-if="hints">
<p class="">You can find this page with theses search keywords:</p>
<div class="list">
<span v-for="(hint, index) in hints" :key="index">
<span class="sep"> / </span><span v-text="hint" class="text"/><span class="sep" v-if="index === hints.length - 1"> / </span>
</span>
</div>
</div>
</template>
<script>
export default {
name: 'Hints',
computed: {
hints() {
return this.$page.frontmatter.hints;
}
}
};
</script>
<style lang="stylus">
@require '~@vuepress/theme-default/styles/wrapper.styl'
.hints
@extend $wrapper
padding-top 0
padding-bottom 0
overflow auto
font-size 0.9em
margin-top -1rem
margin-bottom 2rem
p
margin-block-end 0.5rem
.list
margin-left 1rem
.text
color: hsl(0, 0%, 60%);
.sep
color: var(--tag-badge-color)
</style>
@@ -0,0 +1,11 @@
<script>
import NavBar from '@parent-theme/components/Navbar.vue'
import SearchBox from '@theme/components/SearchBox.vue'
export default {
extends: NavBar,
components: {
SearchBox
},
};
</script>
@@ -0,0 +1,29 @@
<template>
<main class="page">
<slot name="top"/>

<Content/>
<Hints/>
<PageEdit/>
<PageNav v-bind="{ sidebarItems }"/>

<slot name="bottom"/>
</main>
</template>

<script>
import PageEdit from '@theme/components/PageEdit.vue';
import PageNav from '@theme/components/PageNav.vue';
import Hints from './Hints';
export default {
components: { Hints, PageEdit, PageNav },
props: ['sidebarItems']
};
</script>

<style lang="stylus">
.page
padding-bottom 2rem
display block
</style>

0 comments on commit bbe4f0b

Please sign in to comment.
You can’t perform that action at this time.