Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Migrate from Jekyll to Statie #7

Merged
merged 9 commits into from Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
@@ -0,0 +1,9 @@
/output

# composer
/vendor
composer.lock

# node
/node_modules
package-lock.json
26 changes: 26 additions & 0 deletions .travis.yml
@@ -0,0 +1,26 @@
language: php

matrix:
include:
- php: 7.3

install:
- composer install

script:
# test that website is generated
- vendor/bin/statie generate source

# see docs: https://www.statie.org/docs/github-pages/
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master
local_dir: output

notifications:
email:
on_success: never
on_failure: always
29 changes: 0 additions & 29 deletions _data/projects.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions composer.json
@@ -0,0 +1,7 @@
{
"require": {
"symplify/statie": "dev-master"
},
"minimum-stability": "dev",
"prefer-stable": true
}
26 changes: 26 additions & 0 deletions gulpfile.js
@@ -0,0 +1,26 @@
// install: npm install
// run: gulp

var gulp = require('gulp');
var watch = require('gulp-watch');
var exec = require('child_process').exec;

gulp.task('default', function () {
// Generate current version
exec('vendor/bin/statie generate source', function (err, stdout, stderr) {
console.log(stdout);
console.error(stderr);
});

// Run local server, open localhost:8000 in your browser
exec('php -S localhost:8000 -t output');
console.log('Local PHP server started at "http://localhost:8000", open browser to see it.');

// For the second arg see: https://github.com/floatdrop/gulp-watch/issues/242#issuecomment-230209702
return watch(['source/**/*', '!**/*___jb_tmp___'], function () {
exec('vendor/bin/statie generate source', function (err, stdout, stderr) {
console.log(stdout);
console.error(stderr);
});
});
});
5 changes: 5 additions & 0 deletions ide-twig.json
@@ -0,0 +1,5 @@
{
"namespaces": [
{ "path": "source" }
]
}
10 changes: 10 additions & 0 deletions package.json
@@ -0,0 +1,10 @@
{
"dependencies": {
"child_process": "^1.0",
"gulp": "^4.0.0",
"gulp-cli": "^2.0",
"gulp-util": "^3.0",
"gulp-watch": "^5.0"
},
"private": true
}
File renamed without changes.
17 changes: 17 additions & 0 deletions source/_data/posts.yaml
@@ -0,0 +1,17 @@
parameters:
learn_mores:
-
name: "Monorepo: From Zero to Hero (2018)"
url: "https://www.tomasvotruba.cz/clusters/#monorepo-from-zero-to-hero"

-
name: "Why Google stores billions of lines of code in a single repository (2016)"
url: "https://dl.acm.org/citation.cfm?id=2854146"

-
name: "Monorepos in Git (2015)"
url: "https://developer.atlassian.com/blog/2015/10/monorepos-in-git/"

-
name: "korfuri/awesome-monorepo"
url: "https://github.com/korfuri/awesome-monorepo"
26 changes: 26 additions & 0 deletions source/_data/projects.yaml
@@ -0,0 +1,26 @@
parameters:
projects:
# put the newest to the bottom
-
name: Laravel
url: https://github.com/laravel/framework

-
name: Symplify
url: https://github.com/Symplify/Symplify

-
name: Sylius
url: https://github.com/Sylius/Sylius

-
name: Yii2
url: https://github.com/yiisoft/yii2

-
name: Shopsys
url: https://github.com/shopsys/shopsys

-
name: Contao
url: https://github.com/contao/contao
10 changes: 10 additions & 0 deletions source/_data/tools.yaml
@@ -0,0 +1,10 @@
parameters:
tools:
-
name: "Symplify/MonorepoBuilder"
url: "https://github.com/symplify/monorepobuilder"
description: "init, setup and auto-split monorepo in minutes - great for start from scratch"
-
name: "shopsys/monorepo-tools"
url: "https://github.com/shopsys/monorepo-tools"
description: "merges history of multiple repos to one and more - great for start for code with many repositories with long history"
9 changes: 9 additions & 0 deletions source/_snippets/footer.twig
@@ -0,0 +1,9 @@
<script>
ga=function(){ ga.q.push(arguments) };
ga.q=[];
ga.l=+new Date;
ga('create', '{{ google_analytics_tracking_id }}', 'auto');
ga('send','pageview');
</script>

<script src="https://www.google-analytics.com/analytics.js" async defer></script>
File renamed without changes.
49 changes: 22 additions & 27 deletions index.html → source/index.twig
@@ -1,5 +1,3 @@
---
---
<!DOCTYPE html>
<html>
<head>
Expand All @@ -9,9 +7,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bree+Serif:300,400,600">

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">

<link rel="stylesheet" href="/assets/style.css?v=0.6">
<link rel="stylesheet" href="/assets/style.css?v={{ random }}">
</head>
<body>
<div class="container">
Expand All @@ -29,14 +27,19 @@ <h2>What is Monorepo?</h2>

<div class="text-center">
<p class="bigger">
A repository that contains multiple packages or projects. Those projects can, but don't have to be related. Outside PHP world the monorepo is used by <a href="https://github.com/korfuri/awesome-monorepo/blob/master/README.md#build-systems--dependency-management-tools">Google, Facebook, Twitter and Foursquare</a>.
A repository that contains multiple packages or projects. Those projects can, but don't have to be related. Most famous monorepo pioneers are <a href="https://github.com/korfuri/awesome-monorepo/blob/master/README.md#build-systems--dependency-management-tools">Google, Facebook and Twitter</a>.
</p>
<p class="bigger">

<p class="bigger mt-4">
The most famous monorepos in PHP are&nbsp;<a href="https://github.com/symfony/symfony">Symfony</a>,
{% for project in site.data.projects %}<a href="{{ project.url }}">{{ project.name }}</a>, {% endfor %}

{% for project in projects %}
{% if loop.last %}and{% endif %}
<a href="{{ project.url }}">{{ project.name }}</a>{% if loop.index < (length(contributors) - 1) %}, {% endif %}{% if loop.last %}.{% endif %}
{% endfor %}
</p>

<a href="https://github.com/TomasVotruba/gomonorepo.org/edit/master/_data/projects.yaml" class="btn btn-success mt-4 mb-3">Add Yours Too!</a>
<a href="https://github.com/TomasVotruba/gomonorepo.org/edit/master/source/_data/projects.yaml" class="btn btn-success mt-4 mb-3">Add Yours</a>
</div>

<hr>
Expand Down Expand Up @@ -78,7 +81,7 @@ <h2>Why is Monorepo so Awesome?</h2>
</div>

<p>
Cherry-picked reasons from legendary <a href="https://danluu.com/monorepo/">Advantages of Monolithic Version Control</a> and <a href="https://github.com/babel/babel/blob/master/doc/design/monorepo.md#why-is-babel-a-monorepo">Why is Babel a monorepo?</a>. Read them to get deeper insight.
These are cherry-picked reasons from legendary <a href="https://danluu.com/monorepo/">Advantages of Monolithic Version Control</a> and <a href="https://github.com/babel/babel/blob/master/doc/design/monorepo.md#why-is-babel-a-monorepo">Why is Babel a monorepo?</a> Read them to get deeper insight.
</p>

<hr>
Expand All @@ -88,40 +91,32 @@ <h2>Why is Monorepo so Awesome?</h2>
<h2>Tools for You</h2>

<ul>
<li><a href="https://github.com/symplify/monorepobuilder">Symplify/MonorepoBuilder</a> - init, setup and auto-split monorepo in minutes</li>
<li><a href="https://github.com/shopsys/monorepo-tools">shopsys/monorepo-tools</a> - merges history of multiple repos to one and more</li>
{% for tool in tools %}
<li><a href="{{ tool.url }}">{{ tool.name }}</a> - {{ tool.description }}</li>
{% endfor %}
</ul>
</div>

<div class="col-md-6">
<h2>Learn More</h2>

<ul>
<li><a href="https://www.tomasvotruba.cz/clusters/#monorepo-from-zero-to-hero">Monorepo: From Zero to Hero</a> (2018)</li>
<li><a href="https://dl.acm.org/citation.cfm?id=2854146">Why Google stores billions of lines of code in a single repository</a> (2016)</li>
<li><a href="https://developer.atlassian.com/blog/2015/10/monorepos-in-git/">Monorepos in Git</a> (2015)</li>
<li><a href="https://github.com/korfuri/awesome-monorepo">korfuri/awesome-monorepo</a> - collection of the best sources and tools for monorepo</li>

{% for learn_more in learn_mores %}
<li><a href="{{ learn_more.url }}">{{ learn_more.name }}</a></li>
{% endfor %}
</ul>
</div>
</div>

<br>

<footer class="text-center mt-5 mb-5">
Made by <a href="https://www.tomasvotruba.com">Tomas Votruba</a> with ❤️️ & ☕️
Made with ❤️ on️ <a href="https://www.statie.org">Statie</a> by <a href="https://tomasvotruba.com">Tomas Votruba</a> and️️ ☕️
<br>
Found a typo? <a href="https://github.com/TomasVotruba/gomonorepo.org/edit/master/index.html">Edit this page</a>
<a href="https://github.com/TomasVotruba/gomonorepo.org/">Look inside</a>
</footer>
</div>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131306432-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-131306432-1');
</script>
{% include "_snippets/footer.twig" %}
</body>
</html>
6 changes: 6 additions & 0 deletions statie.yaml
@@ -0,0 +1,6 @@
imports:
- { resource: "source/_data/*.yaml" }

# see https://www.statie.org/docs/configuration/ for more
parameters:
google_analytics_tracking_id: 'UA-131306432-1'