Code Monkey home page Code Monkey logo

whiteplain's Introduction

Whiteplain

CircleCI

This is simple and functional Hugo theme.

Installation

$ git clone https://github.com/taikii/whiteplain.git themes/whiteplain

Or

$ git submodule add https://github.com/taikii/whiteplain.git themes/whiteplain

More colors

This theme automatically switches between light and dark styles depending on the OS color scheme. You can fix the light or dark style by adding the following theme.

  • Dark Fix in dark style.
  • Light Fix in light style.

Usage

Configration

baseurl = "https://example.com/"
title = "Whiteplain"
theme = "whiteplain"
languageCode = "en"
# Disqus shortname
disqusShortname = "Shortname"
# google analytics tracking id
googleAnalytics = "Toracking ID"

# Copyright notice. This is displayer in the footer.
copyright = "© Copyright 2017 Your name"

[params]
  # whether to use CDN or local file for fontawesome
  #useCDN = false
  # whether to include external sharing scripts and icons for twitter, facebook and co.
  #showShareIcons = false
  # Date format
  #dateFormat = "January 2, 2006"

# This is displayer in About page.
[params.author]
  name = "Your name"
  # Gravatar or Abatar image
  gravatar = "Gravatar email or MD5 Hash"
  #avatar = "/path/to/avatar"

  x = "X username"
  twitter = "Twitter username"
  facebook = "Facebook username"
  googleplus = "Googleplus username"
  instagram = "Instagram username"
  threads = "Threads username"
  tumblr = "Tumblr username"
  flickr = "Flickr username"
  reddit = "Reddit username"
  linkedin = "Linkedin username"
  slideshare = "Slideshare username"
  github = "Github username"
  gitlab = "Gitlab username"
  bitbucket = "Bitbucket username"
  stackoverflow = "Stackoverflow username"
  jsfiddle = "Jsfiddle username"
  codepen = "Codepen username"
  deviantart = "Deviantart username"
  behance = "Behance username"
  dribbble = "Dribbble username"
  wordpress = "Wordpress username"
  medium = "Medium username"
  foursquare = "Foursquare username"
  xing = "Xing username"
  quora = "Quora username"
  youtube = "YouTube username"
  tiktok = "TikTok username"
  vimeo = "Vimeo username"
  whatsapp = "Whatsapp username"
  skype = "Skype username"
  snapchat = "Snapchat username"
  pinterest = "Pinterest username"
  telegram = "Telegram username"
  vine = "Vine username"
  email = "Your email"

[[params.author.social]]
  name = "Custom social link1"
  iclass = "fa-brands fa-github"
  url = "https://example.com/whiteplain"

[[params.author.social]]
  name = "Custom social link2"
  iclass = "fa-brands fa-google"
  url = "https://example.com/whiteplain"

[taxonomies]
  category = "categories"
  tag = "tags"
  series = "series"

# Header Menu
[[menu.main]]
  name = "Categories"
  identifier = "categories"
  url = "/categories/"
  weight = 1
[[menu.main]]
  name = "Tags"
  identifier = "tags"
  url = "/tags/"
  weight = 2
[[menu.main]]
  name = "Archives"
  identifier = "archives"
  url = "/archives/"
  weight = 3
[[menu.main]]
  name = "About"
  identifier = "about"
  url = "/about/"
  weight = 4

# Footer Menu
[[menu.footer]]
  name = "About"
  weight = 1
  identifier = "about"
  url = "/about/"

Archives page

The Archive page will be displayed, if you create content/archives/_index.html. The file can be 0 bytes.

Hugo site direcctory
└── content
    └── archives
        └── _index.md

About page

The author information is displayed on the About page. You should create an About page in content/about/_index.md.

Your site direcctory
└── content
    └── about
        └── _index.md

Customize Stylesheet and Javascript

You can customize Stylesheet and Javascript. When you create static/css/custom.css static/js/custom.js, it will be loaded automatically.

Default Syntax highlighter style is monokai. If you want to change the style, create static/css/syntax.css. See Hugo Syntax Highlighting about Syntax highlighting.

Your site direcctory
└── static
    ├── css
    │   ├── custom.css
    │   └── syntax.css
    └── js
        └── custom.js

If you want to use libraries and frameworks, create layouts/partials/head_custom.html. Its contents are read into <head>...</head>.

Your site direcctory
├── layouts
     └── partials
         └── head_custom.html

Customize Share Buttons

  1. Copy themes/whiteplain/layouts/partials/share.html to layouts/partials/share.html.
  2. Customize layouts/partials/share.html.
Your site direcctory
├── layouts
│   └── partials
│       └── share.html
└── themes
    └── whiteplain
        └── layouts
            └── partials
                └── share.html

Customize Author SNS Icons

  1. Copy themes/whiteplain/layouts/partials/social.html to layouts/partials/social.html.
  2. Customize layouts/partials/social.html.
Your site direcctory
├── layouts
│   └── partials
│       └── social.html
└── themes
    └── whiteplain
        └── layouts
            └── partials
                └── social.html

Icons

This theme using Font Awesome.

License

MIT

whiteplain's People

Contributors

dadosch avatar hapr05 avatar indr avatar josephting avatar nonumeros avatar robotastray avatar taikii avatar tommorris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

whiteplain's Issues

can not use categories page

I add categories=["type"]in my front matter, it's in toml
it looks like:

+++
author= "luosuu"
title= "title"
date= 2019-11-12T10:30:46+08:00
discription=""
categoires=["notes"]
weight=1
tags=["some tags"]
toc=true
+++

but in categories page there is nothing.
I don't konw whether I should change something in congfig.toml or should add a html file somewhere.Thanks you

Issue with link to static assets

Please see the attached screenshot.

I would like to serve the site from a sub-directory, but the css and js assets are getting a 404 because the links arent relative.
How do i fix that?

image

[Enhancement]Adding TOC for all widths ?

Awesome theme!
But I have encountered a problem, which can be considered more like an enhancement. Currently, the theme omits TOC for devices like cell phones. Is there a way to enable it regardless of the display width?

Images missing max-width property

Hello!

I've stumbled upon the very same issue as the dim0627/hugo_theme_beg#19, only part of the image visible on the screenshot where whole should be:
image

Source code:

![Shinken simple distributed architecture](https://shinken.readthedocs.io/en/latest/_images/shinken-architecture.png)

Change the font of code

Is there any way to change the font style of code? I am recently using this theme in R blogdown. I am looking for the way that could make the font of my R codes look better.

How to insert image in my post?

Firstly, I am lovin' your theme; simple style and strong functions. However, I have a few problems. I would like to insert my picture and image into my markdown post. I used the following as;

![TEST](/static/anonymouos-hoodie.jpeg)
![TEST2](../../../static/anonymous-hoodie.jpeg)

in the static directory of Hugo root.

and then I am executing hugo server -D. But I cannot the image on the web page. The web page indicates the wrong path.

Could you help me?

Error: Deprecated DisqusShortname Prevents Site from Building in Whiteplain Hugo Theme

Description:

While using the Whiteplain Hugo theme, I encountered an error related to the deprecated DisqusShortname. This error prevents the Hugo site from building correctly.

Steps to Reproduce:

  1. Create a Hugo site using the Whiteplain theme.

  2. Run the following command:

    hugo server --buildDraft
  3. The site fails to build, and the following error message is seen.

Error:

```
ERROR deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.134.0. Use .Site.Config.Services.Disqus.Shortname instead.
Built in 12 ms
Error: error building site: logged 1 error(s)
```

Expected Behavior:

The site should build successfully without any errors. The theme should use the updated property .Site.Config.Services.Disqus.Shortname instead of the deprecated .Site.DisqusShortname.

Environment:

  • Hugo Version: 0.134.0
  • OS: macOS

Proposed Solution:

Replace the deprecated .Site.DisqusShortname with .Site.Config.Services.Disqus.Shortname in the layouts/_default/single.html file.

Additional Context:

I have opened a PR to address this issue: #34

The first line of code misaligned

Please take a closer look at this:
2018-10-20 19 46 52

Only the first line of code is misaligned.
Of course this happens even at the demo site.

It is caused by dual application because it uses the same CSS for pre and code.
I am avoiding the problem with this custom.css:

code {
padding-left: 0;
padding-right: 0;
}

Please remove social media tracking

Hello I am one of the maintainers of Hugo Themes.

As described in gohugoio/hugoThemes#564 your theme features share buttons from social media networks that track users in \whiteplain\layouts\partials\share.html

I kindly request that you remove the tracking code.

I understand that your theme has been approved with the tracking code but currently the guidelines for maintaining a theme on the Hugo Themes list are about to change and the requirement to not include tracking in Hugo Themes will be included in the new guidelines.

I suggest that you re-write to the above partial as described in this resource: https://sharingbuttons.io

If you have any questions then please do not hesitate to ask.

Looking forward to your reply.

cc: @digitalcraftsman

Change About page to be align left

アバター、SNSアイコンと見栄えをあわせるためにセンタリングしたけど、文字が多くなると読みづらいかな。
アバターとSNSアイコンはセンタリングしたままにしたい。

Add support for a "tagline" attribute displayed in the page header

I really like the clean, simple, elegance of the "whiteplain" theme. But there is one feature I wish it supported. An optional site "tagline" displayed below the title and navigation line in the page header. Such as is done by the Kiera theme (which seems to be no longer maintained and doesn't work with the current Hugo version).

See https://www.skepticism.us/ for an example where I've added the tagline "Musings on atheism, software, technology, and movies." I did that by adding the following to my config.toml:

[params]
    tagline = "Musings on atheism, software, technology, and movies."

And modifying layouts/partials/header.html thusly:

diff whiteplain/layouts/partials/header.html whiteplain2/layouts/partials/header.html
10a11,13
>   {{- if .Site.Params.tagline }}
>   <h3>{{ .Site.Params.tagline }}</h3>
>   {{- end }}
12c15
< <hr class="site-header-bottom">
\ No newline at end of file
---
> <hr class="site-header-bottom">

I tried HTML tag <h2> but felt there was insufficient contrast with the blog title. It may be preferable to use another tag and possibly a CSS class but for my purposes using <h3> is good enough aesthetically.

Enabling TOC

Hey there! How did you enable navigation bar in a markdown-syntax.md?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.