Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] PoC - Blog platform #775

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/_default/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: InnerSource Commons

pluralizeListTitles: false
paginate: '3'
summaryLength: '15'
summaryLength: '40'
disqusShortname: ''
googleAnalytics: ''
enableRobotsTXT: true
Expand Down
14 changes: 14 additions & 0 deletions content/en/blog/20240514.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 'Hello World!'
image: "/images/events/Summit2021.JPG"
date: 2023-11-17
authors:
- "Yuki Hattori"
categories:
- "Practice"
---

When done right, InnerSource is one of the most effective ways to release trapped value in the enterprise. InnerSource is not just for source code, it can be used for any content including sales, presales, marketing, solution, delivery or education in your organization.

Microsoft has been practicing InnerSource within the product groups to develop code for more than 5 years with early pockets of cross team collaboration on code reaching back many more years. In the string of collaboration efforts, the DevOps Dojo within Microsoft Professional Services is one of the more recent groups to use InnerSource, this time, to create content collaboratively.

14 changes: 14 additions & 0 deletions content/en/blog/20240515 copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 'Hello World!'
image: "/images/events/Summit2021.JPG"
date: 2024-03-16
authors:
- "Yuki Hattori"
categories:
- "Idea"
---

When done right, InnerSource is one of the most effective ways to release trapped value in the enterprise. InnerSource is not just for source code, it can be used for any content including sales, presales, marketing, solution, delivery or education in your organization.

Microsoft has been practicing InnerSource within the product groups to develop code for more than 5 years with early pockets of cross team collaboration on code reaching back many more years. In the string of collaboration efforts, the DevOps Dojo within Microsoft Professional Services is one of the more recent groups to use InnerSource, this time, to create content collaboratively.

14 changes: 14 additions & 0 deletions content/en/blog/20240515.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 'Hello World!'
image: "/images/events/Summit2021.JPG"
date: 2024-03-16
authors:
- "Yuki Hattori"
categories:
- "Case"
---


When done right, InnerSource is one of the most effective ways to release trapped value in the enterprise. InnerSource is not just for source code, it can be used for any content including sales, presales, marketing, solution, delivery or education in your organization.

Microsoft has been practicing InnerSource within the product groups to develop code for more than 5 years with early pockets of cross team collaboration on code reaching back many more years. In the string of collaboration efforts, the DevOps Dojo within Microsoft Professional Services is one of the more recent groups to use InnerSource, this time, to create content collaboratively.
14 changes: 14 additions & 0 deletions content/en/blog/20240516.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 'Hello World!'
image: "/images/events/Summit2021.JPG"
date: 2024-05-17
authors:
- "Yuki Hattori"
categories:
- "Patterns"
---


When done right, InnerSource is one of the most effective ways to release trapped value in the enterprise. InnerSource is not just for source code, it can be used for any content including sales, presales, marketing, solution, delivery or education in your organization.

Microsoft has been practicing InnerSource within the product groups to develop code for more than 5 years with early pockets of cross team collaboration on code reaching back many more years. In the string of collaboration efforts, the DevOps Dojo within Microsoft Professional Services is one of the more recent groups to use InnerSource, this time, to create content collaboratively.
9 changes: 9 additions & 0 deletions content/en/blog/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "InnerSource Blog"
subtitle: ""
description: "The InnerSource Commons Calendar."
draft: false
aliases:
- /blogs
---

104 changes: 104 additions & 0 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}

{{ $pages := .Data.Pages }}
{{ $pages = where $pages "Section" "in" "blogs" }}
{{ $latest := first 1 $pages }}
{{ $others := after 1 $pages }}
<style>
/* Hide the announcement banner */
.notice {
display: none;
}
body > section.section {
padding: 0;
}
.author {
font-size: 16px;
font-weight: 900;
color: black;
padding-right: 4px;
}
.text-gradient {
font-size: 16px;
font-weight: 900;
background: -webkit-linear-gradient(0deg, #0aa8a7, #0aa807);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
padding-right: 4px;
border:none;
}
.text-gradient:hover {
border:none;
}
p {
line-height: 24px;
}
.card-body{
padding-top:0px;
padding-bottom:0px;
margin-bottom: 20px;
}

</style>

<section class="section">
<div class="container">
<div class="row">
{{ range $latest }}
<div class="col-12 mb-5">
<div class="row">
<div class="col-md-6 mb-4 mb-md-0">
<a href="{{ default .Permalink .Params.redirect }}"{{ with .Params.target }} target="{{ . }}"{{ end }}>
<img src="{{ .Params.image | absURL }}" alt="{{.Title}}" class="img-fluid rounded-lg w-100">
</a>
</div>
<div class="col-md-6">
{{ range .Params.categories }}
<span href="#" class="text-gradient">{{ . }}</span>
{{ end }}
<h2><a href="{{ default .Permalink .Params.redirect }}"{{ with .Params.target }} target="{{ . }}"{{ end }} class="post-title">{{ .Title }}</a></h2>
<p class="card-text"> {{ .Summary }}</p>
<p>
{{ range .Params.authors}}
<span class="author">{{ . }}</span>
{{ end }}
<span><small class="text-muted">{{ .Date.Format "January 2, 2006" }}</small></span></p>
<a href="{{ default .Permalink .Params.redirect }}"{{ with .Params.target }} target="{{ . }}"{{ end }} class="btn-link">Read more</a>
</div>
</div>
</div>
{{ end }}
{{ range $others }}
<div class="col-lg-12 col-sm-12 mb-12">
<div class="card mb-3 border-0">
<div class="row no-gutters">
<div class="col-md-4">
<a href="{{ default .Permalink .Params.redirect }}"{{ with .Params.target }} target="{{ . }}"{{ end }}>
<img src="{{ .Params.image | absURL }}" alt="{{ .Title }}" class="card-img rounded-lg">
</a>
</div>
<div class="col-md-8">
<div class="card-body">
{{ range .Params.categories }}
<span class="text-gradient">{{ . }}</span>
{{ end }}
<h3><a href="{{ default .Permalink .Params.redirect }}"{{ with .Params.target }} target="{{ . }}"{{ end }} class="post-title">{{ .Title }}</a></h3>
<p class="card-text"><small class="text-muted">{{ .Summary }}</small></p>
<p>
{{ range .Params.authors}}
<span class="author">{{ . }}</span>
{{ end }}
<span><small class="text-muted">{{ .Date.Format "January 2, 2006" }}</small></span></p>
<a href="{{ default .Permalink .Params.redirect }}"{{ with .Params.target }} target="{{ . }}"{{ end }} class="btn-link">Read more</a>
</div>
</div>
</div>
</div>
</div>
{{ end }}
</div>
</div>
</section>

{{ end }}
39 changes: 39 additions & 0 deletions layouts/blog/rss.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
</item>
{{ end }}
</channel>
</rss>
14 changes: 14 additions & 0 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ define "main" }}

<section class="section section-first">
<div class="container">
<div class="row">
<div class="col-lg-10 mx-auto">
<img src="{{ .Params.image | absURL }}" alt="{{ .Title }}" class="img-fluid w-100 rounded mb-4">
<h2 class="mb-4">{{ .Title }}</h2>
<div class="content">{{.Content}}</div>
</div>
</div>
</div>
</section>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ end }}
<li class="breadcrumb-item">
{{ if eq .p1 .p2 }}
{{ .p1.Title | truncate 30 }}
<strong>{{ .p1.Title | truncate 30 }}</strong>
{{ else }}
<a href="{{ if eq .p1.CurrentSection.Title .p1.FirstSection.Title }}{{ .p1.Permalink }}{{ else }}{{ .p1.Permalink }}{{ end }}">{{ .p1.Title }}</a>
{{ end }}
Expand Down
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "innersourcecommons.org",
"version": "1.0.0",
"main": "",
"author": "",
"license": "ISC",
"description": "",
"scripts": {
"build": "hugo",
"build:preview": "hugo --baseURL \"${DEPLOY_PRIME_URL:-/}\" --buildDrafts --buildFuture",
"start": "hugo server"
},
"devDependencies": {
"autoprefixer": "^10.3.4",
"hugo-extended": "^0.88.1",
"postcss": "^8.4.38",
"postcss-cli": "^8.3.1"
}
}
Loading