惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recorded Future
Recorded Future
S
Secure Thoughts
D
Docker
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
F
Fortinet All Blogs
月光博客
月光博客
S
Security @ Cisco Blogs
AI
AI
IT之家
IT之家
P
Proofpoint News Feed
Stack Overflow Blog
Stack Overflow Blog
大猫的无限游戏
大猫的无限游戏
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Google Online Security Blog
Google Online Security Blog
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
Latest news
Latest news
Webroot Blog
Webroot Blog
GbyAI
GbyAI
L
Lohrmann on Cybersecurity
T
Threat Research - Cisco Blogs
S
Schneier on Security
G
Google Developers Blog
N
News | PayPal Newsroom
C
Check Point Blog
T
Tenable Blog
L
LINUX DO - 最新话题
C
CERT Recently Published Vulnerability Notes
T
Troy Hunt's Blog
Know Your Adversary
Know Your Adversary
SecWiki News
SecWiki News
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
爱范儿
爱范儿
W
WeLiveSecurity
Project Zero
Project Zero
M
MIT News - Artificial intelligence
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
C
Cyber Attacks, Cyber Crime and Cyber Security

方寸之間

修复 Arch Linux 的内核缺失问题 - 方寸之間 安装定制化 Vim - 方寸之間 树莓派配置旁路由过程记录 - 方寸之間 Cloudflare Tunnel 不完全上手指南 - 方寸之間 解除 New Bing 地区和浏览器限制的方法 - 方寸之間 FRP 上手教程 - 方寸之間 深入理解 Linux nohup 命令 - 方寸之間 C++智能指针是什么 - 方寸之間 PGP 工作原理详解 - 方寸之間 如何恢复 Windows EFI 分区 - 方寸之間 Scaleway IPV6 server 申请及使用攻略 - 方寸之間 Arch Linux 升级系统提示签名无效 - 方寸之間 Arch Linux 音响有杂音的解决办法 - 方寸之間 Arch Linux 如何切换内核 - 方寸之間 Django 项目时区更改错误的解决方案 - 方寸之間 超简单的 Arch Linux + Windows 双启动教程 - 方寸之間 使用 UFW 配置 Linux 防火墙 - 方寸之間 Git 中的一个特殊 hash - 方寸之間 深入理解数据库事务 - 方寸之間 CRLF 和 LF 之间的区别与联系 - 方寸之間 DNS 的更新是如何工作的? - 方寸之間 浅析 Linux 的 cron 命令 - 方寸之間 如何快速查看 github 代码库中早期 commits - 方寸之間 黑科技:使用 GitHub 搭建自己的短链接服务 - 方寸之間 iwd 的使用教程 - 方寸之間 超好用的 UML 工具推荐 - 方寸之間 ArchLinux 安装配置笔记 (Updated) - 方寸之間 如何将 Julia 添加到 Jupyter Notebook - 方寸之間 费曼技巧:最好的学习方式 - 方寸之間 How to Create Linux Desktop Entry - 方寸之間 Make a TODO robot with Github Actions - 方寸之間 C++继承 多态 虚函数 - 方寸之間 C++ inline 关键字详解 - 方寸之間 C++ Static 关键字详解 - 方寸之間 C++ type conversion notes - 方寸之間 Solution for _CRT_SECURE_NO_WARNINGS error - 方寸之間 IR Homework - 方寸之間 Customize Ubuntu themes, icons and Shell - 方寸之間 恢复右键菜单的新建命令 - 方寸之間 Hugo+Github 搭建个人博客 - 方寸之間
Build site with Franklin.jl - 方寸之間
Mercas · 2020-11-03 · via 方寸之間

Forward#

Franklin.jl is a simple, customisable static site generator oriented towards technical blogging and light, fast-loading pages.

At first, I want to learning Julia with a small open source project, smaller and better. Then I search on github with topic#julia, and I find this tool. As I learned about it on its site, I think I can use this for my massively personal site(maybe it is beautiful, but too complex), and learning Julia when rebuilding my site.

Therefore, I write this tutorial as my beginning.

Last but not least, Franklin.jl has many features:

  • Augmented markdown allowing definition of LaTeX-like commands,

  • Easy inclusion of user-defined div-blocks,

  • Maths rendered via KaTeX, code via highlight.js both can be pre-rendered,

  • Can live-evaluate Julia code blocks,

  • Live preview of modifications,

  • Simple optimisation step to compress and pre-render the website,

  • Simple publication step to deploy the website,

  • Straightforward integration with Literate.jl.

Setup Environment#

  1. Download Julia from official site for your OS.
  2. Install it.
  3. Open julia REPL.
  4. Then excute using Pkg; Pkg.add(Franklin)

Start building#

  1. New a site with the following scripts:

julia> using Franklin

julia> newsite("mySite", template="pure-sm")

✓ Website folder generated at "mySite" (now the current directory).

Use serve() from Franklin to see the website in your browser.

Once you excuted the command above, this Julia REPL workspace will be in your site folder.

  1. Start local server for debug:

julia> serve()

Initial full pass...

Starting the server...

✓ LiveServer listening on http://localhost:8000/ ...

(use CTRL+C to shut down)

you can get this page in your browser: Franklin Example note: this mySite folder will be created in your current directory. You can check your current directory withpwd().

Site Structure#

Page structure#

your mySite folder structure like this:

├─.github

│ └─workflows

├─_assets

│ └─scripts

│ └─output

├─_css

├─_layout

├─_libs

│ ├─highlight

│ ├─katex

│ │ └─fonts

│ └─pure

└─__site

├─assets

│ ├─menu1

│ │ ├─code

│ │ │ └─output

│ │ └─output

│ └─scripts

│ └─output

├─css

├─layout

├─libs

│ ├─highlight

│ ├─katex

│ │ └─fonts

│ └─pure

├─menu1

├─menu2

├─menu3

└─tag

├─code

├─image

└─syntax

The .github folder is generated for Github Actions, you can config some fields for your customization.Fox example, you can change trigger branch from dev to your workspace branch like master.

name: Build and Deploy

on:

push:

branches:

- dev

- master

Then you should change another BRANCH(I named it as site branch) field here:

name: Build and Deploy

uses: JamesIves/github-pages-deploy-action@releases/v3

with:

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

BRANCH: master

BRANCH: dev

FOLDER: __site

NOTE: you must keep the site branch different from the workspace branch(in the case it’s master), because you site files will be generated on dev branch

If you use config above, your master branch is your workspace branch and your dev branch is your Github Pages site branch.

Deploying on GitHub#

local config#

  1. Create a personal repo on github, named username.github.io, or you can name it whatever you want to if you have a domain.

  2. Open local folder you created with Franklin before with bash or any other shell.

  3. Follow these steps below to config your repo:
    i)git remote add origin URL_TO_YOUR_REPO
    ii)git add . && git commit -m "initial files"
    iii)git push -u origin master

github config#

  1. Open Settings on your repo page, and scrolling down until you find GitHub Pages option.

  2. Config it as below: Github Pages on Settings

    note: you must make the branch same as the site branch in the deploy.yml

DONE!

You can find some examples of websites using Franklin.jl from Franklin.jl.

By the way, I following this blog site as templates and customizing it. It is a very simple and wonderful site.

Please email me if there are any errors.

REFERENCE#

https://franklinjl.org/

https://github.com/abhishalya/abhishalya.github.io

https://docs.github.com/