Update: I got fed up and re-do everything from the ground-up and it fixes itself.
I have a github pages site built with Jekyll and Chirpy theme.
Locally, it runs great.
However when deployed on Github Pages there are a few directories that return the 404 page even though the path is valid and there is an index.html file in it.
Example:
https://catmandx.github.io/posts/Wgel-CTF-Writeup/ display normally
https://catmandx.github.io/tags/cmc/index.html returns 404
http://127.0.0.1:4000/tags/cmc/index.html display correcly.
I have temporarily make the repo public, it's here: https://github.com/catmandx/catmandx.github.io
I have been banging my head for a few hours now. I have tried committing and pushing again to re-run Actions, manually editing the /tags/cmc/index.html file in the gh-pages branch but nothing works.
This is the _config.yml file, not sure if it helps but here:
# The Site Settings
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2017-2019 Cotes Chung
# MIT licensed
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# --------------------------
title: Hoang Nguyen # the main title
tagline: Simple Blog. # it will display as the sub-title
description: >- # used by seo meta and the atom feed
A minimal, portfolio, sidebar,
bootstrap Jekyll theme with responsive web design
and focuses on text presentation.
# fill in the base hostname & protocol for your site, e.g., 'https://username.github.io'
url: 'https://catmandx.github.io'
author: Hoang Nguyen # change to your full name
avatar: /assets/img/avatar.jpg # support internet resources
github:
username: catmandx # change to your github username
#twitter:
# username: twitter_username # change to your twitter username
social:
name: Hoang Nguyen # it will shows as the copyright owner in Footer
email: hhoang.nov.13#gmail.com # change to your email address
links:
# The first element serves as the copyright owner's link
# - https://twitter.com/username # change to your twitter homepage
- https://github.com/catmandx # change to your github homepage
# Uncomment below to add more social links
- https://www.facebook.com/whohoi
# - https://www.linkedin.com/in/username
# google_site_verification: google_meta_tag_verification # change to your verification string
# --------------------------
# Only if your site type is GitHub Project sites and doesn't have a custom domain,
# change below value to '/projectname'.
baseurl: ''
# Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
timezone: Asia/Ho_Chi_Minh
google_analytics:
id: '' # Fill with your Google Analytics ID
pv:
# The Google Analytics pageviews switch.
# DO NOT enable it unless you know how to deploy the Google Analytics superProxy.
enabled: false
# the next options only valid when `google_analytics.pv` is enabled.
proxy_url: ''
proxy_endpoint: ''
cache: false # pv data local cache, good for the users from GFW area.
disqus:
comments: false # boolean type, the global switch for posts comments.
shortname: '' # Fill with your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
# Prefer color scheme setting.
#
# Note: Keep empty will follow the system prefer color by default,
# and there will be a toggle to switch the theme between dark and light
# on the bottom left of the sidebar.
#
# Available options:
#
# light - Use the light color scheme
#
# dark - Use the dark color scheme
#
theme_mode: # <light|dark>
# boolean type, the global switch for ToC in posts.
toc: true
paginate: 10
kramdown:
syntax_highlighter: rouge
syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
css_class: highlight
# default_lang: console
span:
line_numbers: false
block:
line_numbers: true
start_line: 1
# DO NOT change this unless you're a Pro user on Jekyll and Web development,
# or you think you're smart enough to change other relevant URLs within this template.
permalink: /posts/:title/
collections:
tabs:
output: true
sort_by: order
defaults:
-
scope:
path: '' # An empty string here means all files in the project
type: posts
values:
layout: post
comments: true # Enable comments in posts.
toc: true # Display TOC column in posts.
breadcrumb:
-
label: Posts
url: /
-
scope:
path: _drafts
values:
comments: false
-
scope:
path: index.html
values:
breadcrumb:
-
label: Posts
-
scope:
path: tags
values:
breadcrumb:
-
label: Home
url: /
-
label: Tags
url: /tabs/tags/
-
scope:
path: categories
values:
breadcrumb:
-
label: Home
url: /
-
label: Categories
url: /tabs/categories/
-
scope:
path: ''
type: tabs # see `site.collections`
values:
layout: page
dynamic_title: true # Hide title in mobile screens.
breadcrumb:
-
label: Home
url: /
sass:
sass_dir: /assets/css
style: compressed
compress_html:
clippings: all
comments: all
endings: all
profile: false
blanklines: false
ignore:
envs: []
exclude:
- vendor
- Gemfile.lock
- Gemfile
- tools
- docs
- README.md
- LICENSE
- example
jekyll-archives:
enabled: [categories, tags]
layouts:
category: category
tag: tag
permalinks:
tag: /tags/:name/
category: /categories/:name/
Update: This is the log, as you can see, the files exists but all the subdirectories in /categories and /tags returns 404:
You can solve this issue by executing bash tools/init.sh
You will also have to run this init.sh every time there is a category/tag created.
Related
I'm trying to make Home Assistant button/switch, which changes state of my lamp through REST call.
I got set up server with command, which changes state of lamp on 192.168.43.21/lampSwitch and returns json {"state": "ON"} or OFF, based on after-switching state.
I'm facing problem with scripting entities and showing current/returned state in Hassio - acquiring state and changing it via home-screen switch.
My configuration:
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
rest:
- scan_interval: 5
resource: http://192.168.43.21/
sensor:
- name: "Temperatura"
# unique_id: "sensor.temperature_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['temperature']}}"
json_attributes:
- "temperature"
- name: "Wilgotność powietrza"
# unique_id: "sensor.humidity_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['humidity']}}"
json_attributes:
- "humidity"
- name: "Poziom wody"
# unique_id: "sensor.water_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['water']}}"
json_attributes:
- "water"
lamp_switch:
- command: "Lamp switch"
trigger:
platform:
action:
url: http://192.168.43.21/lampSwitch/
I saw solution which uses cURL and command line, but I couldn't find any suiting example.
Note that the rest entities works just fine (shows up at home screen).
Thank you in advance
I use this to launch applications on my Samsung TV. I define my_command in Configuration.yaml, then use:
/bin/bash -c "/usr/bin/curl -X POST 'http://<<My_IP>>:8001/api/v2/applications/'{{ variables.my_command }}"
I call this from a button and pass a variable that defines the application that I want.
I hope this helps.
I have installed kubie and have been using it to successfully manage my multi-cluster configs.
However, recently I noticed that my default KUBECONFIG and KUBIE_KUBECONFIG paths have changed. Now when I try to download a new autopilot cluster config, it disappears.
KUBECONFIG=/var/folders/rb/2t5drg9n0f3g_p3y7rnknf_w0000gn/T/kubie-configpAMbHS.yaml
KUBIE_KUBECONFIG=/var/folders/rb/2t5drg9n0f3g_p3y7rnknf_w0000gn/T/kubie-configpAMbHS.yaml
I would like to change them back to: $HOME/.kube/config.
How can I do this?
NOTE: there are no settings in kubie.yaml to do this.
I had the same problem. I followed the instructions in the README.md - section Settings - https://github.com/sbstp/kubie/blob/master/README.md#settings and now echo $KUBECONFIG shows the right paths.
# yaml
# Force kubie to use a particular shell, if unset detect shell currently in use.
# Possible values: bash, dash, fish, xonsh, zsh
# Default: unset
shell: bash
# Configure where to look for kubernetes config files.
configs:
# Include these globs.
# Default: values listed below.
include:
- ~/.kube/config
- ~/.kube/*.yml
- ~/.kube/*.yaml
- ~/.kube/configs/*.yml
- ~/.kube/configs/*.yaml
- ~/.kube/kubie/*.yml
- ~/.kube/kubie/*.yaml
# Exclude these globs.
# Default: values listed below.
# Note: kubie's own config file is always excluded.
exclude:
- ~/.kube/kubie.yaml
# Prompt settings.
prompt:
# Disable kubie's custom prompt inside of a kubie shell. This is useful
# when you already have a prompt displaying kubernetes information.
# Default: false
disable: true
# When using recursive contexts, show depth when larger than 1.
# Default: true
show_depth: true
# When using zsh, show context and namespace on the right-hand side using RPS1.
# Default: false
zsh_use_rps1: false
# When using fish, show context and namespace on the right-hand side.
# Default: false
fish_use_rprompt: false
# When using xonsh, show context and namespace on the right-hand side.
# Default: false
xonsh_use_right_prompt: false
# Behavior
behavior:
# Make sure the namespace exists with `kubectl get namespaces` when switching
# namespaces. If you do not have the right to list namespaces, disable this.
# Default: true
validate_namespaces: true
# Enable or disable the printing of the 'CONTEXT => ...' headers when running
# `kubie exec`.
# Valid values:
# auto: Prints context headers only if stdout is a TTY. Piping/redirecting
# kubie output will auto-disable context headers.
# always: Always prints context headers, even if stdout is not a TTY.
# never: Never prints context headers.
# Default: auto
print_context_in_exec: auto
I added new field in filebeat.yml
as below:
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /home/kren/ELK/docker-elk/original-logs-000/testa/feedaggregator/*
tags: ["java"]
fields:
app_id: java
#fields_under_root: true
I could not see this new field in ES via Kibana and tried using it in logstash config and doesn't work
if [fields][app_type] == "java" or "%{[fields][app_type]}" == "java" {
grok {
match => {"message" =>"%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:Loglevel}%{SPACE}%{SPACE}%{GREEDYDATA:message}"}
overwrite => ["message"]
}
}
anyone could help please? how to test it?
Thanks
found problem.
app_id: "java"
need the double quote for the string value
My project: https://github.com/sebastian3495/sebastian3495.github.io
My website (current displayed without css rendered): https://sebastian3495.github.io/
How can I have all links point to my github project instead of localhost?
What am I missing? I am new to jekyll and web development isn't my strongest point, so please bear with me.
EDIT: My config file hasbeen updated
_config.yml
title: Blog Title
description: Describe your website here.
# put your disqus here
remote_theme: aron-bordin/neo-hpstr-jekyll-theme
disqus_shortname:
reading_time: true # if true, shows the estimated reading time for a post
words_per_minute: 200
logo: images/logo.png # logo visible in the topbar
excerpt_separator: <!--more-->
url: https://sebastian3495.github.io
# draw your top menu here
# each item must have a title and a url.
# To list post categories. use type: 'categories'
# To create sub categories. add a submenu item
# See the example
menu:
- title: 'Home'
url: '/'
- title: 'Fork'
url: 'http://github.com/aron-bordin/neo-hpstr-jekyll-theme'
- title: 'Install'
url: 'http://github.com/aron-bordin/neo-hpstr-jekyll-theme#installation'
- title: 'Tags'
url: '/tags'
- title: 'Categories'
url: '/categories'
type: 'categories'
- title: 'Favorites'
url: '#'
submenu:
- title: 'Code Highlighter'
url: '/intro/code-highlighting-post/'
- title: 'Sample Post'
url: '/intro/sample-post/'
# Owner/author information
owner:
name: Sebastian Nielsen
site: http://aronbordin.com
avatar: images/avatar.jpg
bio: "TEsting stuff off! . :D . It shouldn't be super long but a good two sentences or two should suffice."
email: you#email.com
# Twitter nick for use in Twitter cards and follow button.
twitter: aron_bordin # if no twitter in this config, the twitter follow button will be removed
# GitHub nick for use in follow button in author block.
github: aron-bordin
# Twitter account associated with the site if different from owner/author twitter account.
# Used in Twitter cards.
twitter:
# Social networking links used in author block underneath posts. Update and remove as you like.
social:
- title: "github"
url: "https://github.com/aron-bordin"
- title: "linkedin"
url: "https://br.linkedin.com/in/aronbordin"
- title: "youtube"
url: "https://www.youtube.com/channel/UCfnSek-9HPWOx5e2pH7VFgg"
# Background image to be tiled on all pages
background:
# Analytics and webmaster tools stuff goes here
google_analytics:
google_verify:
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify:
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
locale: en_US
future: true
highlighter: rouge
markdown: kramdown
sass:
sass_dir: _sass
style: compressed
# https://github.com/mojombo/jekyll/wiki/Permalinks
permalink: /:categories/:title/
# Amount of post to show on home page
paginate: 5
# if true, shows the floatting share buttons
float_share: true
# Octopress
# Default extensions
post_ext: md
page_ext: md
# Found in _templates/
post_layout: post
page_layout: page
# Format titles with titlecase?
titlecase: true
include: [".htaccess", "C:/Users/sebas/Documents/GitHub/Sebastian_Nielsen_Blog/_includes"]
exclude: ["demo/*", "lib", "config.rb", "Capfile", "config", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"]
plugins: ["jekyll-paginate", "jekyll-remote-theme"]
theme: neo-hpstr-jekyll-theme
Since you're using a third-party theme, I understand you followed the instructions to run jekyll build locally first and then uploaded the contents of your ./_site directory.
The issue here is that recent versions of Jekyll automatically sets the url key to http://localhost:4000 when you build locally.
You have two basic choices:
To use both third-party themes and third-party plugins on GitHub Pages, you need to build the site locally by changing the JEKYLL_ENV env to production (or anything else other than development)
JEKLL_ENV=production bundle exec jekyll build
(on Windows, you need to run set JEKLL_ENV=production first followed by the jekyll incantation.
To use a third-party theme that requires only official plugins, and the theme-repo itself is also hosted on GitHub, you can use the remote_theme feature (included by default in recent versions of gem "github-pages"):
# _config.yml
remote_theme: aron-bordin/neo-hpstr-jekyll-theme
Refer: https://github.com/benbalter/jekyll-remote-theme for details on the jekyll-remote-theme plugin usage.
As you're pushing locally generated code, you need to :
In _config.yml, set url: https://sebastian3495.github.io
Run a bundle exec jekyll build
Push the resulting code to github.
I am using Jekyll and Markdown on Github for my blog. How do I insert code tags in my page?
example I was thinking I can use the <pre> tags to insert some code snaps into my page to display to the readers but jekyll does not like them..
Can someone please tell me a good formatting tag I can use with this to insert code in my page
if I try this code:
<pre>
<code class="ruby">
git clone --mirror git#git.com:project project
cd project
git remote add github git#github.com:username/project.git
In cron Job
cd /pathto/project && git fetch -q && git push -q --mirror github
</code>
</pre>
I get this error
My _config.xml
# This is the default format.
# For more see: https://github.com/mojombo/jekyll/wiki/Permalinks
permalink: /:categories/:year/:month/:day/:title
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
auto: true
pygments: true
# Themes are encouraged to use these universal variables
# so be sure to set them if your theme uses them.
#
title : xxxx
tagline :xxxx
author :
name : xxx
email : jxxx
github : xxx
twitter : xx
# The production_url is only used when full-domain names are needed
# such as sitemap.txt
# Most places will/should use BASE_PATH to make the urls
#
# If you have set a CNAME (pages.github.com) set your custom domain here.
# Else if you are pushing to username.github.com, replace with your username.
# Finally if you are pushing to a GitHub project page, include the project name at the end.
#
production_url : http://johnathanmarksmith.com
# All Jekyll-Bootstrap specific configurations are namespaced into this hash
#
JB :
version : 0.3.0
# All links will be namespaced by BASE_PATH if defined.
# Links in your website should always be prefixed with {{BASE_PATH}}
# however this value will be dynamically changed depending on your deployment situation.
#
# CNAME (http://yourcustomdomain.com)
# DO NOT SET BASE_PATH
# (urls will be prefixed with "/" and work relatively)
#
# GitHub Pages (http://username.github.com)
# DO NOT SET BASE_PATH
# (urls will be prefixed with "/" and work relatively)
#
# GitHub Project Pages (http://username.github.com/project-name)
#
# A GitHub Project site exists in the `gh-pages` branch of one of your repositories.
# REQUIRED! Set BASE_PATH to: http://username.github.com/project-name
#
# CAUTION:
# - When in Localhost, your site will run from root "/" regardless of BASE_PATH
# - Only the following values are falsy: ["", null, false]
# - When setting BASE_PATH it must be a valid url.
# This means always setting the protocol (http|https) or prefixing with "/"
BASE_PATH : false
# By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme.
# ex: [BASE_PATH]/assets/themes/[THEME-NAME]
#
# Override this by defining an absolute path to assets here.
# ex:
# http://s3.amazonaws.com/yoursite/themes/watermelon
# /assets
#
ASSET_PATH : false
# These paths are to the main pages Jekyll-Bootstrap ships with.
# Some JB helpers refer to these paths; change them here if needed.
#
archive_path: /archive.html
categories_path : /categories.html
tags_path : /tags.html
atom_path : /atom.xml
rss_path : /rss.xml
# Settings for comments helper
# Set 'provider' to the comment provider you want to use.
# Set 'provider' to false to turn commenting off globally.
#
comments :
provider : disqus
disqus :
short_name : jekyllbootstrap
livefyre :
site_id : 123
intensedebate :
account : 123abc
facebook :
appid : 123
num_posts: 5
width: 580
colorscheme: light
# Settings for analytics helper
# Set 'provider' to the analytics provider you want to use.
# Set 'provider' to false to turn analytics off globally.
#
analytics :
provider : google
google :
tracking_id : 'UA-123-12'
getclicky :
site_id :
mixpanel :
token : '_MIXPANEL_TOKEN_'
# Settings for sharing helper.
# Sharing is for things like tweet, plusone, like, reddit buttons etc.
# Set 'provider' to the sharing provider you want to use.
# Set 'provider' to false to turn sharing off globally.
#
sharing :
provider : false
# Settings for all other include helpers can be defined by creating
# a hash with key named for the given helper. ex:
#
# pages_list :
# provider : "custom"
#
# Setting any helper's provider to 'custom' will bypass the helper code
# and include your custom code. Your custom file must be defined at:
# ./_includes/custom/[HELPER]
# where [HELPER] is the name of the helper you are overriding.
If the "page" you are referring to is a Markdown file, i.e. the extension is .md or .markdown, then you'll want to use the standard Markdown syntax:
For inline code use backticks, like this: `inline code`
For block code indent each line by 4 spaces:
block
of
code
Jekyll uses a Markdown parser like RedCarpet, Maruku or RDiscount and doesn't define how you should format your content, that's set by the type of content you are writing, in this case, Markdown. So the place to look is the Markdown syntax documentation for code:
http://daringfireball.net/projects/markdown/syntax#code
You might also look into Syntax highlighting using the {% highlight %} Liquid syntax tag:
https://github.com/mojombo/jekyll/wiki/Liquid-Extensions#code-highlighting
Hope that helps!
How about this sir
~~~ ruby
# This is a test.
def foo
puts 'foo'
end
~~~
ref