Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Academic is a Jekyll theme with a focus on simplicity, typography and flexibility. I originally designed it for my personal blog during my PhD thesis.
Check out my personal website or my blog to get a better feel for the Academic theme.
Simplicity: both in design and configuration, Academic aims to let the writer and its readers focus on the content.
Almost all of the theme configuration happens in the _config.yml
file.
Typography: the goal of Academic is to let the author write very long and detailed posts, while being kind to its readers' eyes.
Flexibility: Academic can be used to generate different layouts while keeping the same look and feel.
All features require you to opt in, which means that you can either use a very lean _config.yml
or a very detailed one if you want to use more features.
Table of contents:
<head>
)redcarpet
markdown engine)_config.yml
file_config.yml
fileAdd this line to your Jekyll site's Gemfile:
gem "academic"
And add this line to your Jekyll site's _config.yml
:
theme: academic
And then execute:
$ bundle
Or install it yourself as:
$ gem install academic
Then add the jekyll-data
plugin to your Gemfile
(see also):
group :jekyll_plugins do
gem 'jekyll-data'
end
I suggest you install and use redcarpet
to generate your markdown (read more).
Academic uses 4 shades of grey (very dark grey for the main content, ligther greys to lessen the emphasis on some elements) and a single "brand" color.
By default, the brand color is #d33682
(purple). If it's not to your taste, you can easily change it by overriding the $brand-color
variable in /assets/styles.scss
.
$brand-color: red;
_config.yml
filetitle_html
: [optional] you can style the title of your website with html elements.
Example:
title_html: "<b>hello</b>world"
pitch
: [optional] a small sentence or motto to quickly describe your blog. If no pitch is detected, Academic will fill the top bar with a navigation menu. If you want to display a short pitch in the top bar, Academic will put thput the navigation menu in the footer. Please note that pitch
is only used in the top bar ; it is different from the description
field (used in the footer and the meta tags for search engines).
description
: [recommended] short description for search engines. It's displayed in the footer of every page. Not to be confused with pitch
.
cc
: [optional] choose among the Creative Commons licenses (v4). Accepted values are : by
, by-sa
, by-nd
, by-nc
, by-nc-sa
, by-nc-nd
. Defining the cc
variable will add a small sentence in the footer. If no value is given, a small copyright is added instead.
nb_posts_page
: [optional] number of posts to display on the homepage. By default, all posts are listed. Note that you should create a page with the archive layout.
archive_permalink
: [optional] permalink of the archive page. Set to "/archive"
by default.
repo
: [optional] link to your website repo. If defined, it's added in the footer. Nothing is displayed otherwise.
piwik
: [optional]
url
: [mandatory] URL of your Piwik Instance without a trailing slash (like mywebsite.com/piwik
)site_id
: [mandatory] The ID of your website in your Piwik instanceemail
: [optional] add email address in about layout.
curriculum
: [optional]
name
: [optional] text of the link. Default : Curriculum Vitae.url
: [mandatory] url of the curriculum file.shortbio
: [optional] describe yourself in a sentence or two. If shortbio
is defined, a small element is added at the end of the post to introduce the author to the readers.
author_display
: [optional] if true
, the author's name (and author_website
) is added in the footer. false
by default.
author_website
: [optional] url to the external website of the author. If author_website
exists, it is added in the about layout and in the footer (if author_display
is true
).
twitter_username
: [optional] your Twitter username. If it exists, your account will be linked in the "call to action" boxes (homepage and posts), in the footer and on the about page.
github_username
: [optional] your Github username. If it exists, your account will be linked in the footer and on the about page.
keybase_username
: [optional] your Keybase username. If it exists, your account will be linked on the about page.
linkedin_username
: [optional] your LinkedIn username. If it exists, your account will be linked on the about page.
nav_ext_links
: [optional] you can choose to add external links in the top bar. Each item has two attributes:
name
: [mandatory] text for the linkurl
: [mandatory] urlExample:
nav_ext_links:
- name: Link 1
url: http://jupiterbroadcasting.com/
- name: Link 2
url: http://wallabag.org/
Academic works perfectly well as a single language website. By default, Academic is in English. You can easily switch to another supported language :
langs: ["fr"]
If you need to translate part of your pages or posts, Academic also supports basic i18n and multilingual features.
To enable multilingual mode, just add the following to your _config.yml
:
langs: ["fr", "en"]
defaults:
- scope:
path: ""
values:
lang: "fr"
The langs
variable should be an array containing your languages.
Important: the first item should be your "default" language (ie the language that you translate posts from or/and that has the largest content available).
The double quotes around the language do matter.
Don't forget to define a default lang for your whole website.
If you want to translate some of the variables in your _config.yml
, you can just do this:
title:
fr: "Nom du site en Français"
en: "English name of the website"
Translating posts and pages is very easy.
Let's say my default lang is fr
and I want to translate _posts/billet-au-hasard.md
to English.
---
layout: post
title: "Billet au hasard"
permalink: /fr/billet-au-hasard/
date: 2017-02-14 15:32:29 +0100
---
First, I'll create a new file named _posts/billet-au-hasard.en.md
.
Both files have to share the exact same name before the first extension (.md
or .en.md
) in order to signal to Academic that these posts are translations of eachother.
Then, in _posts/billet-au-hasard.en.md
, add the lang and change the permalink in your frontmatter:
layout: post
title: "Random post"
permalink: /en/random-post
date: 2017-02-14 15:32:29 +0100
lang: en
That's it!
Academic will handle the lang selector and will add <link />
to the <head>
section to improve SEO.
Note that you have to handle the permalinks manually.
I recommend that you use the subdirectory /lang/
naming convention everywhere, as exemplified above.
You should at least take care of your homepage URL.
If you'd like Academic to support more languages, please contribute by adding the appropriate translations in /_data/i18n_academic.yml
.
Academic is compatible with the jekyll-last-modified-at
plugin (repo). If installed, the last modified date will be (discretely) displayed in the posts lists and in the post layout.
If you specified a Github repo
, the last modified date will point to the revision history of the file.
In the yaml header, you can add some tags to help Academic.
summary
: [optional] a short text or abstract. Used in the posts lists and on the post page.
thumbnail
: [optional] relative path to image or absolute url to an image that describes your post. Used in the posts lists and on the post page.
In the yaml header, you can add some tags to help Academic.
invisible
: [optional] if true
, then this page will not be listed in the navigation menu.
Will automatically put the content of the page on the right column. The left column will automatically be filled with the author info provided in the _config.yml
.
Create a archive.md
page, choose the "archive" layout. You don't need to write anything in this file, all posts published will be listed in reverse chronological order.
Create a 404.md
page, set the layout:
layout: pagenotfound
The content of the page will be used in the 404 page.
Create a sitemap.xml
page, set the layout:
layout: sitemap
You now have a sitemap you can feed to the search engines.
Sometimes you need to use figures and images in your posts, with detailed captions and maybe even the source of the image.
The image.html
allows you to do just that without all the HTML markup.
{% include image.html src="/assets/img/zotero-archives-numeriques/screencast.gif"
caption="Notre solution en action"
desc="Screencast de capture Zotero"
source="Google"
href="http://google.com"%}
Bug reports and pull requests are welcome on GitHub at https://github.com/gaalcaras/academic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
repo
varThe theme is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that academic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.