Skip to content

Commit

Permalink
documentation integration
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitZugmeyer committed Aug 13, 2019
1 parent cfc6a41 commit 4b29fb7
Show file tree
Hide file tree
Showing 31 changed files with 1,668 additions and 970 deletions.
72 changes: 72 additions & 0 deletions _data/nav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
- title: Quick Start
url: /docs/usage/quick-start/
subnav:
- title: Quick Start
url: /docs/usage/quick-start/
- title: Process Management
url: /docs/usage/process-management/

- title: Documentation
url: /docs/usage/pm2-doc-single-page/
subnav:
- title: Single Page Doc
url: /docs/usage/pm2-doc-single-page/
- title: Cluster Mode
url: /docs/usage/cluster-mode
- title: Ecosystem File
url: /docs/usage/application-declaration/
- title: Graceful Start/Shutdown
url: /docs/usage/signals-clean-restart/
- title: Environment Variables
url: /docs/usage/environment/
- title: Logs
url: /docs/usage/log-management/
- title: Restart Strategies
url: /docs/usage/restart-strategies/
- title: Memory Limit Reload
url: /docs/usage/memory-limit/
- title: Update PM2
url: /docs/usage/update-pm2/
- title: Deployment
url: /docs/usage/deployment/
- title: Startup Script
url: /docs/usage/startup/
- title: Process Metrics
url: /docs/usage/process-metrics/
- title: Process Actions
url: /docs/usage/process-actions/
- title: Watch & Restart
url: /docs/usage/watch-and-restart/
- title: Monitoring
url: /docs/usage/monitoring/
- title: Source map support
url: /docs/usage/source-map-support/
- title: Specifics
url: /docs/usage/specifics/
- title: PM2 API
url: /docs/usage/pm2-api/
- title: Module System
url: /docs/advanced/pm2-module-system/
- title: Expose static file over http
url: /docs/usage/expose/
- title: Download as ZIP
url: https://github.com/Unitech/PM2/releases
blank: true

- title: Integrations
url: /docs/usage/use-pm2-with-cloud-providers/
subnav:
- title: Use PM2 in Cloud Providers
url: /docs/usage/use-pm2-with-cloud-providers/
- title: Docker Integration
url: /docs/usage/docker-pm2-nodejs/
- title: Heroku Integration
url: /docs/integrations/heroku/
- title: Production Setup with Nginx
url: /docs/tutorials/pm2-nginx-production-setup
- title: Using transpilers with PM2
url: /docs/tutorials/using-transpilers-with-pm2
- title: PM2 in ElasticBeanstalk
url: /docs/tutorials/use-pm2-with-aws-elastic-beanstalk/
- title: Capistrano like deployments
url: /docs/tutorials/capistrano-like-deployments
10 changes: 5 additions & 5 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
</div>
</div>
<div class="section-wrapper">
<nav>
<nav class="main-nav">
<a href="{{ site.url }}" title="Go to home page" class="logo-link">
<img alt="PM2 logo" src="./assets/logo.png" />
<img alt="PM2 logo" src="{{ site.url }}/assets/logo.png" />
</a>
<div class="doc-links">
<a href="/docs/usage/quick-start/" title="Go to Quick start">
<a href="{{ site.url }}/docs/usage/quick-start/" title="Go to Quick start">
Quick start
</a>
<a href="/docs/usage/pm2-doc-single-page/" title="Go to Documentation">
<a href="{{ site.url }}/docs/usage/pm2-doc-single-page/" title="Go to Documentation">
Documentation
</a>
<a
href="/docs/usage/use-pm2-with-cloud-providers/"
href="{{ site.url }}/docs/usage/use-pm2-with-cloud-providers/"
title="Go to Integrations"
>
Integrations
Expand Down
35 changes: 35 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% capture title %}
{% if page.title %}{{ site.title }} - {{ page.title }}{% else %}{{ site.title }} - Advanced Node.js process manager{% endif %}
{% endcapture %}
{% capture description %}
{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}
{% endcapture %}
{% capture url %}
{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}
{% endcapture %}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="copyright" content="Keymetrics Inc." />
<meta name="description" content="{{ description | strip | escape }}">

<meta property="og:url" content="{{ url | strip | escape }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title | strip | escape }}" />
<meta property="og:description" content="{{ description | strip | escape }}" />
<meta property="og:image" content="https://raw.githubusercontent.com/unitech/pm2/master/pres/pm2.20d3ef.png" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@keymetrics_io" />
<meta name="twitter:title" content="{{ title | strip | escape }}" />
<meta name="twitter:description" content="{{ description | strip | escape }}" />
<meta name="twitter:image:src" content="https://raw.githubusercontent.com/unitech/pm2/master/pres/pm2.20d3ef.png" />
<meta name="twitter:url" content="{{ url | strip | escape }}" />

<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
<link rel="canonical" href="{{ url | strip | escape }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Exo:300,500,800|Roboto&display=swap">
<link rel="stylesheet" href="{{ site.url }}/assets/main.css" />
<link rel="icon" type="image/x-icon" href="{{ site.url }}/favicon.ico" />

<title>{{ title | strip | escape }}</title>
16 changes: 11 additions & 5 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<header id="menu">
<div class="section-wrapper">
<nav>
<nav class="main-nav">
<a href="{{ site.url }}" title="Go to home page" class="logo-link">
<img alt="PM2 logo" src="./assets/logo.png" />
<img alt="PM2 logo" src="{{ site.url }}/assets/logo.png" />
</a>
<div class="menu">
<a
Expand All @@ -15,18 +15,24 @@
<a class="menu-overlay" href="#" title="Close the menu"></a>
<div class="menu-content">
<div class="doc-links">
<a href="/docs/usage/quick-start/" title="Go to Quick start">
<a
href="{{ site.url }}/docs/usage/quick-start/"
title="Go to Quick start"
class="{% if page.url == '/docs/usage/quick-start/' %}current{% endif %}"
>
Quick start
</a>
<a
href="/docs/usage/pm2-doc-single-page/"
href="{{ site.url }}/docs/usage/pm2-doc-single-page/"
title="Go to Documentation"
class="{% if page.url == '/docs/usage/pm2-doc-single-page/' %}current{% endif %}"
>
Documentation
</a>
<a
href="/docs/usage/use-pm2-with-cloud-providers/"
href="{{ site.url }}/docs/usage/use-pm2-with-cloud-providers/"
title="Go to Integrations"
class="{% if page.url == '/docs/usage/use-pm2-with-cloud-providers/' %}current{% endif %}"
>
Integrations
</a>
Expand Down
36 changes: 1 addition & 35 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,7 @@
{% capture title %}
{% if page.title %}{{ site.title }} - {{ page.title }}{% else %}{{ site.title }} - Advanced Node.js process manager{% endif %}
{% endcapture %}
{% capture description %}
{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}
{% endcapture %}
{% capture url %}
{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}
{% endcapture %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="copyright" content="Keymetrics Inc." />
<meta name="description" content="{{ description | strip | escape }}">

<meta property="og:url" content="{{ url | strip | escape }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title | strip | escape }}" />
<meta property="og:description" content="{{ description | strip | escape }}" />
<meta property="og:image" content="https://raw.githubusercontent.com/unitech/pm2/master/pres/pm2.20d3ef.png" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@keymetrics_io" />
<meta name="twitter:title" content="{{ title | strip | escape }}" />
<meta name="twitter:description" content="{{ description | strip | escape }}" />
<meta name="twitter:image:src" content="https://raw.githubusercontent.com/unitech/pm2/master/pres/pm2.20d3ef.png" />
<meta name="twitter:url" content="{{ url | strip | escape }}" />

<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
<link rel="canonical" href="{{ url | strip | escape }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Exo:300,500,800&amp;display=swap" />
<link rel="stylesheet" href="{{ site.url }}/assets/main.css" />
<link rel="icon" type="image/x-icon" href="{{ site.url }}/favicon.ico" />

<title>{{ title | strip | escape }}</title>
{% include head.html %}
</head>
<body>
{% include header.html %}
Expand Down
91 changes: 91 additions & 0 deletions _layouts/docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include head.html %}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
</head>
<body>
{% include header.html %}
<main>
<section class="section-doc">
<div class="section-background">
<div class="section-wrapper">
<div class="hexagon hexagon-1"></div>
<div class="hexagon hexagon-2"></div>
<div class="hexagon hexagon-3"></div>
<div class="hexagon hexagon-4"></div>
</div>
</div>
<div class="section-wrapper">
<h1>{{ page.title }}</h1>
<div class="doc-nav-and-content">
<nav>
<div class="search-field">
<input type="text" placeholder="Search" />
<i class="fa fa-search"></i>
</div>
<ul>
{% for item in site.data.nav %}
<li class="nav-section {% if page.url contains item.url %}active{% endif %}">

<a class="nav-section-title" href="{{item.url | escape}}">{{ item.title | escape }}</a>

<ul class="nav-section-content">
{% for item in item.subnav %}
<li class="nav-section-entry {% if page.url contains item.url %}active{% endif %}">
<a
href="{% unless item.url contains '://' %}{{ site.url }}{% endunless %}{{ item.url }}"
{% if item.blank == true %}
target="_blank"
{% endif %}
>
{{ item.title }}
</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</nav>
<article class="doc-content">

{{ content }}

<a class="edit-page-button" target="_blank" href="{{site.repo_url}}/tree/master/{{page.path}}" title="Edit Page">
<i class="fa fa-2x fa-github" aria-hidden="true"></i>
Contribute to this page
</a>

<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'pm2';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
</article>
</div>
</div>
</section>
</main>
{% include footer.html %}

<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script>
docsearch({
apiKey: '1d274d1e258b11c96ef6cfc32455be56',
indexName: 'keymetrics',
inputSelector: '.search-field input',
});
</script>
<script src="{{ site.url }}/assets/mobile-doc-nav.js"></script>
</body>
</html>
73 changes: 73 additions & 0 deletions _sass/footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

footer {
.section-wrapper {
margin-top: 154px;
@media #{$mobile} {
margin-top: 104px;
}
}

.doc-links {
color: rgba(255, 255, 255, 0.6);

a:hover {
color: rgba(255, 255, 255, 1);
}

@media #{$mobile} {
margin: 60px 0;
}
}

@media #{$not-mobile} {
.button-border {
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
padding-bottom: 40px;
margin-bottom: -41px;
}
}

.main-nav {
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
padding-bottom: 40px;

@media #{$mobile} {
flex-direction: column;
}

.doc-links a {
@media #{$small-mobile} {
padding-left: 16px;
padding-right: 16px;
}
}
}

.below-nav {
display: flex;
font-size: 0.9rem;
justify-content: space-between;
margin: 40px 0 24px 0;
color: rgba(255, 255, 255, 0.6);

@media #{$mobile} {
flex-direction: column;
align-items: center;
height: 70px;
}

a {
transition: color 0.4s;
&:hover {
color: rgba(255, 255, 255, 1);
}
&:first-child {
margin-right: 16px;
}
&:last-child {
margin-left: 16px;
}
}
}
}

Loading

0 comments on commit 4b29fb7

Please sign in to comment.