Skip to content

Commit

Permalink
add README
Browse files Browse the repository at this point in the history
  • Loading branch information
RayZhao1998 committed Mar 16, 2020
1 parent 1f7d110 commit d49cdad
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# hexo.swift

## 来源

作为一个博客框架的折腾狂,从 jekyll 到 hexo 的静态博客框架方案,再到 wordpress 和 Ghost 这样的动态框架,都已经尝试过,并且沉迷于各种主题的使用。

后来,成为一个 Swift lover,我开始用 Vapor 构建自己的动态博客框架,用上软件工程课程和数据库课程中熟练掌握的 CRUD 构建了简单的动态博客框架,实现了文章的发布,查看功能,毕竟后端开发能力比较差,不太想折腾下去了。

看见 John Sundell 大佬开源了他的静态博客框架 Publish,于是打算自己做一个属于自己的 Only Swift 的静态博客框架,暂时取名为 hexo.swift,意味模仿 hexo 但又是 Only Swift 的。

## 简介

这是一个使用 Swift 编写的静态博客,当前的版本仅自用,仅供学习参考,不能用于生产。

## 使用

如果你使用 MacOS,可通过 hexo.swift 可执行文件进行以下操作

- new
- new post <post name> 新建一篇文章
- new page <page name> 新建一个页面
- build
将 Posts 和 Pages 中所有 md 文件转换成 html 文件
- run
将 Output 中生成好的 html 文件,通过 python http.server 构建网站

如果你使用 ubuntu,目前可执行文件尚不能在 ubuntu 上使用,若想在服务器构建网站,你需要在 Mac 本地 build,在服务器通过 `python3 -m http.server 8080` 来进行构建。
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"object": {
"pins": [
{
"package": "Files",
"repositoryURL": "https://github.com/JohnSundell/Files",
"state": {
"branch": null,
"revision": "22fe84797d499ffca911ccd896b34efaf06a50b9",
"version": "4.1.1"
}
},
{
"package": "Ink",
"repositoryURL": "https://github.com/johnsundell/ink.git",
"state": {
"branch": null,
"revision": "878fd897945500be1885f2c88f81f8f909224796",
"version": "0.4.0"
}
},
{
"package": "Plot",
"repositoryURL": "https://github.com/johnsundell/plot.git",
"state": {
"branch": null,
"revision": "e81e059e39603a6c01cd157bc8fb6f1ffbfa7cf5",
"version": "0.7.0"
}
},
{
"package": "ShellOut",
"repositoryURL": "https://github.com/JohnSundell/ShellOut.git",
"state": {
"branch": null,
"revision": "e1577acf2b6e90086d01a6d5e2b8efdaae033568",
"version": "2.3.0"
}
}
]
},
"version": 1
}
84 changes: 84 additions & 0 deletions hexo.swift.xcodeproj/xcshareddata/xcschemes/hexo.swift.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D7F9F3B324141734000F11A6"
BuildableName = "hexo.swift"
BlueprintName = "hexo.swift"
ReferencedContainer = "container:hexo.swift.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D7F9F3B324141734000F11A6"
BuildableName = "hexo.swift"
BlueprintName = "hexo.swift"
ReferencedContainer = "container:hexo.swift.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "new post about"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D7F9F3B324141734000F11A6"
BuildableName = "hexo.swift"
BlueprintName = "hexo.swift"
ReferencedContainer = "container:hexo.swift.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "6563D3A0-15BE-4A02-B08D-BE27BD4A3C5A"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint">
<BreakpointContent
uuid = "8FA01B48-C131-4933-9DA8-27D56DC9D601"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "E6D28F93-B68A-47B3-8031-A5205B00DE65"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "HexoCLI/HexoCLI.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "19"
endingLineNumber = "19"
landmarkName = "HexoCLI"
landmarkType = "14">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "B0A5624F-1ED5-4DA6-A821-531D98A6CDE2"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "hexo.swift/WebsiteRunner.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "53"
endingLineNumber = "53"
landmarkName = "unknown"
landmarkType = "0">
<Locations>
<Location
uuid = "B0A5624F-1ED5-4DA6-A821-531D98A6CDE2 - f0ed58b833d0c11e"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "hexo_swift.WebsiteRunner.(getOutputFolder in _40522889F817DC17D824797588D9B73E)() throws -&gt; Files.Folder"
moduleName = "hexo.swift"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ziyuanzhao/Documents/products/hexo.swift/hexo.swift/WebsiteRunner.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "53"
endingLineNumber = "53"
offsetFromSymbolStart = "220">
</Location>
<Location
uuid = "B0A5624F-1ED5-4DA6-A821-531D98A6CDE2 - f0ed58b833d0c11e"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "hexo_swift.WebsiteRunner.(getOutputFolder in _40522889F817DC17D824797588D9B73E)() throws -&gt; Files.Folder"
moduleName = "hexo.swift"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ziyuanzhao/Documents/products/hexo.swift/hexo.swift/WebsiteRunner.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "53"
endingLineNumber = "53"
offsetFromSymbolStart = "303">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "7617FD5E-639A-4FAE-9B52-0205DEDB1E8A"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "hexo.swift/CLI/CLI.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "26"
endingLineNumber = "26"
landmarkName = "run(in:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

0 comments on commit d49cdad

Please sign in to comment.