Skip to content

Commit

Permalink
Merge pull request #983 from getgridea/dev
Browse files Browse the repository at this point in the history
update build dir and netlify deploy support
  • Loading branch information
EryouHao authored May 17, 2022
2 parents b71b190 + 62207c7 commit 1034e40
Show file tree
Hide file tree
Showing 28 changed files with 2,493 additions and 2,421 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module.exports = {
'import/no-extraneous-dependencies': 0,
'global-require': 0,
'no-continue': 0,
'linebreak-style': 0,
},
parserOptions: {
parser: '@typescript-eslint/parser',
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "gridea",
"version": "0.9.2",
"version": "0.9.3",
"private": true,
"description": "A static blog writing client. You can use it to record your life, mood, knowledge, notes and ideas...",
"keywords": [
"gridea",
"static-site",
"static-site-generator"
],
"homepage": "http://gridea.dev",
"homepage": "https://gridea.dev",
"license": "MIT",
"author": {
"name": "EryouHao",
Expand All @@ -25,7 +25,7 @@
"@iktakahiro/markdown-it-katex": "^3.1.0",
"@sentry/electron": "^1.2.0",
"ant-design-vue": "^1.3.5",
"axios": "^0.18.1",
"axios": "^0.27.2",
"bluebird": "^3.5.3",
"ejs": "^2.6.1",
"electron-google-analytics": "^0.1.0",
Expand All @@ -34,7 +34,7 @@
"fs-extra": "^7.0.1",
"gray-matter": "^4.0.1",
"hpagent": "^1.0.0",
"isomorphic-git": "^1.17.1",
"isomorphic-git": "1.17.1",
"junk": "^3.1.0",
"less": "^3.9.0",
"lowdb": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion public/default-files/posts/hello-gridea.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ feature: /post-images/hello-gridea.png

[Github](https://github.com/getgridea/gridea)
[Gridea 主页](https://gridea.dev/)
[示例网站](http://fehey.com/)
[示例网站](https://fehey.com/)

## 特性👇
📝 你可以使用最酷的 **Markdown** 语法,进行快速创作
Expand Down
74 changes: 37 additions & 37 deletions public/default-files/themes/fly/templates/includes/head.ejs
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@

<meta charset="utf-8" >

<title><%= siteTitle %></title>
<meta name="description" content="<%= themeConfig.siteDescription %>">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="shortcut icon" href="<%= themeConfig.domain %>/favicon.ico?v=<%= site.utils.now %>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="<%= themeConfig.domain %>/styles/main.css">

<% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
<% if (commentSetting.commentPlatform === 'gitalk') { %>
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css" />
<% } %>
<% if (commentSetting.commentPlatform === 'disqus') { %>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/disqusjs.css" />
<% } %>
<% } %>

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>

<% if (site.customConfig.ga) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= site.customConfig.ga %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= site.customConfig.ga %>');
</script>
<% } %>

<meta charset="utf-8" >

<title><%= siteTitle %></title>
<meta name="description" content="<%= themeConfig.siteDescription %>">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="shortcut icon" href="<%= themeConfig.domain %>/favicon.ico?v=<%= site.utils.now %>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="<%= themeConfig.domain %>/styles/main.css">

<% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
<% if (commentSetting.commentPlatform === 'gitalk') { %>
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css" />
<% } %>
<% if (commentSetting.commentPlatform === 'disqus') { %>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/disqusjs.css" />
<% } %>
<% } %>

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>

<% if (site.customConfig.ga) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= site.customConfig.ga %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= site.customConfig.ga %>');
</script>
<% } %>
2 changes: 1 addition & 1 deletion public/default-files/themes/fly/templates/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</span>
<% } %>
</div>
<div class="post-content">
<div class="post-content" v-pre>
<%- post.content %>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions public/default-files/themes/notes/templates/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="description" content="<%- post.description %>" />
<meta name="keywords" content="<%- post.tags.map(tag => tag.name).join(',') %>" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
</head>
<body>
<div class="main">
Expand Down Expand Up @@ -32,7 +32,7 @@
<img class="post-feature-image" src="<%= post.feature %>" alt="">
<% } %>
<div class="post-content-wrapper">
<div class="post-content">
<div class="post-content" v-pre>
<%- post.content %>
</div>
<div class="toc-container">
Expand Down
72 changes: 36 additions & 36 deletions public/default-files/themes/paper/templates/_blocks/head.ejs
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<meta charset="utf-8" >

<title><%= siteTitle %></title>
<meta name="description" content="<%= themeConfig.siteDescription %>">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" href="<%= themeConfig.domain %>/favicon.ico?v=<%= site.utils.now %>">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/paper.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="<%= themeConfig.domain %>/styles/main.css">

<% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
<% if (commentSetting.commentPlatform === 'gitalk') { %>
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css" />
<% } %>
<% if (commentSetting.commentPlatform === 'disqus') { %>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/disqusjs.css" />
<% } %>
<% } %>
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>


<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<% if (site.customConfig.ga) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= site.customConfig.ga %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= site.customConfig.ga %>');
</script>
<% } %>
<meta charset="utf-8" >

<title><%= siteTitle %></title>
<meta name="description" content="<%= themeConfig.siteDescription %>">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" href="<%= themeConfig.domain %>/favicon.ico?v=<%= site.utils.now %>">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/paper.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="<%= themeConfig.domain %>/styles/main.css">

<% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
<% if (commentSetting.commentPlatform === 'gitalk') { %>
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css" />
<% } %>
<% if (commentSetting.commentPlatform === 'disqus') { %>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/disqusjs.css" />
<% } %>
<% } %>
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>


<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<% if (site.customConfig.ga) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= site.customConfig.ga %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= site.customConfig.ga %>');
</script>
<% } %>
2 changes: 1 addition & 1 deletion public/default-files/themes/paper/templates/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<% if (post.feature) { %>
<img src="<%= post.feature %>" alt="<%= post.title %>">
<% } %>
<div class="post-content">
<div class="post-content" v-pre>
<%- post.content %>
</div>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var app = new Vue({
</script>

<% if (site.customConfig.renderCode) { %>
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad()
</script>
Expand Down
14 changes: 10 additions & 4 deletions src/assets/styles/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.ant-table-thead > tr > th {
background: #ffffff;
color: #434343b0;
color: #1b1b18b0;
font-weight: normal;
}

Expand Down Expand Up @@ -52,6 +52,9 @@
margin-left: 8px;
outline: none;
transition: all 0.3s;
display: flex;
justify-content: center;
align-items: center;
i {
font-weight: bold;
}
Expand Down Expand Up @@ -156,14 +159,14 @@
padding: 4px 8px;
margin-bottom: 8px;
color: #b1b1b1;
border-radius: 2px;
border-radius: 6px;
transition: all 0.3s;
&:hover {
background: #efefef;
}
}
.ant-tabs-tab-active {
color: #434343;
color: #1b1b18;
}
}

Expand Down Expand Up @@ -206,6 +209,9 @@
background: #f3f7f9;
margin: 12px;
font-size: 14px;
display: inline-flex;
justify-content: center;
align-items: center;
}

.ant-modal-close {
Expand All @@ -228,7 +234,7 @@
.ant-menu-inline .ant-menu-item, .ant-menu-inline .ant-menu-submenu-title {
width: 90%;
margin-left: 5%;
border-radius: 8px;
border-radius: 6px;
color: #666;
}

Expand Down
28 changes: 14 additions & 14 deletions src/assets/styles/var.less
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@primary-color: #555;
@primary-bg: #f7f6f6;
@danger-color: #fa5252;

@border-radius-base : 2px;
@link-color: #1a5ccf;
@border-color: #e8e8e88a;

@btn-default-border: #eaeaea;

@label-color: #555;

@font-family: PingFang SC,-apple-system,SF UI Text,Lucida Grande,STheiti,Microsoft YaHei,sans-serif;

@primary-color: #1b1b18;
@primary-bg: #f7f6f6;
@danger-color: #fa5252;

@border-radius-base : 6px;
@link-color: #1a5ccf;
@border-color: #e8e8e88a;

@btn-default-border: #eaeaea;

@label-color: #1b1b18;

@font-family: PingFang SC,-apple-system,SF UI Text,Lucida Grande,STheiti,Microsoft YaHei,sans-serif;

@input-hover-border-color: #999;
11 changes: 11 additions & 0 deletions src/components/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ export default class App extends Vue {
public publish() {
const { setting } = this.site
if (setting.platform === 'netlify' && !setting.netlifyAccessToken && !setting.netlifySiteId) {
this.$message.error(`🙁 ${this.$t('syncWarning')}`)
return false
}
if (!setting.branch && !setting.domain && !setting.token && !setting.repository) {
this.$message.error(`🙁 ${this.$t('syncWarning')}`)
return false
Expand Down Expand Up @@ -373,6 +378,12 @@ export default class App extends Vue {
/deep/ .ant-menu-item {
padding-left: 16px !important;
transition: all 0.3s;
cursor: default;
&:hover {
background-color: #fff;
}
}
/deep/ .ant-menu-vertical .ant-menu-item:after, .ant-menu-vertical-left .ant-menu-item:after, .ant-menu-vertical-right .ant-menu-item:after, .ant-menu-inline .ant-menu-item:after {
Expand Down
Loading

0 comments on commit 1034e40

Please sign in to comment.