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

推荐订阅源

小众软件
小众软件
The Cloudflare Blog
V
Visual Studio Blog
G
Google Developers Blog
博客园 - Franky
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hacker News: Front Page
博客园 - 聂微东
aimingoo的专栏
aimingoo的专栏
有赞技术团队
有赞技术团队
NISL@THU
NISL@THU
P
Palo Alto Networks Blog
A
About on SuperTechFans
V2EX - 技术
V2EX - 技术
腾讯CDC
Project Zero
Project Zero
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
D
DataBreaches.Net
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Attack and Defense Labs
Attack and Defense Labs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News | PayPal Newsroom
Security Latest
Security Latest
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Scott Helme
Scott Helme
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
P
Proofpoint News Feed
罗磊的独立博客
M
MIT News - Artificial intelligence
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
量子位
博客园 - 司徒正美
U
Unit 42
MyScale Blog
MyScale Blog
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
Recorded Future
Recorded Future
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

方寸之間

修复 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/