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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
美团技术团队
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
L
LangChain Blog
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
腾讯CDC
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
博客园 - Franky
博客园 - 司徒正美
The Cloudflare Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
C
Check Point Blog
小众软件
小众软件
V
Visual Studio Blog
V
V2EX
F
Full Disclosure
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
罗磊的独立博客
人人都是产品经理
人人都是产品经理
量子位
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
博客园_首页
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
Recorded Future
Recorded Future
G
Google Developers Blog
Vercel News
Vercel News
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
U
Unit 42
爱范儿
爱范儿
Jina AI
Jina AI

方寸之間

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