Git Product home page Git Product logo

olevik / grav-theme-scholar Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 2.0 53.24 MB

Scholar is an academic-focused theme, for publishing papers, articles, books, documentation, your blog, and even your resumé, with Grav.

Home Page: https://olevik.net/staging/grav-skeleton-scholar

License: MIT License

CSS 27.95% PHP 37.87% JavaScript 14.82% Twig 19.35%
grav theme publishing academic docs documentation

grav-theme-scholar's Introduction

Scholar Theme

Scholar is an academic-focused theme, for publishing papers, articles, books, documentation, your blog, and even your resumé, with Grav.

Features

  • Extensible Components, Layouts and template-partials, Styles, API
  • Responsive Layouts, multiple Styles
    • Print-friendly
  • Performant, light on resources
  • Accessible, tested against WCAG AA, Section 508, and best practices
    • Navigable by keyboard and screen readers
    • Readable contrast across Styles
    • Clean, declarative HTML-structure with semantic labels
  • Automated Evergreen-browser compatibility
  • Compatible with a static setup
  • Dynamic functionality for Data, Embed, Print, and Search Pages

A demonstration is available at OleVik.me/staging/grav-skeleton-scholar, and its full contents are on GitHub.

Usage

Configuration

Option Default Description
enabled true Enable theme
style metal Default Style to load
toolbar.breadcrumbs true Enable breadcrumbs in toolbar
toolbar.search true Enable search-field in toolbar
toolbar.navigation true Enable navigation-drawer in toolbar
css true Load theme's CSS
js true Load theme's JS
itemize true Assign indices to paragraphs
linked_data true Generated Linked Data
highlighter true Highlight code
highlighter_theme enlighter Theme for highlighter
components [List] List of components to enable
router true Enable dynamic routes
routes [Dict] Key-value list of routes
api [Dict] Hierarchical key-value list of classes to use
flexsearch [Dict] Options for FlexSearch
flexsearch.enabled true Enable FlexSearch

Installation

Version 3.0.0 and higher

This major-version update targets compatibility with Grav Core 1.7, and also updates and changes some internals.

Grav Package Manager

The simplest way to install this theme is via the Grav Package Manager (GPM) through your system's Terminal -- also called the command line. From the root of your Grav install type:

bin/gpm install scholar

This will install the Scholar-theme into your /user/themes directory within Grav. Its files can be found under /your/site/grav/user/themes/scholar.

Manual Installation

To install this theme, just download the zip version of this repository and unzip it under /your/site/grav/user/themes. Then, rename the folder to scholar.

You should now have all the theme files under

/your/site/grav/user/themes/scholar

This theme started as a clone of Paul Hibbitt's Learn2 with Git Sync-theme, which is a customized version of the Learn2-theme, and drew inspiration from HTML5Up's Future Imperfect template. As this theme decouples and supercedes most of the logic in either, it is rebranded as Scholar. It also goes much further in what a documentation-theme can be and do.

TODO

  • Evaluate metadata text-wrapping
  • Search: Replace with engine-agnostic approach, decoupling into a plugin

grav-theme-scholar's People

Contributors

olevik avatar dependabot[bot] avatar andjar avatar

Stargazers

Dr. Hunter Thompson Lockwood avatar Thalyn avatar Tilman Hoffbauer avatar Vinceslas L. avatar Frederik Hjorslev avatar islahuddin avatar Magnus Walbeck avatar Simone Tampieri avatar Simon Hartmann avatar Sebas Visser avatar Valentin Harrang avatar Guillaume avatar ALZ avatar Paul Hibbitts avatar

Watchers

James Cloos avatar  avatar  avatar

grav-theme-scholar's Issues

Can't search within site

More as an FYI, but the search doesn't actually search -> display anything anywhere when installing the skeleton. It could well be that it actually is doing the search but fails to present the result. The user experience is that it is broken though.

Wrong dependency on "error" plugin version number

Hi!

When I do a fresh install of Grav+admin and then update or install all the required plugins listed on https://olevik.me/staging/grav-skeleton-scholar/docs/installation I still can't install Scholar, due to the wrong dependency number of the plugin (somewhat confusingly) named "Error".
(it is confusingly named as only in CLI did I notice the error message mentioned "error" as a plugin, not as a non-action, but that isn't your fault I think).

However, when trying to install Scholar as a theme, it returns the following message:
"Dependency Error is required in version 1.6.21 which is higher than the latest release, 1.6.2. Try running bin/gpm -f index to force a refresh of the GPM cache"

However, there is no version of the plugin Error that goes up to 1.6.21. The latest version, as far as I can see/find, is 1.6.2.

Looking at your dependency list it appears Error "inherits" the version number from Grav as a general version number, thus making it impossible for me to install.

Keep header in tufte documents

Hi,

As some of the Tufte documents can get rather long, I tried to keep the header and navigation bar. But I was unable to make the drawer menu work as the headers in the tufte documents are rendered without anchor names, and I was unable to adapt the section_wrapper properly. Do you have any suggestions for how this can be achieved?

Layout Schema

Within the Scholar-theme, Layouts are templates that achieve a specific appearance through HTML-structures and CSS-styling. In the Scholar-project ("Core"), this will mainly include ways of displaying academic work such as papers, journal articles, drafts, and other types of pages that fit within Core, as well as more normal types of content.

To make it easy to extend Layouts, a few problems need to be solved:

  • Determine what common layouts cover academic publishing broadly
    • Popular journal styles?
      • LaTeX has an endless plethora (eg. on Overleaf)
      • TeX in itself is messy and not easy to port to HTML
    • Only a small subset should exist in Core
    • Other formats?
  • Determine a uniform, minimal HTML-structure to serve as a base
    • With the advances in CSS it is preferable to not unnecessarily complicate the structure
    • Will need WAI-ARIA compliance
  • Determine the common elements of academic publishing
    • Title page
    • Table of contents
    • Headers and footers
    • Endnotes and footnotes
    • Bibliography
    • Page notes (Tufte-like)
    • Page numbers
    • Media: Charts, tables, images
    • Others?
  • Determine if this affects writing and editing workflows
    • Would love to hear some experiences people have with using folders and single-files, not uncommon with LaTeX, for writing academically

Layouts for books and other types of published work or publications fit within the same broad category, but will be accomplished through extensions ("Modules").

02.Documentation in admin GUI defaults to incorrect template

If I change something, anything, in the admin interface, for page 02.docs ("Documentation") and press save it will default to be saved as "article.md" as opposed to the original "docs.md", which has a completely different layout and functionality.

Installation Difficulty (Dependency "Error" is required)

When I run sudo bin/gpm install scholar I get the following feedback/error, and Scholar is unable to be installed:

GPM Releases Configuration: Stable

Dependency Error is required in version 1.6.21 which is higher than the latest release, 1.6.2. Try running `bin/gpm -f index` to force a refresh of the GPM cache

I assume the fix is relatively simple, but I just don't know what it is. Do I need to downgrade Grav to 1.6.2 to match the version of Error?

Custom menu in site.yaml ignored

I have a site where I've been using antimatter for years where I configured custom menu entries in site.yaml. I decided to try scholar and everything looks great but the menu entries are wrong. For example, with Antimatter, I get "Home", "Curriculum Vitae", "Publications", "Working papers" and "Contact" but upon activating scholar, there is no longer a "Home" entry and I get "Curriculum Vitae", "Contact" but the menu entries corresponding to the anchors are not present. Moreover, three additional pages that are "hidden" do show up. My menu configuration in site.yaml given is below.

menu:
  -
    text: Publications
    url: 'https://example.com/cv#publications'
  -
    text: 'Working papers'
    url: 'https://example.com/cv#working-papers'
  -
    text: Contact
    url: 'https://example.com/contact'

doumentation style

hi,

thanks for this theme.

i am try to set the theme like below documentation style but no success.

How can i do this?

Thank you.

Dependency error upon attempted install.

I am updated to

PHP 7.3 (which I think satisfies the >=7.1.3 <7.4 constraint)
Grav v1.6.31
Admin v1.9.19

When I try to install the theme I get: "Dependency error is required in an older version than the one installed. This package must be updated. Please get in touch with its developer."

Documentation Navigation not present

I have been trying to set up a grav install where I can have documentation for multiple projects in one site. Your theme looked like it allowed this, where as the learn2 theme is just for documentation of one project per install of Grav.

To keep thing simple I decided to start with your skeleton.

  1. Installed it on my shared hosting (dreamhost)
  2. upgraded Grav to current (1.7.23) and updated all of the plugins to latest
  3. Got the same error referenced here so I went into the theme and removed the "what-links-here" component from the list.
  4. Now my site loads, great!
  5. Go to the documentation section and there is no side navigation.

In fact, Documentation, Blog, CV and Book all don't show any content beyond the container page. For example (Note I deleted the image on the documentation page)
image

What template is the documentation page supposed to use? Why isn't the navigation showing up.

To reproduce simply grab the skeleton, and upgrade grav and the plugins, should have the same issue I have.

Unable to load the theme

Hi!

We getting a fresh install of grav + admin, unzipping the content of this repo under user/themes/scholar ; the theme does not appear in the admin panel.

The grav logs contain

[2020-02-12 19:12:45] grav.ERROR: Blueprint scholar/blueprints cannot be loaded: RecursiveDirectoryIterator::__construct(theme://css/styles): failed to open dir: &quot;\RocketTheme\Toolbox\StreamWrapper\ReadOnlyStream::dir_opendir&quot; call failed [] []

Do you have any idea?

Plus: the doc states that ./bin/gpm install scholar should install the theme, but actually it returns Nothing to install.

Scholar skeleton + upgrades = RuntimeException

Similar to #8: after having tried all kinds of ways of installing Scholar and get some docs pages working I opted for the skeleton route.

Skeleton worked fine. I've updated my content, docs section was working.

Updating to Grav v1.7.18, updating all plugins and themes (including Scholar) - RuntimeException when try to open the docs section :-(

RuntimeException (400)
Template "docs.html.twig" is not defined.

what_links_here twig template missing

HI.

By default the Scholar theme come with 'What-links-here' in Components. However, the 'what_links_here.html.twig' file declarated in 'default.html.twig' doesn't exist, and Grav show an error with the default template:

Template "partials/what_links_here.html.twig" is not defined in "default.html.twig" at line 43.

Taxonomy pointing to worng page

Hi Ole,

Thanks for this nice theme! I noticed that the taxonomy in the top of the pages were pointing towards category=, whereas I think they should be pointing towards category:. I guess this can be fixed in the user/themes/scholar/templates/macros/metadata.html.twig? Or maybe I am mistaken?

Hey!

Hi @OleVik !
This looks like an interesting project! I'm using Paul Hibbitts' Open Publishing theme to host my site where I am planning to host my dissertation. grav.madland.ca.

I'd be happy to talk about scholarly publishing using Grav if you're interested.

Colin

Scholar skeleton + upgrade = server error

After having tried all kinds of ways of installing Scholar I opted for the skeleton route. It comes with the current release of Grav, whereas Scholar documentation says it has been made and tested with the latest 1.7rc of Grav.

Installing the skeleton, and then going to plugins, enabling "testing" (as opposed to "stable") allows me to upgrade Grav from 1.6.23 to 1.7rc8. That will however crash the entire site, showing a "server error" page that complains about something with autoload. Sorry, taking this from memory from earlier today so can't be more precise right now. I did repeat it 3 times though.

When looking at the file it was pointing to I noticed that it gave reference to https://github.com/OleVik/grav-plugin-scholar/ on two place. Do note "plugin", not "theme" or "skeleton" in that URL. I figured I perhaps had missed to install a plugin after all, but going to that URL leads to a 404 here on Github. I have no idea if that is related to anything or not, but I did notice it.

Selecting a theme style crashes site

Trying different styles I selected "Berlin" instead of default in the theme configuration. Then I tried "Burgundy" and the site gave me a Whoops: "Invalid argument supplied for foreach()" at line 426 in scholar.php. This error also prevents the use of Admin.

So I resorted to the CLI and reset the style in user/config/themes/scholar.yaml to default and cleared the Grav cache. Unfortunately the error persists.

I'm using Scholar theme v3.0.0 with Grav v1.7.15 and Admin v1.10.15 on Linux using Apache.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.