Skip to content
Permalink
Browse files

feature(frontend): use hugo pipe

* rename *.css to *.sass and move them to /assets/sass
* move /src/index.js to /assets/scripts
* move all images from /src/assets to /static/images
* remove yarn.lock, webpack.config.js etc.
  • Loading branch information...
Zijung Chueh
Zijung Chueh committed Aug 20, 2018
1 parent 4dcd8f9 commit 1cb3cf1c54cda0e413d381d78b4946192963ebc5
Showing with 38 additions and 8,096 deletions.
  1. +0 βˆ’10 .gitignore
  2. +1 βˆ’1 README.md
  3. +1 βˆ’1 archetypes/post.md
  4. +16 βˆ’0 assets/sass/main.scss
  5. 0 src/styles/partials/content.css β†’ assets/sass/partials/content.scss
  6. 0 src/styles/partials/header.css β†’ assets/sass/partials/header.scss
  7. 0 src/styles/partials/icons.css β†’ assets/sass/partials/icons.scss
  8. 0 src/styles/partials/links.css β†’ assets/sass/partials/links.scss
  9. 0 src/styles/partials/misc.css β†’ assets/sass/partials/misc.scss
  10. 0 src/styles/partials/paginator.css β†’ assets/sass/partials/paginator.scss
  11. 0 src/styles/partials/post.css β†’ assets/sass/partials/post.scss
  12. 0 src/styles/partials/reset.css β†’ assets/sass/partials/reset.scss
  13. 0 src/styles/partials/resume.css β†’ assets/sass/partials/resume.scss
  14. 0 src/styles/partials/shortcodes.css β†’ assets/sass/partials/shortcodes.scss
  15. 0 src/styles/partials/skeleton.css β†’ assets/sass/partials/skeleton.scss
  16. 0 src/styles/partials/summary.css β†’ assets/sass/partials/summary.scss
  17. 0 src/styles/partials/syntax.css β†’ assets/sass/partials/syntax.scss
  18. 0 src/styles/partials/table.css β†’ assets/sass/partials/table.scss
  19. 0 src/styles/partials/terms.css β†’ assets/sass/partials/terms.scss
  20. 0 src/styles/partials/variables.css β†’ assets/sass/partials/variables.scss
  21. +0 βˆ’5 {src β†’ assets/scripts}/index.js
  22. +2 βˆ’2 exampleSite/config.toml
  23. +1 βˆ’1 exampleSite/content/post/hugoisforlovers.md
  24. +2 βˆ’1 layouts/partials/footer.html
  25. +11 βˆ’9 layouts/partials/head.html
  26. +4 βˆ’4 layouts/shortcodes/video.html
  27. +0 βˆ’147 package.json
  28. +0 βˆ’2 src/robots.txt
  29. 0 src/scripts/.gitignore
  30. +0 βˆ’16 src/styles/main.css
  31. BIN static/favicon.ico
  32. BIN {src β†’ static}/fonts/iconfont.eot
  33. 0 {src β†’ static}/fonts/iconfont.svg
  34. BIN {src β†’ static}/fonts/iconfont.ttf
  35. BIN {src β†’ static}/fonts/iconfont.woff
  36. BIN {src β†’ static}/fonts/iconfont.woff2
  37. BIN {src β†’ static}/fonts/lobster.eot
  38. 0 {src β†’ static}/fonts/lobster.svg
  39. BIN {src β†’ static}/fonts/lobster.ttf
  40. BIN {src β†’ static}/fonts/lobster.woff
  41. BIN {src β†’ static}/fonts/lobster.woff2
  42. BIN {src/assets β†’ static/images}/avatar.jpg
  43. BIN {src/assets β†’ static/images}/cover.jpg
  44. BIN {src/assets β†’ static/images}/favicon-16x16.png
  45. BIN {src/assets β†’ static/images}/favicon-32x32.png
  46. BIN {src/assets β†’ static/images}/favicon.ico
  47. 0 {src β†’ static}/images/grey-prism.svg
  48. BIN {src/assets β†’ static/images}/poster.jpg
  49. BIN {src/assets β†’ static/images}/qrcode.jpg
  50. 0 {src/assets β†’ static/images}/safari-pinned-tab.svg
  51. BIN {src/assets β†’ static/images}/tile-image-windows.png
  52. BIN {src/assets β†’ static/images}/touch-icon-android.png
  53. BIN {src/assets β†’ static/images}/touch-icon-apple.png
  54. BIN static/img/avatar.jpg
  55. +0 βˆ’2 static/js/bundle.2b14fb9283.js
  56. +0 βˆ’1 static/js/bundle.2b14fb9283.js.map
  57. +0 βˆ’140 webpack.config.js
  58. +0 βˆ’7,754 yarn.lock
@@ -1,11 +1 @@
.sass-cache
.DS_Store
.eslintcache
npm-debug.log
yarn-error.log
node_modules
!.gitignore
static/css/bundle.css
static/js/bundle.js
static/fonts/
static/img/
@@ -75,7 +75,7 @@ The following social network icons are available:
twitter = "twitter_username"
linkedin = "linkedin_username"
weibo = "weibo_username"
wechat= "/img/qrcode.jpg" # Replace with your wechat qrcode image
wechat= "/images/qrcode.jpg" # Replace with your wechat qrcode image
facebook = "facebook_username"
google = "googlplus_id_number"
instagram = "instagram_username"
@@ -1,7 +1,7 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
author: "Author Name"
cover: "/img/cover.jpg"
cover: "/images/cover.jpg"
tags: ["tagA", "tagB"]
date: {{ .Date }}
draft: true
@@ -0,0 +1,16 @@
@import 'partials/reset.scss';
@import 'partials/variables.scss';
@import 'partials/icons.scss';
@import 'partials/skeleton.scss';
@import 'partials/header.scss';
@import 'partials/summary.scss';
@import 'partials/paginator.scss';
@import 'partials/post.scss';
@import 'partials/content.scss';
@import 'partials/shortcodes.scss';
@import 'partials/table.scss';
@import 'partials/syntax.scss';
@import 'partials/links.scss';
@import 'partials/misc.scss';
@import 'partials/terms.scss';
@import 'partials/resume.scss';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,3 @@
import './styles/main.css';

// Selected DOM elements
const html = document.querySelector('html');
const body = document.querySelector('body');
@@ -61,6 +59,3 @@ const scroll = new SmoothScroll('a[href*="#"]');
toTopBtn.addEventListener('click', () => {
scroll.animateScroll(0);
});

// HMR interface
if (module.hot) module.hot.accept();
@@ -37,7 +37,7 @@ copyright = "Β© This post is licensed under a Creative Commons Attribution-NonCo
# Add your own params here
[params]
author = "Ritchie Zhu"
avatar = "/img/avatar.jpg"
avatar = "/images/avatar.jpg"
seotitle = "Hugo Blog (SEO Version)"
subtitle = "~ Keep It Simple & Stupid ~"
description = "Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again."
@@ -49,7 +49,7 @@ copyright = "Β© This post is licensed under a Creative Commons Attribution-NonCo
twitter = "twitter_username"
linkedin = "linkedin_username"
weibo = "weibo_username"
wechat= "/img/qrcode.jpg" # Replace with your wechat qrcode image
wechat= "/images/qrcode.jpg" # Replace with your wechat qrcode image
# facebook = "facebook_username"
# google = "googlplus_id_number"
# instagram = "instagram_username"
@@ -1,6 +1,6 @@
---
title: Getting Started with Hugo
cover: "/img/cover.jpg"
cover: "/images/cover.jpg"
tags: ["go", "golang", "hugo", "development"]
date: "2014-04-02"
---
@@ -32,7 +32,8 @@
});
</script>
{{ end }}
<script src="{{ index .Site.Data.manifest "bundle.js" | relURL }}"></script>
{{ $js := resources.Get "scripts/index.js" | resources.Minify }}
<script src="{{ $js.Permalink }}"></script>
{{ if .Site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
@@ -1,6 +1,6 @@
<!-- Site & Page Meta Data -->
{{ $gohugoio := "gohugoio" }}
{{ $avatar := "/img/avatar.jpg" }}
{{ $avatar := "/images/avatar.jpg" }}

{{ if eq .Type "post" }}

@@ -83,16 +83,18 @@
<meta name="msapplication-tooltip" content="{{ .Site.Title }}" />
<meta name='msapplication-navbutton-color' content="#5fbf5e" />
<meta name="msapplication-TileColor" content="#5fbf5e" />
<meta name="msapplication-TileImage" content="{{ "/img/tile-image-windows.png" | relURL }}" />
<link rel="icon" href="{{ "/img/favicon.ico" | relURL }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/img/favicon-16x16.png" | relURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/img/favicon-32x32.png" | relURL }}" />
<link rel="icon" sizes="192x192" href="{{ "/img/touch-icon-android.png" | relURL }}" />
<link rel="apple-touch-icon" href="{{ "/img/touch-icon-apple.png" | relURL }}" />
<link rel="mask-icon" href="{{ "/img/safari-pinned-tab.svg" | relURL }}" color="#5fbf5e" />
<meta name="msapplication-TileImage" content="{{ "/images/tile-image-windows.png" | relURL }}" />
<link rel="icon" href="{{ "/images/favicon.ico" | relURL }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/images/favicon-16x16.png" | relURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/images/favicon-32x32.png" | relURL }}" />
<link rel="icon" sizes="192x192" href="{{ "/images/touch-icon-android.png" | relURL }}" />
<link rel="apple-touch-icon" href="{{ "/images/touch-icon-apple.png" | relURL }}" />
<link rel="mask-icon" href="{{ "/images/safari-pinned-tab.svg" | relURL }}" color="#5fbf5e" />

<!-- Styles -->
{{ if ne .Kind "home" }}
<link rel="stylesheet" href="//cdn.bootcss.com/video.js/6.2.8/alt/video-js-cdn.min.css" />
{{ end }}
<link rel="stylesheet" href="{{ index .Site.Data.manifest "bundle.css" | relURL }}" />
{{ $options := (dict "targetPath" "styles/style.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
@@ -28,7 +28,7 @@
- Video `poster`

optional param
default value "/img/poster.jpg"
default value "/images/poster.jpg"
you can overwrite it with your photo (16:9)

### Examples:
@@ -45,7 +45,7 @@
"/media/posts/hugo-nuo-post-preview/videojs.mp4"
"/media/posts/hugo-nuo-post-preview/videojs.webm"
"/media/posts/hugo-nuo-post-preview/videojs.ogv"
"/img/poster.jpg"
"/images/poster.jpg"
%}}

- Named Params
@@ -60,13 +60,13 @@
video mp4="/media/posts/hugo-nuo-post-preview/videojs.mp4"
webm="/media/posts/hugo-nuo-post-preview/videojs.webm"
ogv="/media/posts/hugo-nuo-post-preview/videojs.ogv"
poster="/img/poster.jpg"
poster="/images/poster.jpg"
%}}

*/}}

{{/* DEFAULTS */}}
{{ $poster := "/img/poster.jpg" }}
{{ $poster := "/images/poster.jpg" }}

{{ if .IsNamedParams }}

This file was deleted.

This file was deleted.

No changes.

This file was deleted.

BIN -14.7 KB static/favicon.ico
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
BIN -5.56 KB static/img/avatar.jpg
Binary file not shown.

This file was deleted.

This file was deleted.

0 comments on commit 1cb3cf1

Please sign in to comment.
You can’t perform that action at this time.