基于 Publish 搭建博客

  • Blog
  • 发布于2021年08月08日

遇到的问题

  • make报错
swift build -c release
/Users/Vong/Publish: error: manifest parse error(s):
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreFoundation.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
#include <CoreFoundation/CFBase.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:73:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:73:
#include <Block.h>

根据 https://github.com/rogual/neovim-dot-app/issues/331 这个issue直接干掉 /usr/local/include/block.h 即可。

  • 打开Package.swift之后总是更新依赖失败

终端进入项目目录底下,运行swift package resolve,完成后则在该目录下的.build文件夹下会出现若干文件,拷贝.build文件夹下的所有文件到DerivedDatad对应项目的SourcePackages文件夹下,重新打开项目即可。 Tips:cmd+shift+. 可以快速隐藏/显示隐藏文件夹。

  • 升级 MacOS 12.3,python被移除,run报错,可以直接重新下载安装python2即可
  • script 标签如果是以uri的形式引入,必须包在前面,如果是直接写源码,则要写在标签间。如果要用uri的形式,则可以使用 .script(.src("xxxx"))
// uri 形式
<script src="Script/search.js"></script>

// 源码形式
<button type="button" onclick="myFunction()">试一试</button>
<script>
    function myFunction() {
        document.getElementById("demo").innerHTML = "段落被更改。";
    }
</script>   
  • Padding属性,可以有一到四个值。
// 上右下左
padding:25px 50px 75px 100px;
// 上、左右、下
padding:25px 50px 75px;
// 上下、左右
padding:25px 50px;
// 上下左右
padding:25px;

  • [ ] 搜索输入文字后,高度会跳变
本博客所有文章除特别声明外,均采用CC 4.0许可协议。转载请注明出处和作者。

关注微信公共号Vong或在微博上关注@Vong_HUST,永远不会错过新内容! 您的支持和鼓励将为我的博客写作增添更多的动力!

动态更新