feat: port Wowchemy blog template from Bootstrap to Tailwind

This commit is contained in:
George Cushen 2023-10-24 18:46:21 +01:00
commit 5678df1da9
23 changed files with 558 additions and 0 deletions

2
starters/blog/.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,2 @@
github: gcushen
custom: https://wowchemy.com/sponsor/

BIN
starters/blog/.github/preview.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -0,0 +1,63 @@
name: Deploy Wowchemy website to GitHub Pages
on:
# Trigger the workflow every time you push to the `main` branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# Provide permission to clone the repo and deploy it to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build website
build:
if: github.repository_owner != 'wowchemy'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Fetch history for Hugo's .GitInfo and .Lastmod
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.119.0'
extended: true
- uses: actions/cache@v3
with:
path: /home/runner/.cache/hugo_cache # Cache path for Hugo v0.116.0+
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
run: |
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
# Deploy website to GitHub Pages hosting
deploy:
if: github.repository_owner != 'wowchemy'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

21
starters/blog/LICENSE.md Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020-present George Cushen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

40
starters/blog/README.md Normal file
View file

@ -0,0 +1,40 @@
<!--<p align="center"><a href="https://wowchemy.com" target="_blank" rel="noopener"><img src="https://sourcethemes.com/academic/img/logo_200px.png" alt="Wowchemy Website Builder"></a></p>-->
# [Hugo Minimal Blog Theme](https://github.com/wowchemy/hugo-blog-theme)
[![Screenshot](./.github/preview.png)](https://wowchemy.com/templates/)
The **Hugo Minimal Blog Template** empowers you to easily create your own _personal blog_ or _build a business around your content_.
**Trusted by 250,000+ researchers, educators, and students.** Highly customizable via the integrated **no-code, widget-based Wowchemy page builder**, making every site truly personalized ⭐⭐⭐⭐⭐
[![Get Started](https://img.shields.io/badge/-Get%20started-ff4655?style=for-the-badge)](https://wowchemy.com/templates/)
[![Discord](https://img.shields.io/discord/722225264733716590?style=for-the-badge)](https://discord.com/channels/722225264733716590/742892432458252370/742895548159492138)
[![Twitter Follow](https://img.shields.io/twitter/follow/wowchemy?label=Follow%20on%20Twitter)](https://twitter.com/wowchemy)
Easily write technical content with plain text Markdown, LaTeX math, diagrams, RMarkdown, or Jupyter, and import publications from BibTeX.
[Check out the latest demo](https://hugo-blog-theme.netlify.app/) of what you'll get in less than 10 minutes, or [view the showcase](https://wowchemy.com/creators/).
The integrated [**Wowchemy**](https://wowchemy.com) website builder and CMS makes it easy to create a beautiful website for free. Edit your site in the CMS (or your favorite editor), generate it with [Hugo](https://github.com/gohugoio/hugo), and deploy with GitHub or Netlify. Customize anything on your site with widgets, light/dark themes, and language packs.
- 👉 [**Get Started**](https://wowchemy.com/templates/)
- 📚 [View the **documentation**](https://university.wowchemy.com/)
- 💬 [Chat with the **Wowchemy research community**](https://discord.gg/z8wNYzb) or [**Hugo community**](https://discourse.gohugo.io)
- ⬇️ **Automatically import citations from BibTeX** with the [Hugo Academic CLI](https://github.com/wowchemy/hugo-academic-cli)
- 🐦 Share your new site with the community: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%23MadeWithWowchemy&src=typed_query)
- 🗳 [Take the survey and help us improve #OpenSource](https://forms.gle/NioD9VhUg7PNmdCAA)
- 🚀 [Contribute improvements](https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/CONTRIBUTING.md) or [suggest improvements](https://github.com/wowchemy/wowchemy-hugo-themes/issues)
- ⬆️ **Updating?** View the [Update Guide](https://university.wowchemy.com/) and [Release Notes](https://github.com/wowchemy/wowchemy-hugo-themes/releases)
## We ask you, humbly, to support this open source movement
Today we ask you to defend the open source independence of the Wowchemy website builder and themes 🐧
We're an open source movement that depends on your support to stay online and thriving, but 99.9% of our creators don't give; they simply look the other way.
### [❤️ Click here to become a GitHub Sponsor, unlocking awesome perks such as _exclusive academic templates and widgets_](https://github.com/sponsors/gcushen)
## Demo credits
- [Unsplash](https://unsplash.com/) images

2
starters/blog/assets/dist/wc.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,92 @@
# Configuration of Hugo
# Guide: https://wowchemy.com/docs/getting-started/
# Hugo Documentation: https://gohugo.io/getting-started/configuration/#all-configuration-settings
# This file is formatted using YAML syntax - learn more at https://learnxinyminutes.com/docs/yaml/
title: Minimal Hugo Blog Theme # Website name
baseURL: 'https://example.com/' # Website URL
############################
## PAGE OPTIONS
############################
cascade:
# Blog post options
- _target:
path: /post/**
pager: true
editable: true
reading_time: true
commentable: true
show_related: true
show_breadcrumb: true
share: true
header:
navbar:
enable: false
############################
## LANGUAGE
############################
defaultContentLanguage: en
hasCJKLanguage: false
defaultContentLanguageInSubdir: false
removePathAccents: true
############################
## MODULES
############################
module:
imports:
- path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify
- path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-tailwind
############################
## ADVANCED
############################
build:
writeStats: true
enableGitInfo: false
summaryLength: 30
paginate: 10
enableEmoji: true
enableRobotsTXT: true
footnotereturnlinkcontents: <sup>^</sup>
ignoreFiles: [\.ipynb$, .ipynb_checkpoints$, \.Rmd$, \.Rmarkdown$, _cache$]
permalinks:
authors: '/author/:slug/'
tags: '/tag/:slug/'
categories: '/category/:slug/'
disableAliases: true
outputs:
home: [HTML, RSS, headers, redirects]
section: [HTML, RSS]
imaging:
resampleFilter: lanczos
quality: 95
anchor: smart
timeout: 600000
taxonomies:
tag: tags
category: categories
author: authors
markup:
_merge: deep
highlight:
lineNos: false
related:
threshold: 80
includeNewer: true
toLower: true
indices:
- name: tags
weight: 100
- name: categories
weight: 70
security:
_merge: deep
sitemap:
_merge: deep

View file

@ -0,0 +1,22 @@
# Languages
# Create a section for each of your site's languages.
# Documentation: https://wowchemy.com/docs/guide/language/
# Default language
en:
languageCode: en-us
# Uncomment for multi-lingual sites, and move English content into `en` sub-folder.
#contentDir: content/en
# Uncomment the lines below to configure your website in a second language.
#zh:
# languageCode: zh-Hans
# contentDir: content/zh
# title: Chinese website title...
# params:
# description: Site description in Chinese...
# menu:
# main:
# - name: 传
# url: '#about'
# weight: 1

View file

@ -0,0 +1,15 @@
# Navigation Links
# To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
# desired widget in your `content/home/` folder.
# The weight parameter defines the order that the links will appear in.
main:
- name: Home
url: /
weight: 10
- name: Blog
url: post/
weight: 20
- name: Uses
url: uses/
weight: 30

View file

@ -0,0 +1,50 @@
# SITE SETUP
# Guide: https://wowchemy.com/docs/getting-started/
# Documentation: https://wowchemy.com/docs/
# This file is formatted using YAML syntax - learn more at https://learnxinyminutes.com/docs/yaml/
# SEO
marketing:
seo:
site_type: Person
local_business_type: ''
org_name: ''
description: 'A highly-customizable Hugo blog theme powered by Wowchemy website builder.'
twitter: 'wowchemy'
analytics:
google_analytics: ''
baidu_tongji: ''
verification:
google: ''
baidu: ''
footer:
copyright:
notice: '© {year} Me. This work is licensed under {license}'
license:
enable: true
allow_derivatives: false
share_alike: true
allow_commercial: false
# Localization
locale:
date_format: 'Jan 2, 2006'
time_format: '3:04 PM'
# Site features
features:
syntax_highlighter:
theme_light: github-light
theme_dark: github-dark
math:
enable: false
privacy_pack:
enable: false
repository:
url: 'https://github.com/<username>/<repository>'
content_dir: content
branch: main

View file

@ -0,0 +1,14 @@
---
title: 'Home'
date: 2023-10-24
type: landing
sections:
- block: about.avatar
content:
username: admin # The user's folder name in content/authors/
- block: collection
content:
filters:
folders:
- post
---

View file

@ -0,0 +1,9 @@
---
# To publish author profile pages, remove all the `_build` and `cascade` settings below.
_build:
render: never
cascade:
_build:
render: never
list: always
---

View file

@ -0,0 +1,61 @@
---
# Display name
title: 吳健雄
# Name pronunciation (optional)
name_pronunciation: Chien Shiung Wu
# Full name (for SEO)
first_name: Shiung Wu
last_name: Chien
# Status emoji
status:
icon: ☕️
# Is this the primary user of the site?
superuser: true
# Role/position/tagline
role: Professor of Artificial Intelligence
# Organizations/Affiliations to show in About widget
organizations:
- name: Stanford University
url: https://www.stanford.edu/
# Short bio (displayed in user profile at end of posts)
bio: My research interests include distributed robotics, mobile computing and programmable matter.
# Social Networking
# Need to use another icon? Simply download the SVG icon to your `assets/media/icons/` folder.
social:
- icon: send
icon_pack: wc
link: 'mailto:your-email@example.com'
- icon: twitter
icon_pack: wc
link: https://twitter.com/wowchemy
label: Follow me on Twitter
- icon: github
icon_pack: wc
link: https://github.com/gcushen
- icon: linkedin
icon_pack: wc
link: https://www.linkedin.com/
# Link to a PDF of your resume/CV - upload it to `static/uploads/resume.pdf`
- icon: cv
icon_pack: wc
link: uploads/resume.pdf
- icon: rss
icon_pack: wc
link: ./post/index.xml
# Highlight the author in author lists? (true/false)
highlight_name: true
---
Chien Shiung Wu is a professor of artificial intelligence at the Stanford AI Lab. Her research interests include
distributed robotics, mobile computing and programmable matter. She leads the Robotic Neurobiology group, which develops
self-reconfiguring robots, systems of self-organizing robots, and mobile sensor networks.
{style="text-align: justify; font-size: 0.8em;"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,3 @@
---
title: Blog
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

View file

@ -0,0 +1,113 @@
---
title: 🤩 Easily write any kind of content with Wowchemy
summary: Highlight code snippets, take notes on math classes, and draw diagrams from textual representation.
date: 2023-10-24
math: true
tags:
- Hugo
- Wowchemy
- Markdown
image:
caption: 'Even author content with $\LaTeX$'
---
Wowchemy is designed to give technical content creators a seamless experience. You can focus on the content and Wowchemy handles the rest.
**Highlight your code snippets, take notes on math classes, and draw diagrams from textual representation.**
On this page, you'll find some examples of the types of technical content that can be rendered with Wowchemy.
## Examples
### Math
Wowchemy supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the `math` option in your `config/_default/params.yaml` file.
To render _inline_ or _block_ math, wrap your LaTeX math with `{{</* math */>}}$...${{</* /math */>}}` or `{{</* math */>}}$$...$${{</* /math */>}}`, respectively. (We wrap the LaTeX math in the Wowchemy _math_ shortcode to prevent Hugo rendering our math as Markdown.)
Example **math block**:
```latex
{{</* math */>}}
$$
\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}
$$
{{</* /math */>}}
```
renders as
{{< math >}}
$$\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$
{{< /math >}}
Example **inline math** `{{</* math */>}}$\nabla F(\mathbf{x}_{n})${{</* /math */>}}` renders as {{< math >}}$\nabla F(\mathbf{x}_{n})${{< /math >}}.
Example **multi-line math** using the math linebreak (`\\`):
```latex
{{</* math */>}}
$$f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} & \text{if }k=1, \\
1-p_{0}^{*} & \text{if }k=0.\end{cases}$$
{{</* /math */>}}
```
renders as
{{< math >}}
$$
f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} & \text{if }k=1, \\
1-p_{0}^{*} & \text{if }k=0.\end{cases}
$$
{{< /math >}}
### Data Frames
Save your spreadsheet as a CSV file in your page's folder and then render it by adding the _Table_ shortcode to your page:
```go
{{</* table path="results.csv" header="true" caption="Table 1: My results" */>}}
```
renders as
{{< table path="results.csv" header="true" caption="Table 1: My results" >}}
### Code
Wowchemy utilises Hugo's Markdown extension for highlighting code syntax. The code theme can be selected in the `config/_default/params.yaml` file.
```python
import pandas as pd
data = pd.read_csv("data.csv")
data.head()
```
renders as
```python
import pandas as pd
data = pd.read_csv("data.csv")
data.head()
```
### Todo lists
You can even write your todo lists in Markdown too:
```markdown
- [x] Write math example
- [x] Write diagram example
- [ ] Do something else
```
renders as
- [x] Write math example
- [x] Write diagram example
- [ ] Do something else
### Did you find this page helpful? Consider sharing it 🙌

View file

@ -0,0 +1,4 @@
customer_id, score
1,0
2,0.5
3,1
1 customer_id score
2 1 0
3 2 0.5
4 3 1

View file

@ -0,0 +1,20 @@
---
title: Uses
date: 2023-10-24
---
The idea of a Uses page is to tell you about the stuff I use.
Make sure to check out [uses.tech](https://uses.tech/) for a list of everyone's Uses pages!
I often get asked about what software or hardware I use, so this page will serve as a living document and a place to point curious readers to when I get asked.
## Editor + Terminal
- [Visual Studio Code](https://code.visualstudio.com/) is my current editor
- Chrome is my main browser
- iTerm2 is my terminal
## Desktop Apps
- Better Touch Tool for window management and custom keyboard shortcuts

6
starters/blog/go.mod Normal file
View file

@ -0,0 +1,6 @@
module github.com/wowchemy/wowchemy-hugo-themes/starters/blog
go 1.19
require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20231024173257-66e3c7e27eb0
require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-tailwind v0.0.0-20231024173257-66e3c7e27eb0 // indirect

View file

@ -0,0 +1,21 @@
[build]
command = "hugo --gc --minify -b $URL"
publish = "public"
[build.environment]
HUGO_VERSION = "0.119.0"
HUGO_ENABLEGITINFO = "true"
[context.production.environment]
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[[plugins]]
package = "netlify-plugin-hugo-cache-resources"
[plugins.inputs]
debug = true

Binary file not shown.