Skip to content

Develop blog #5

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

Merged
merged 53 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6759423
Add PostIndex component
sjc5 Jun 20, 2021
982b5c7
Add Read More link to post list
sjc5 Jun 20, 2021
2f8e99e
Add posts and pagination to home page
sjc5 Jun 21, 2021
fa63702
Re-insert navbar to all pages
sjc5 Jun 21, 2021
f973e52
Add author and category pages
sjc5 Jun 21, 2021
f8adacd
Remove spaces from test category names
sjc5 Jun 21, 2021
13c5e35
Update various page templates and set up routes
sjc5 Jun 22, 2021
c504956
Refine styles
sjc5 Jun 22, 2021
426d698
Center headings and links on list pages
sjc5 Jun 22, 2021
ebff45c
Increase margin on author/category list items
sjc5 Jun 22, 2021
e51b07a
Fix post month display bug
sjc5 Jun 22, 2021
393c0bf
Proper theme switch integration
dennisreimann Jun 22, 2021
f894fe0
Continue developing blog
sjc5 Jun 30, 2021
d6236ec
Add conditional category nav links
sjc5 Jun 30, 2021
aeac87f
Add teaser images to post-list
sjc5 Jun 30, 2021
5bb921c
Add post images
sjc5 Jul 1, 2021
61240fd
Add post images
sjc5 Jul 1, 2021
02adac8
Update post list header behavior
sjc5 Jul 1, 2021
d58ecc5
Add home link on mobile, update post url, allow multiple categories
sjc5 Jul 1, 2021
14f2e5a
Fix multi-category title on mobile
sjc5 Jul 1, 2021
4bd4d42
Handle posts with multiple authors
sjc5 Jul 1, 2021
6b71b2b
Make desktop category links lowercase
sjc5 Jul 1, 2021
289900a
Link h1 title (BTCPay Server Blog) to root
sjc5 Jul 1, 2021
7eb8787
Update styles and begin data migration from WordPress
sjc5 Jul 2, 2021
0440561
Update styles and continue data migration
sjc5 Jul 2, 2021
53c4db6
Update styles
sjc5 Jul 2, 2021
ad015b3
Increase category link font size
sjc5 Jul 2, 2021
edc4609
Upgrade Jest
dennisreimann Jul 2, 2021
50b4370
Fix category links by lowercasing category name
dennisreimann Jul 2, 2021
18372f0
Fix linkcheck
dennisreimann Jul 2, 2021
c087f02
Improve pagination styles
dennisreimann Jul 2, 2021
d7e760e
Merge branch 'develop-blog' of github.com:btcpayserver/blog into deve…
sjc5 Jul 2, 2021
a62b9e1
Handle category link capitalization
sjc5 Jul 2, 2021
e703b6c
Fix author frontmatter typos
sjc5 Jul 2, 2021
cf6145a
Develop post page template (meta / sponsors)
sjc5 Jul 7, 2021
8ff652d
Refactor Categories.vue & complete data migration
sjc5 Jul 8, 2021
624c9a0
Add sponsors section to posts & fix errors
sjc5 Jul 8, 2021
79827b5
Make sponsors section responsive on mobile
sjc5 Jul 8, 2021
e4e2160
Correct markdown conversion errors
sjc5 Jul 8, 2021
fbcfbbf
Remove/fix broken links
sjc5 Jul 8, 2021
82dad92
Optimize padding on small screens, fix links
sjc5 Jul 8, 2021
5748336
Link fixes
dennisreimann Jul 8, 2021
b9e57cd
Fix search in dark mode, meta links & last updated
sjc5 Jul 9, 2021
b72ef74
Merge branch 'develop-blog' of github.com:btcpayserver/blog into deve…
sjc5 Jul 9, 2021
edd2749
Sync mobile/desktop nav category list/order
sjc5 Jul 9, 2021
68846f0
Improve category link styles
dennisreimann Jul 9, 2021
f47f2b0
Add missing iteration keys
dennisreimann Jul 9, 2021
fced252
Add IndexPost reference
dennisreimann Jul 9, 2021
ac44d23
Upgrade dependencies
dennisreimann Jul 9, 2021
3f2559a
Add key
dennisreimann Jul 9, 2021
cb290af
Extract capitalize filter
dennisreimann Jul 9, 2021
b797f0f
Improve titles
dennisreimann Jul 9, 2021
b5824d8
Add sponsors section to all pages
sjc5 Jul 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
54 changes: 54 additions & 0 deletions blog/.vuepress/components/Categories.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<div>
<ul class="categories-list">
<li v-for="category in $category.list" :key="category.path">
<span
v-if="$page.frontmatter.title == category.name + ' '"
class="active-link"
>
{{ category.name | capitalize }}
</span>

<router-link v-else class="page-link" :to="category.path">
{{ category.name | capitalize }}
</router-link>
</li>
</ul>
</div>
</template>

<script>
import { capitalize } from '../filters'

export default {
filters: {
capitalize
}
}
</script>

<style scoped>
.categories-list {
display: flex;
list-style-type: none;
padding: 1rem 3rem;
text-align: center;
margin-top: -0.5rem !important;
justify-content: space-around;
}
.page-link {
color: var(--btcpay-header-link);
text-decoration: none !important;
font-weight: var(--btcpay-font-weight-semibold);
}
.page-link:hover,
.page-link:focus {
color: var(--btcpay-header-link-accent);
}
.active-link,
.active-link:hover {
cursor: default;
color: var(--btcpay-header-link-active);
font-weight: var(--btcpay-font-weight-semibold);
}
</style>
70 changes: 70 additions & 0 deletions blog/.vuepress/components/PostMeta.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<div>
<h1 class="index-post-title">
{{ $page.frontmatter.title }}
</h1>
<p class="meta">
Posted in

<router-link
v-if="!Array.isArray($page.frontmatter.category)"
:to="'/category/' + $page.frontmatter.category"
class="meta-link"
>
{{ $page.frontmatter.category | capitalize }}</router-link
>

<span v-else v-for="(item, index) in $page.frontmatter.category" :key="item">
<router-link :to="'/category/' + item" class="meta-link">{{
item | capitalize
}}</router-link
><span v-if="index != $page.frontmatter.category.length - 1">, </span>
</span>

by

<router-link
v-if="!Array.isArray($page.frontmatter.author)"
:to="'/author/' + $page.frontmatter.author"
class="meta-link"
>
{{ $page.frontmatter.author }}</router-link
>

<span v-else v-for="(item, index) in $page.frontmatter.author" :key="item">
<router-link :to="'/author/' + item" class="meta-link">{{
item
}}</router-link
><span v-if="index != $page.frontmatter.author.length - 1">, </span>
</span>

on

{{ new Date($page.frontmatter.date).getMonth() + 1 }}/{{
new Date($page.frontmatter.date).getDate() + 1
}}/{{ new Date($page.frontmatter.date).getFullYear() }}
</p>

<img
v-if="$page.frontmatter.coverImage"
:src="$page.frontmatter.coverImage"
class="cover-image"
/>
</div>
</template>

<script>
import { capitalize } from '../filters'

export default {
filters: {
capitalize
}
}
</script>

<style scoped>
.meta {
padding-top: 0.5rem;
}
</style>
73 changes: 73 additions & 0 deletions blog/.vuepress/components/Sponsors.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<template>
<div class="theme-default-content sponsors">
<hr />
<p>
We are proudly supported by these entities through the
<a href="https://foundation.btcpayserver.org/" target="_blank"
>BTCPay Server Foundation</a
>:
</p>
<div class="sponsors-logos">
<a href="https://www.kraken.com" target="_blank" class="sponsor-item">
<img class="logo" src="/images/krakenlogo-150x150.png" />
Kraken
</a>
<a
href="https://twitter.com/sqcrypto"
target="_blank"
class="sponsor-item"
>
<img class="logo" src="/images/squarecrypto-150x150.png" />
Square Crypto
</a>
<a href="https://acinq.co/" target="_blank" class="sponsor-item">
<img class="logo" src="/images/acinq-logo-289x300.png" />
ACINQ
</a>
<a href="https://www.lunanode.com/" target="_blank" class="sponsor-item">
<img class="logo" src="/images/lunanode-150x150.png" />
LunaNode
</a>
<a
href="https://walletofsatoshi.com/"
target="_blank"
class="sponsor-item"
>
<img class="logo" src="/images/walletofsatoshi-150x150.png" />
Wallet of Satoshi
</a>
<a href="https://nomics.com/" target="_blank" class="sponsor-item">
<img class="logo" src="/images/nomicspng-150x150.png" />
Nomics
</a>
<a href="https://coincards.com/" target="_blank" class="sponsor-item">
<img class="logo" src="/images/coincards-150x150.png" />
Coincards
</a>
</div>
</div>
</template>

<style scoped>
.sponsors hr {
margin-top: -3rem !important;
}

.sponsors-logos {
display: flex;
justify-content: space-around;
padding-bottom: 3rem;
flex-wrap: wrap;
}

.sponsor-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 5px;
}

.sponsor-item img {
max-width: 60px;
}
</style>
71 changes: 63 additions & 8 deletions blog/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { capitalize } = require('./filters')
const { resolve } = require('path')
const implicitFigures = require('markdown-it-implicit-figures')
const slugify = require('./slugify')
Expand All @@ -20,15 +21,16 @@ module.exports = {
title,
description: "Official BTCPay Server Blog",
head: [
["link", { rel: "stylesheet", href: "/styles/btcpayserver-variables.css" }]
["link", { rel: "stylesheet", href: "/styles/btcpayserver-variables.css" }],
['link', { rel: "shortcut icon", href: "/favicon.ico" }],
],
chainWebpack (config) {
chainWebpack(config) {
config.module
.rule('md')
.test(/\.md$/)
.use(preprocessMarkdown)
.loader(preprocessMarkdown)
.end()
.loader(preprocessMarkdown)
.end()
},
plugins: [
['seo', {
Expand Down Expand Up @@ -59,14 +61,60 @@ module.exports = {
hostname: baseUrl,
exclude: ['/404.html']
},
},]
directories: [
{
id: 'post',
dirname: '_posts',
title: '', // effectively sets home page title to just "BTCPay Server Blog"
path: '/',
pagination: {
lengthPerPage: 3,
getPaginationPageTitle(pageNumber) {
return `Page ${pageNumber}`
}
},
itemPermalink: '/:slug',
},
],
frontmatters: [
{
id: 'category',
keys: ['category', 'categories'],
path: '/category/',
title: '', // sets extended title of individual category pages (follows author name)
frontmatter: {
title: 'Categories', // sets title of /category/ page
},
pagination: {
getPaginationPageTitle(pageNumber, key) {
return `${capitalize(key)} - Page ${pageNumber}`
}
},
},
{
id: 'author',
keys: ['author', 'authors'],
path: '/author/',
title: '', // sets extended title of individual author pages (follows category name)
frontmatter: {
title: 'Authors', // sets title of /author/ page
},
pagination: {
getPaginationPageTitle(pageNumber, key) {
return `${key} - Page ${pageNumber}`
}
}
},
],
},],
],
markdown: {
extendMarkdown (md) {
extendMarkdown(md) {
md.use(implicitFigures)
},
pageSuffix,
slugify
slugify,
lineNumbers: true,
},
themeConfig: {
domain: baseUrl,
Expand All @@ -76,6 +124,13 @@ module.exports = {
docsDir: "blog",
sidebarDepth: 0,
nav: [
{ text: 'Home', link: `/` },
{ text: 'Releases', link: `/category/releases/` },
{ text: 'Stories', link: `/category/stories/` },
{ text: 'Guides', link: `/category/guides/` },
{ text: 'Announcements', link: `/category/announcements/` },
{ text: 'Features', link: `/category/features/` },
{ text: 'Plugins', link: `/category/plugins/` },
{
text: "Website",
link: "https://btcpayserver.org/",
Expand All @@ -95,7 +150,7 @@ module.exports = {
text: "Twitter",
link: "https://twitter.com/BtcpayServer",
rel: "noopener noreferrer twitter"
}
},
]
}
}
37 changes: 1 addition & 36 deletions blog/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const redirects = require('./redirects')
const { COLOR_MODES, STORE_ATTR, setColorMode } = require('./themeSwitch')

// https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
const openVideo = embedEl => {
Expand Down Expand Up @@ -28,17 +29,6 @@ const handleClick = e => {
}

// Theme Switch
const COLOR_MODES = ['light', 'dark']
const THEME_ATTR = 'data-btcpay-theme'
const STORE_ATTR = 'btcpay-theme'

function setColorMode (mode) {
if (COLOR_MODES.includes(mode)) {
window.localStorage.setItem(STORE_ATTR, mode)
document.documentElement.setAttribute(THEME_ATTR, mode)
}
}

if (typeof process === 'undefined' || process.env.VUE_ENV !== 'server') {
const systemColorMode = window.matchMedia('(prefers-color-scheme: dark)').matches ? COLOR_MODES[1] : COLOR_MODES[0]
const userColorMode = window.localStorage.getItem(STORE_ATTR)
Expand All @@ -57,31 +47,6 @@ export default ({ router }) => {

// initial page rendering
app.$once('hook:mounted', () => {
setTimeout(() => {
// append theme switch
const navbar = document.querySelector('.navbar .links')
if (navbar) {
var btn = document.createElement('button')
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
btn.setAttribute('class', 'btcpay-theme-switch')
svg.setAttribute('viewBox','0 0 10 10')
svg.setAttribute('width','10')
svg.setAttribute('height','10')
svg.innerHTML = '<path class="btcpay-theme-switch-dark" transform="translate(1 1)" d="M2.72 0A3.988 3.988 0 000 3.78c0 2.21 1.79 4 4 4 1.76 0 3.25-1.14 3.78-2.72-.4.13-.83.22-1.28.22-2.21 0-4-1.79-4-4 0-.45.08-.88.22-1.28z"/><path class="btcpay-theme-switch-light" transform="translate(1 1)" d="M4 0c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5S4.28 0 4 0zM1.5 1c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm5 0c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM4 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM.5 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 0c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM1.5 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm5 0c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM4 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5S4.28 7 4 7z"/>'
btn.appendChild(svg)
navbar.appendChild(btn)

document.querySelectorAll(".btcpay-theme-switch").forEach(function (link) {
link.addEventListener("click", function (e) {
e.preventDefault()
const current = document.documentElement.getAttribute(THEME_ATTR) || COLOR_MODES[0]
const mode = current === COLOR_MODES[0] ? COLOR_MODES[1] : COLOR_MODES[0]
setColorMode(mode)
})
})
}
}, 250)

// temporary fix for https://github.com/vuejs/vuepress/issues/2428
setTimeout(() => {
const { hash } = document.location
Expand Down
5 changes: 5 additions & 0 deletions blog/.vuepress/filters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
capitalize (value) {
return value.replace(/^\w/, c => c.toUpperCase())
}
}
Binary file added blog/.vuepress/public/images/1.0.3.127.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.0.3.128-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.0.3.128.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.0.3.132.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.0.3.137.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.0.3.147.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.0.8.0.FIDO2_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/BTCP2P-BTCPay.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/.vuepress/public/images/BTCPAY-2019.png
Binary file added blog/.vuepress/public/images/BTCPay-Day.jpg
Binary file added blog/.vuepress/public/images/BTCPay-Invoices.gif
Binary file added blog/.vuepress/public/images/BTCPay-PoS-App-2.png
Binary file added blog/.vuepress/public/images/BTCPay-PoS-App-6.png
Binary file added blog/.vuepress/public/images/BTCPay10506.png
Binary file added blog/.vuepress/public/images/BTCPay1060png.png
Binary file added blog/.vuepress/public/images/BTCPayB-day.jpg
Binary file added blog/.vuepress/public/images/BTCPayFoundation.jpg
Binary file added blog/.vuepress/public/images/BTCPaySimplePoS.png
Binary file added blog/.vuepress/public/images/BitPaint_Profil.gif
Binary file added blog/.vuepress/public/images/Bitcoin.jpg
Binary file added blog/.vuepress/public/images/BitcoinPayLink.png
Binary file added blog/.vuepress/public/images/BitcoinPayLink2.png
Binary file added blog/.vuepress/public/images/Brian_Harrington.jpg
Binary file added blog/.vuepress/public/images/Capture.png
Binary file added blog/.vuepress/public/images/Chris-768x1024.jpg
Binary file added blog/.vuepress/public/images/Chris.jpg
Binary file added blog/.vuepress/public/images/CoinSelection.png
Binary file added blog/.vuepress/public/images/DocsDark.png
Binary file added blog/.vuepress/public/images/DocsLight.png
Binary file added blog/.vuepress/public/images/DoubleSpending.png
Binary file added blog/.vuepress/public/images/EEk3LgmXUAA0_9v.jpg
Binary file added blog/.vuepress/public/images/Group-49.png
Binary file added blog/.vuepress/public/images/IMG_3254.jpg
Binary file added blog/.vuepress/public/images/IMG_3256.jpg
Binary file added blog/.vuepress/public/images/IMG_3259.jpg
Binary file added blog/.vuepress/public/images/Konstantin.jpg
Binary file added blog/.vuepress/public/images/Notifications.png
Binary file added blog/.vuepress/public/images/POS-Inventory.jpg
Binary file added blog/.vuepress/public/images/POS_QOL.png
Binary file added blog/.vuepress/public/images/Pairing-BTCPay.png
Binary file added blog/.vuepress/public/images/PaymentRequest.png
Binary file added blog/.vuepress/public/images/Point-of-Sale.png
Binary file added blog/.vuepress/public/images/PullPayments-1.png
Binary file added blog/.vuepress/public/images/PullPayments-2-1.png
Binary file added blog/.vuepress/public/images/PullPayments-2.png
Binary file added blog/.vuepress/public/images/PullPayments-3.png
Binary file added blog/.vuepress/public/images/PullPayments-4.png
Binary file added blog/.vuepress/public/images/RTL-BTCPay.png
Binary file added blog/.vuepress/public/images/RTL-in-BTCPay.png
Binary file added blog/.vuepress/public/images/Refund2.png
Binary file added blog/.vuepress/public/images/RefundClaimed.png
Binary file added blog/.vuepress/public/images/RefundCustomerUI.png
Binary file added blog/.vuepress/public/images/ScanWallet.png
Binary file added blog/.vuepress/public/images/Sl5VZo41.png
Binary file added blog/.vuepress/public/images/Snag_141f090.png
Binary file added blog/.vuepress/public/images/Store-Setup.png
Binary file added blog/.vuepress/public/images/TwitterDonations.png
Binary file added blog/.vuepress/public/images/YT_05.png
Binary file added blog/.vuepress/public/images/customnode_view.png
Loading