Giter Site home page Giter Site logo

savingrun / wehalo Goto Github PK

View Code? Open in Web Editor NEW
2.0K 40.0 364.0 10.87 MB

WeHalo 简约风 的微信小程序版博客:sparkles:

Home Page: https://github.com/savingrun/wehalo

License: GNU General Public License v3.0

JavaScript 100.00%
wehalo iview-weapp halo javascript wechat-mini-program blog

wehalo's Introduction

WeHalo 支持最新版本 Halo

大家的支持,鼓励,认可,是我坚持开源的动力,虽然后面开发完有点拖拉,请原谅 ~ 渲染图在设计中

后续更多功能开发并开发给大家使用,新版本 WeHalo 会存在不少问题欢迎大家多给我提 Issues 我会尽快处理

新版本使用的问题不懂可以通过小程序联系作者找到我或者添加

✍ Halo 一款现代化的个人独立博客系统 Halo

Github GitHub release GitHub LICENSE star star


目录

简介

WeHalo [wiˈheɪloʊ],意为我们的光环,嘻嘻。

配合 Halo 轻快,简洁,功能强大的博客系统而开发出来的 简约风 微信小程序版博客

快速开始

注:开源不易请留 WeHalo 底部署名不要删除

git clone https://github.com/savingrun/WeHalo.git

代码下载后,把 image 文件夹删除(放的是README中的图片与项目无关),用小程序 IDE 打开后即可使用。

注:请选择小程序项目,非小游戏,例子中无 appid,所以无法在手机上运行,如果需要真机调试,请在打开例子时,填上自己的小程序 id

文档

修改app.js文件的全局变量,改为你的 Halo 博客的地址,请更新最新的 Halo 配合使用

注:必须是HTTPS的因为,微信官方规定,还有把你的博客地址如:https://savingrun.onehttps://v2.jinrishici.com添加到微信公众平台的 request 合法域名

globalData: { //全局变量
        userInfo: null,
        skin: null,
        roleFlag: false,
        BlogName: "爱敲代码的猫",//博客名字
        url: "https://savingrun.one",//博客地址(需HTTPS)
        token: "",//Halo博客后台设置
        highlightStyle: "dracula",//代码高亮样式,可用值default,darcula,dracula,tomorrow
        adminOpenid: "ogogn47AhczrMBgcTCPbUwugqLcU",//导入项目后可以在Console中看到  openidCloudResult: xxxxxxx  (xxx就是adminOpenid)
        HaloUser: "xx",//Halo后台用户名
        HaloPassword: "xx",//Halo后台密码
 }

注: 关于新版本 WeHalo 找不到 adminOpenid 的处理方法: https://gitee.com/aquanrun/WeHalo/issues/I12J1G

设置个人专属Logo 修改 WeHalo\miniprogram\colorui\main.wxss 文件最后面的

.home-img{
    padding: 24rpx;
    background-repeat: no-repeat;
    background-size: contain;
    /* background-image:url(../image/cat.png); */
    background-image:url('xxxxx');//logo图片地址
}

html2wxml插件版本准备

  1. 添加插件 添加小程序插件
  2. 搜索 html2wxml ,选中并添加 添加小程序插件
  3. 添加成功 添加小程序插件

文档正在不断完善中,遇到问题请加群提问或者 Issues 等你吐槽...

演示

WeHalo

许可证

GitHub LICENSE

WeHalo使用GPL-v3.0协议开源,请尽量遵守开源协议,即便是在**。

功能

  • 重新设计WeHalo
  • 自定义导航栏(个人觉得好看可自定义)
  • 个人名片(可宣传自己)
  • 博文展示
  • 评论展示
  • 搜索文章功能
  • 文章评论功能
  • 博主查看评论功能
  • 博主回复评论功能
  • 评论功能内容识别
  • 友链展示
  • 日记本
  • 点赞功能(云函数)
  • 文章浏览统计功能(云函数)
  • 用户回复评论追评功能
  • 生成海报(微信朋友圈装X)
  • 图库展示(小熊随笔贡献开发)
  • 图库图片上传(小熊随笔贡献开发)
  • 短视频去水印(小熊随笔贡献开发)
  • 按类别导航(小熊随笔贡献开发)
  • 加密分类限制(小熊随笔贡献开发)
  • 想到就写...

感谢

WeHalo的诞生离不开下面这些项目的支持:

  • Halo: 一个优秀的开源博客发布应用。
  • ColorUI:鲜亮的高饱和色彩,专注视觉的小程序组件库
  • iView Weapp:一套高质量的微信小程序 UI 组件库
  • Painter:微信小程序生成图片库,绘制一张可以发到朋友圈的图片
  • html2wxml:用于微信小程序的HTML和Markdown格式的富文本渲染组件,支持代码高亮
  • 一言·古诗词:Hitokoto API,随机返回一条古诗词名句。采用 Vert.x + Redis 全异步开发,毫秒级稳定响应。

各位的哇哈哈,再次感谢各位的支持

Stargazers over time

Stargazers over time

Thanks to all the people who already contributed!

wehalo's People

Contributors

gxz-ngu avatar hualuoyixiao avatar lzyzsd avatar pawnzzi avatar ruibaby avatar sav7ng avatar xtanyu 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  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

wehalo's Issues

关于adminOpenid找不到问题

Describe the bug
RT,我在README.md中获取到了解决的方案
https://gitee.com/aquanrun/WeHalo/issues/I12J1G
但是现在这个方案失效了

在本地运行云函数的时候出现以下情况

DevTools failed to load SourceMap: Could not parse content for file:///E:/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/WeHalo/cloudfunctions/get_wx_context/node_modules/bson/lib/bson.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///E:/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/WeHalo/cloudfunctions/get_wx_context/node_modules/bson/lib/binary.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for file:///E:/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/WeHalo/cloudfunctions/get_wx_context/node_modules/bson/lib/ensure_buffer.js.map: Unexpected end of JSON input


QQ图片20210404172524

Wish to adapt halo v1.0

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

点子征集帖✨

有什么好想法和好提议可以在下面提出来哦,还有用了WeHalo发布小程序的可以贴在下面哦。

部署完报错

Describe the bug
A clear and concise description of what the bug is.
image

image

request合法域名已正确配置

image
上面参数已经正确配置,

Additional context
Add any other context about the problem here.
部署完成后报错 1.
VM699:1 Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(./components/addTips/wh-addTips.wxss:33:9)
image

按类别查看文章的功能

也不知提出新功能需求是否合适,还是试一下。

不知能否在小程序里面增加上按类别显示文章的功能呢?现在对文章的显示,只是按照日期分页显示,但很多时候还是需要按类别去浏览的。

非常感谢作者

期望:

  1. 希望未来的版本能有文章的类别分类,本人直男审美不知道加在哪里好,就先不弄了。。。

ps

基于WeHalo的个人微信小程序刚刚申请上线了,名字:编程挺好玩。:smile:
在克隆下来的代码的基础上,做了些许细节上的改动,一些细节可以讨论下:

  1. 我把index页面和hola页面上利用getStorageSync和setStorageSync 保存了用户的openid,这样在一定程度上可以减少云函数的调用。
  2. 点赞,也是利用getStorageSync和setStorageSync 保存了用户是否点赞了该文章,调用halo 的接口实现likes+1(不过这个可以使用云开发的数据库来保存单篇文章所有的点赞用户,然后文章界面可以显示一排谁谁谁点赞了这篇文章,头像之类的)。

如何部署呢?是云开发吗?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

小程序增加点赞功能的方法

只需要在post.js 增加以下方法就可以了

//点赞功能
Likes: function () {
    var that = this;
    var urlLikeList = app.globalData.url + '/api/content/posts/'+that.data.postId+'/likes';
    var token = app.globalData.token;
    var params = {            
    };
    //@todo 网络请求API数据
    request.requestPostApi(urlLikeList, token, params, this, this.successSendLike, this.failSendLike);  
},
// 点赞成功回调
successSendLike: function (res, selfObj) {
    var that = this;        
    wx.showToast({
        title: '感谢你的点赞!',
        icon: 'none',
        duration: 2000
    });
    // 设置点赞数+1
    var likes = Number(parseInt(that.data.postLikes) + 1);   
    console.log(likes);
    that.setData({
         postLikes: likes       
    })
},
//点赞失败回调
failSendLike: function (res, selfObj) {
    wx.showToast({
        title: '点赞失败,请联系作者!',
        icon: 'none',
        duration: 2000
    })
},

小程序名称:IT技术分享社区
IT技术分享社区
gh_32334eb097cd_430

能不能发个针对 小白的教程啊

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

评论功能

博主有打算在WeHalo接入评论功能吗?

如何获取halo的tocken呀,后台里没有找到

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

什么时候能接入typecho写的blog就好了

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

微信小程序 查看文章详情增加浏览数功能

1、替换PostController.java 方法,然后重新编译halo 生成 PostController.class 文件,然后替换jar包里面的 PostController.class文件,最后重启jar就可以了。

@GetMapping("{postId:\d+}")
@ApiOperation("Gets a post")
public BasePostDetailDTO getBy(@PathVariable("postId") Integer postId,
@RequestParam(value = "formatDisabled", required = false, defaultValue = "true") Boolean formatDisabled,
@RequestParam(value = "sourceDisabled", required = false, defaultValue = "false") Boolean sourceDisabled) {
BasePostDetailDTO detailDTO = postService.convertToDetail(postService.getById(postId));

    if (formatDisabled) {
        // Clear the format content
        detailDTO.setFormatContent(null);
    }

    if (sourceDisabled) {
        // Clear the original content
        detailDTO.setOriginalContent(null);
    }
    postService.increaseVisit(postId);
    return detailDTO;
}

小程序名称:IT技术分享社区
IT技术分享社区
gh_32334eb097cd_430

关于管理员的问题

在miniprogram\pages\index\index.js里的第116行处,云函数获取用户openID,作者写的是res.result.openid,应该是写错了,正确的:res.result.userInfo.openId,导致无法识别管理员,后面还有类似几处错误,可直接批量修改

使用 WeHalo 部署的小程序在此列出

如果你不想被 Github 的通知邮件打扰,建议评论之后点击右侧的 Unsubscribe。

如果你是用的 WeHalo,以供其他正在观望的用户查看具体效果。

格式如下:

小程序名称:爱敲代码的猫(https://aquan.run)

小程序码:

gh_95b7370bf8c9_430.jpg

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.