aureliojargas / aurelio.net Goto Github PK
View Code? Open in Web Editor NEWSources for Aurelio.net website
Sources for Aurelio.net website
Grep for full <html>
files that are not using any site template.
Those are usually old stand alone pages, with old code, old bugs.
Try to modernize whatever you can.
Update the replace script to only save the file (when used with -i
) if there is a change.
browse locally under jekyll serve
TODO
As explained in #20, Netlify serve two URLs for each folder: with and without the trailing slash.
The relative path problem I'll fix in that issue, but it's still annoying two have this behavior (and might be bad for SEO).
I've contacted Netlify support for a solution, but for now I can make a workaround hardcoding 301 redirects for all folders of my site in the _redirects file.
There are three versions of this document:
/sed/sed-HOWTO/
-- HTML, multi-page/sed/sed-HOWTO.html
-- HTML, single page/sed/sed-HOWTO.txt
-- TextI want to have just one version, and I think the single page HTML is the best. Simpler, no navigation, easier to Ctrl-F.
But the official URL is the multi page one.
So I'll move the single page document to the official URL and kill everything else. The remaining will be:
/sed/sed-HOWTO/
-- HTML, single pageAlways put the site area first.
_includes/atacama-nav.html
_includes/nav-atacama.html
I always forget what are the components available in the site theme. Create a single page with a demo. It will serve as a reference to the correct HTML markup.
How to show mixed content problems so I can fix them?
Learn more about mixed content: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content
To find the offending lines:
$ git grep -F 'src="http://aurelio.net' | wc -l # html
386
$ git grep -E '!\[[^]]*\]\(http://aurelio.net/' | wc -l # markdown images
183
$ git grep -F 'http://aurelio.net/' | wc -l # generic catchall
3599
Some posts are still using old WordPress URLs for images, such as:
The parameter is ignored, since now I only have the original images. Check each post using this, fix the URL and maybe resize the image if needed.
I have a copy of the WordPress resized images in my private
/a/www/admin/wp
folder.
Some post-conversion checks to make sure that everything is ok.
Some examples of bad practices to report:
Now they are just removed (display:none
).
Some folders of my site do not have a index.html file. I used to just let Apache list the files.
Now on Netlify, this does not work anymore. I have to create the index files.
Google+ will be shut down soon.
It seems CSS files related to layouts are in /assets
.
But there's that extra vim.css
, that pertains to the /vim
area.
It seems areas have their CSS file inside their folder , but the naming is not consistent.
Decide what would be the desired pattern, document it in the main README and fix the outliers.
Must use the head-base.html include.
But rethink this section. Maybe that info should be in GitHub README.md only. Maybe ditch the sidebar. Maybe convert to a one-page. I don't know.
In the past I've used WordPress for the blog. That era is gone, but the ugly URLs remain:
It's pointless to have the full date in the URL since the publish date is already in the post and it is very unlikely that I'll repeat post titles (so the date would be a differential).
Maybe leave only the year, maybe not.
Used by just a single page:
$ git grep -l include/massa/config.t2t
musica/index.t2t
$
Migrate to the default theme.
Migrate those pages to the default layout.
$ git grep -l include/10anos/config.t2t
doc/coluna/index.t2t
mac/dev/index.t2t
mac/index.t2t
moneylog/_config.t2t
moneylog/faq/index.t2t
moneylog/v4/index.t2t
sed/alfabeto.t2t
sed/index.t2t
sed/livro/index.t2t
sed/sed-HOWTO/config.t2t
shell/canivete/canivete.conf
shell/dialog/index-v6.t2t
shell/dialog/index.t2t
shell/miniman/index.t2t
vim/index.t2t
vim/ooo-vi.t2t
vim/pulando.t2t
vim/selecao-vi-sual.t2t
vim/vi-vim-venci.t2t
vim/vim-comandos.t2t
vim/vim-dicas-ivan.t2t
$
I want that.
Desperately.
Sokoban is in both, and also in my website:
How many more copies do I need? 😂
Currently I host my website in a DreamHost shared server. I use rsync to update it from my desktop.
If I could switch to GitHub Pages (or GitLab Pages, which is more flexible), hosting and deploy (see issue #12) would be solved problems. I guess their servers are also faster than my current one.
What stops me from doing that now:
.htaccess - I have tons of redirects there. Some advanced, using regexes. The simple Jekyll redirect plugin won't make it. CloudFlare Page Rules is an alternative, but only 3 rules are free and any additional rule will add +1USD/month 😱 Maybe a custom shell script to generate all the redirect pages and save them to the repo (ugly!) or generate at build (limited to GitLab only).
Jekyll plugins - I use one for image captions and another to embed YouTube videos. Both are not allowed in GitHub, but in GitLab you can use any plugin, there's no restriction.
Directory listing - Some folders of my site do not have a index.html
file. I just let Apache list the files. GitHub does not show file listings :( Neither GitLab :(
https - GitHub does not provide https for pages using custom domains. There is a workaround using CloudFlare. For GitLab there is a nice guide for Let's Encrypt.
Since 2016 Google Code stopped operations and archived all the projects.
I am hosting there all the ZIP files for my AppleScripts.
The files are still available, but now under a new URL.
Update all the links to the new URLs.
Or maybe just host them in my website, they're only a few megabytes total.
See also: #48
This software is not maintained anymore, but it deserves a nice git history, with all the versions correctly tagged. Also, a nice README file explaining the sources.
Follow the example in https://github.com/aureliojargas/emomemory
Use the Export to GitHub button available in
https://code.google.com/archive/p/adiumbook/source/default/commits
I am trying to make my site simpler. That means not having to carry a txt2tags plugin to convert files.
Now there are two kinds of txt2tags files in my site:
.t2t
files that were added together with their relative .html
file, with no front matter (they are not processed by Jekyll).t2t
files and are converted by the txt2tags_converter.rb plugin when doing jekyll build
.The first legacy files I'll handle in the future.
For now I'm interested in removing the txt2tags from Jekyll build, so I can ditch the plugin. You must convert these files to Markdown or to plain HTML:
Plain HTML is preferred since Markdown is another dependency that adds complexity to the site.
Now that I'm using Netlify, it would be nice to isolate the build command into a script.
Also, I can make some post-conversion checks in this script to make sure that everything is ok, and abort the deploy otherwise. See #29
This is an old mess. Move it under /img
and fix the references.
In practice it works without the trailing slash, but it depends on the web server and tools support. As seen on #20, this isn't always the case.
Also, when searching/replacing URLs in the site sources, having this "with or without" exception makes things more complicated.
Let's just stick to the rule of always having a slash.
Create a check for it and fix all the outliers.
There are still some legacy files encoded in ISO-8859-1. You must convert them to UTF-8.
Used by just a few old txt2tags pages. Migrate those pages to the default layout.
$ git grep -l include/kiwi/config.t2t
doc/changelog-nerd.t2t
doc/direto/homologacao.t2t
doc/direto/index.t2t
doc/dort.t2t
doc/faq.t2t
doc/guerra-editores.t2t
doc/index.t2t
doc/irc-mar2005.t2t
doc/nerd.t2t
doc/sem-mouse-HOWTO.t2t
doc/videogame.t2t
mim.t2t
sed/sed-HOWTO/config.t2t
shell/apostila/comprar.t2t
shell/apostila/conteudo.t2t
shell/apostila/historia.t2t
shell/apostila/index.t2t
shell/apostila/leitores.t2t
shell/apostila/papel.t2t
$
Currently, my caption plugin generates this markup:
<p class="figure">
<img src="image.jpg" alt="image caption">
<span>image caption</span>
</p>
but the html5 version should be:
<figure>
<img src="image.jpg" alt="image caption">
<figcaption>image caption</figcaption>
</figure>
git grep -E '<a href="[^"]*/index\.html"'
Fix and add this check to _scripts/check
.
The course comments (550+) should be on https://aurelio.net/baterna/, but unfortunately they are on http://aurelio.net/blog/2006/10/20/baterna-curso-de-bateria-online-e-gratuito/.
Disqus has a migration tool via CSV which I can upload the URL mapping. See https://help.disqus.com/customer/en/portal/articles/912757-url-mapper
/baterna
/baterna
contents, remove the links to the blog postIn Apache and GitHub Pages, a slashless folder URL is always 301 redirected to have a trailing slash:
In Netlify, both URLs are served. This breaks relative URLs for links and images, since now the "current" folder could be /
or /shell
, depending on the trailing slash presence.
One solution is to always use absolute URLs, for everything. I cannot browse the site locally (offline), but will have a consistent absolute-only references. The absolute URL can use the full domain or be just the path (called root-relative). Too many options to decide :(
Update: That was a Netlify bug, see #34 (comment). Now the folder redirects are working ok. But regardless, I'll leave this issue open because fixing those paths is a good idea.
In old Apache, using /foo /bar
is enough to redirect all requests to /foo
and its subfolders and files to /bar
, for example, /foo/abc.html
becomes /bar/abc.html
.
But in Netlify, this same redirect is applied only for the /foo
folder itself, not its children. You have to explicitly say /foo/* /bar/:splat
to get the same behavior as Apache.
I migrated the redirect rules from Apache to Netlify without taking that into account. So I need to review all the folder redirects and fix where needed.
Grep for every URL in the _redirects file to check if I'm not still using the old URL in some pages.
Add this check to _scripts/check-site
.
I have two versions of the same document:
But now on Netlify only the "all in one" is being served on both URLs :(
In other words, when accessing http://aurelio.net/sed/sed-HOWTO/, the contents of http://aurelio.net/sed/sed-HOWTO.html is being shown. This is the contents that should be appearing: only the TOC links, not the full HOWTO document.
I do not have turned on the “Pretty URLs” post processing, so this should not happen.
Keep the site simple to manage, build, publish and migrate to other tools/servers.
Remember a folder with some .html
files inside? That was simple.
My goal is to make the site simpler. See issue #1.
Currently, there are four kinds of content files in my website:
$ find . -name '*.t2t' | wc -l
274
$ find . -name '*.md' | wc -l
138
$ find . -name '*.html' | wc -l
1401
$ find . -name '*.txt' | wc -l
114
$
I would be happier if I could use just HTML and txt, and never have to convert anything. But life's hard, and I need a tool like Jekyll to automate things.
For now, I'm trying to reduce complexity.
The ideia is to remove the need to have txt2tags (my own tool) to convert files to HTML. It's kinda sad making this move, but Markdown is well supported everywhere an has excellent tooling. I can even try the GitHub Pages or GitLab Pages hosting in the future and save hosting costs. I also don't want to keep maintaining txt2tags forever, so it gotta go :(
Some very very old txt2ags files I will never update, they are legacy. Those could be converted to HTML and be done.
Other txt2tags files are areas of the site I still have interest in updating, so maybe Markdown would be best.
I still don't know if I will get 100% done, but I'll try.
Those are the site areas with txt2tags files:
To see the updated area list, run:
find . -name '*.t2t' | grep -v '^\./_site/' | cut -d/ -f2 | sort | uniq
Centralize icons.
Those are all the same files. They used to be symlinks pointing to the same file, but were flattened when added to Git.
They will all die when those themes are gone. Maybe just hang on a little longer.
Decide one single way of embbeding YouTube videos into pages.
I use a plugin that adds a Liquid tag for YouTube videos. But currently there is only one page using that tag:
$ git grep '% youtube'
_plugins/youtube.rb:# {% youtube oHg5SJYRHA0 %}
_plugins/youtube.rb:# {% youtube oHg5SJYRHA0 500 400 %}
viagem/farol-de-santa-marta/index.md:{% youtube npyF7avT-9s %}
$
All the other videos are added by hand using the HTML snippet YouTube provides.
$ git grep youtube.com | wc -l
110
There are different version of the snippet, some using iframe
, some using object
.
Remember that half the site is processed by Jekyll, the other half are legacy pages. Maybe a single different solution for each is a good first step.
foo.md
file generate foo/index.html
.foo/index.md
as well.This reduces complexity since we have the same tree, regardless. No need to think, no need to check config. Also, it will be easier to switch from Jekyll in the future.
The blog posts will be the only exception since Jekyll requires the DATE-post.md
format and I do not want to change the long time adopted YEAR/MONTH/DAY/POST
URL for posts.
For the main theme, add print directives to remove the crap (sidebar, footer, etc), colors on <PRE>
and decrease the vertical spacing to avoid spanning multiple pages.
My old AppleScripts now under /projects
(previously /soft
) were only available as ZIP files which contained the compiled .scpt
files. Those ZIP files were once hosted at my site, then I moved them to Google Code.
There are two problems now:
To solve both, create a new repo in GitHub to hold the AppleScripts in their text version, and also put the ZIP files as binary releases inside that repo (or just move them back to my website).
Refer https://aureliosoft.wordpress.com for the release dates, changelog and announcements.
Currently, the common parts are all hardcoded in each file.
Maybe not a full layout, since each page is different in layout, CSS and JavaScript, but at least isolate common snippets as includes.
For example, old WordPress classes that are not used by the current theme:
<img class="alignright size-thumbnail wp-image-267" title="Pote de Moedas" src="/wp/wp-content/uploads/2007/09/moedas.jpg?w=128" alt="" width="128" height="96" />
Used by just a few pages. Migrate to the default theme.
$ git grep -l include/clean/config.t2t
baterna/index.t2t
fvm/config.t2t
fvm/index.t2t
include/clean/config.t2t
mac/dev/tutorial-pyobjc/index.t2t
musica/index.t2t
musica/perolas-punk.t2t
musica/shows.t2t
viagem/atacama/album/config.t2t
viagem/atacama/config.t2t
viagem/config.t2t
$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.