diff --git a/.gitignore b/.gitignore index 5a41294..6bcef60 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ bin !.gitignore .DS_Store +/docs/_site +/docs/.jekyll-cache diff --git a/docs/_config.yml b/docs/_config.yml index 32e2110..13a6b75 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -28,13 +28,13 @@ url: https://cogtool-modern.github.io/cogtool/ # Use rdiscount as the markdown engine because it generates html5 compliant code for stuff like footnotes # If you use maroku (default engine) some of your generated pages may not validate or lint as html5 # If you don't have it install it via gem install rdiscount -markdown: rdiscount +# markdown: rdiscount # Makes pretty (descriptive) permalinks. See Jekyll docs for alternatives. permalink: pretty # How many articles do you wish to appear on the front page: -paginate: 6 +# paginate: 6 # Exclude metadata and development time dependencies (like Grunt plugins) exclude: [README.markdown, package.json, grunt.js, Gruntfile.js, Gruntfile.coffee, node_modules] diff --git a/docs/_plugins/generate_categories.rb b/docs/_plugins/generate_categories.rb deleted file mode 100644 index 554e87a..0000000 --- a/docs/_plugins/generate_categories.rb +++ /dev/null @@ -1,166 +0,0 @@ -# Jekyll category page generator. -# http://recursive-design.com/projects/jekyll-plugins/ -# -# Version: 0.1.8 (201108151628) -# -# Copyright (c) 2010 Dave Perrett, http://recursive-design.com/ -# Modified by Luke Maciak (c) 2012 -# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) -# -# A generator that creates category pages for jekyll sites. -# -# To use it, simply drop this script into the _plugins directory of your Jekyll site. You should -# also create a file called 'category_index.html' in the _layouts directory of your jekyll site -# with the following contents (note: you should remove the leading '# ' characters): -# -# ================================== COPY BELOW THIS LINE ================================== -# --- -# layout: default -# --- -# -#

{{ page.title }}

-# -# ================================== COPY ABOVE THIS LINE ================================== -# -# You can alter the _layout_ setting if you wish to use an alternate layout, and obviously you -# can change the HTML above as you see fit. -# -# When you compile your jekyll site, this plugin will loop through the list of categories in your -# site, and use the layout above to generate a page for each one with a list of links to the -# individual posts. -# -# Included filters : -# - category_links: Outputs the list of categories as comma-separated links. -# - date_to_html_string: Outputs the post.date as formatted html, with hooks for CSS styling. -# -# Available _config.yml settings : -# - category_dir: The subfolder to build category pages in (default is 'categories'). -# - category_title_prefix: The string used before the category name in the page title (default is -# 'Category: '). -module Jekyll - - # make sure this is the same as baseurl in _config.yaml - BASEURL = Jekyll.configuration({})['baseurl'] - BASEURL = "" if (BASEURL == nil) else BASEURL - - # The CategoryIndex class creates a single category page for the specified category. - class CategoryIndex < Page - - # Initializes a new CategoryIndex. - # - # +base+ is the String path to the . - # +category_dir+ is the String path between and the category folder. - # +category+ is the category currently being processed. - def initialize(site, base, category_dir, category) - @site = site - @base = base - @dir = category_dir - @name = 'index.html' - self.process(@name) - # Read the YAML data from the layout page. - self.read_yaml(File.join(base, '_layouts'), 'category_index.html') - self.data['category'] = category - # Set the title for this page. - title_prefix = site.config['category_title_prefix'] || 'Category: ' - self.data['title'] = "#{title_prefix}#{category}" - # Set the meta-description for this page. - meta_description_prefix = site.config['category_meta_description_prefix'] || 'Category: ' - self.data['description'] = "#{meta_description_prefix}#{category}" - end - - end - - - # The Site class is a built-in Jekyll class with access to global site config information. - class Site - - # Creates an instance of CategoryIndex for each category page, renders it, and - # writes the output to a file. - # - # +category_dir+ is the String path to the category folder. - # +category+ is the category currently being processed. - def write_category_index(category_dir, category) - index = CategoryIndex.new(self, self.source, category_dir, category) - index.render(self.layouts, site_payload) - index.write(self.dest) - # Record the fact that this page has been added, otherwise Site::cleanup will remove it. - self.pages << index - end - - # Loops through the list of category pages and processes each one. - def write_category_indexes - if self.layouts.key? 'category_index' - dir = self.config['category_dir'] || 'categories' - self.categories.keys.each do |category| - self.write_category_index(File.join(dir, category), category) - end - - # Throw an exception if the layout couldn't be found. - else - throw "No 'category_index' layout found." - end - end - - end - - - # Jekyll hook - the generate method is called by jekyll, and generates all of the category pages. - class GenerateCategories < Generator - safe true - priority :low - - def generate(site) - site.write_category_indexes - end - - end - - - # Adds some extra filters used during the category creation process. - module Filters - - # Outputs a list of categories as comma-separated links. This is used - # to output the category list for each post on a category page. - # - # +categories+ is the list of categories to format. - # - # Returns string - def category_links(categories) - categories = categories.sort!.map do |item| - ''+item+'' - end - - connector = "and" - case categories.length - when 0 - "" - when 1 - categories[0].to_s - when 2 - "#{categories[0]} #{connector} #{categories[1]}" - else - "#{categories[0...-1].join(', ')}, #{connector} #{categories[-1]}" - end - end - - # Outputs the post.date as formatted html, with hooks for CSS styling. - # - # +date+ is the date object to format as HTML. - # - # Returns string - def date_to_html_string(date) - result = '' + date.strftime('%b').upcase + ' ' - result += date.strftime('%d ') - result += date.strftime('%Y ') - result - end - - end - -end diff --git a/docs/_plugins/generate_sitemap.rb b/docs/_plugins/generate_sitemap.rb deleted file mode 100644 index 7381279..0000000 --- a/docs/_plugins/generate_sitemap.rb +++ /dev/null @@ -1,165 +0,0 @@ -# Jekyll sitemap page generator. -# http://recursive-design.com/projects/jekyll-plugins/ -# -# Version: 0.1.8 (201108151628) -# -# Copyright (c) 2010 Dave Perrett, http://recursive-design.com/ -# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) -# -# A generator that creates a sitemap.xml page for jekyll sites, suitable for submission to -# google etc. -# -# To use it, simply drop this script into the _plugins directory of your Jekyll site. -# -# When you compile your jekyll site, this plugin will loop through the list of pages in your -# site, and generate an entry in sitemap.xml for each one. - -require 'pathname' - -module Jekyll - - - # Monkey-patch an accessor for a page's containing folder, since - # we need it to generate the sitemap. - class Page - def subfolder - @dir - end - end - - - # Sub-class Jekyll::StaticFile to allow recovery from unimportant exception - # when writing the sitemap file. - class StaticSitemapFile < StaticFile - def write(dest) - super(dest) rescue ArgumentError - true - end - end - - - # Generates a sitemap.xml file containing URLs of all pages and posts. - class SitemapGenerator < Generator - safe true - priority :low - - # Generates the sitemap.xml file. - # - # +site+ is the global Site object. - def generate(site) - # Create the destination folder if necessary. - site_folder = site.config['destination'] - unless File.directory?(site_folder) - p = Pathname.new(site_folder) - p.mkdir - end - - # Write the contents of sitemap.xml. - File.open(File.join(site_folder, 'sitemap.xml'), 'w') do |f| - f.write(generate_header()) - f.write(generate_content(site)) - f.write(generate_footer()) - f.close - end - - # Add a static file entry for the zip file, otherwise Site::cleanup will remove it. - site.static_files << Jekyll::StaticSitemapFile.new(site, site.dest, '/', 'sitemap.xml') - end - - private - - # Returns the XML header. - def generate_header - "\n" - end - - # Returns a string containing the the XML entries. - # - # +site+ is the global Site object. - def generate_content(site) - result = '' - - # First, try to find any stand-alone pages. - site.pages.each{ |page| - path = page.subfolder + '/' + page.name - - # Skip files that don't exist yet (e.g. paginator pages) - if FileTest.exist?(path) - - mod_date = File.mtime(site.source + path) - - # Use the user-specified permalink if one is given. - if page.permalink - path = page.permalink - else - # Be smart about the output filename. - path.gsub!(/.md$/, ".html") - end - - # Ignore SASS, SCSS, and CSS files - if path=~/.(sass|scss|css)$/ - next - end - - # Remove the trailing 'index.html' if there is one, and just output the folder name. - if path=~/\/index.html$/ - path = path[0..-11] - end - - if page.data.has_key?('changefreq') - changefreq = page.data["changefreq"] - else - changefreq = "" - end - - unless path =~/error/ - result += entry(path, mod_date, changefreq, site) - end - - end - } - - # Next, find all the posts. - posts = site.site_payload['site']['posts'] - for post in posts do - if post.data.has_key?('changefreq') - changefreq = post.data["changefreq"] - else - changefreq = "never" - end - url = post.url - url = url[0..-11] if url=~/\/index.html$/ - result += entry(url, post.date, changefreq, site) - end - - result - end - - # Returns the XML footer. - def generate_footer - "\n" - end - - # Creates an XML entry from the given path and date. - # - # +path+ is the URL path to the page. - # +date+ is the date the file was modified (in the case of regular pages), or published (for blog posts). - # +changefreq+ is the frequency with which the page is expected to change (this information is used by - # e.g. the Googlebot). This may be specified in the page's YAML front matter. If it is not set, nothing - # is output for this property. - def entry(path, date, changefreq, site) - # Remove the trailing slash from the baseurl if it is present, for consistency. - baseurl = site.config['url'] - baseurl = baseurl[0..-2] if baseurl=~/\/$/ - - " - - #{baseurl}#{path} - #{date.strftime("%Y-%m-%d")}#{if changefreq.length > 0 - "\n #{changefreq}" end} - " - end - - end - -end diff --git a/docs/_posts/2020-06-09-modern-cogtool.md b/docs/_posts/2020-06-09-modern-cogtool.md index b23bda5..dc9a9ca 100644 --- a/docs/_posts/2020-06-09-modern-cogtool.md +++ b/docs/_posts/2020-06-09-modern-cogtool.md @@ -6,7 +6,7 @@ author: Justin Geeslin layout: post guid: http://cogtool.local/?p=55 categories: - - Uncategorized + - status-updates --- Hello World! diff --git a/docs/_posts/2020-08-4-darkmode.md b/docs/_posts/2020-08-4-darkmode.md new file mode 100644 index 0000000..ad78f12 --- /dev/null +++ b/docs/_posts/2020-08-4-darkmode.md @@ -0,0 +1,23 @@ +--- +id: 55 +title: New Feature Dark Mode +date: 2020-08-04T06:30:00+05:00 +author: Justin Geeslin +layout: post +guid: http://cogtool.local/?p=55 +categories: + - status-updates + - macOS + - dark-mode +--- +Support for macOS’s Dark Mode will be coming soon to CogTool! + +Care has been taken to ensure that colors used in CogTool not only look great in Dark Mode but also match accessibility guidelines for color contrast. + +Here’s a sneak peak: +![](https://user-images.githubusercontent.com/1075425/90916888-89d98900-e3a7-11ea-932a-3001f26e25e3.png) +![](https://user-images.githubusercontent.com/1075425/90916892-8a721f80-e3a7-11ea-9860-ceab32e4b204.png) +![](https://user-images.githubusercontent.com/1075425/90916895-8b0ab600-e3a7-11ea-816c-05a3cf16dd6e.png) +![](https://user-images.githubusercontent.com/1075425/90916886-88a85c00-e3a7-11ea-8433-f9aa9e0fb0d9.png) + +This feature is currently in develop branch while [a few issues](https://github.com/CogTool-Modern/cogtool/issues/60) are closed.