Hugo site, either local or on Netlify, doesn't detect my content folders - blogs

I have two content folders: one called "About" and the other one called "blog". It looks like this on the private github repo, where netfliy pulls the data and build:
I'm not entirely sure what's missing both locally and on netlify. Locally, the about folder doesn't turn in a section, but the markdown page shows up. On Netfliy, no post at all shows up, and no section can be seen.
I'm using the simplog theme.
config.toml looks like this
baseURL = "[redacted]"
languageCode = "pt-br"
title = "My New Hugo Site"
theme = "simplog"
author = "Tet"
description = "[redacted]"
[params]
colorTheme = "default"
Here's how it looks on my machine:

Related

call google app script htmlservice.createTemplateFromFile(file) with file located on sub folder

On a side bar google app script htmlservice.createTemplateFromFile(file) is used to launch the side bar by user request.
When the html file (the client html file) is located on the root folder, all works smoothly.
I want to rearrange the project files into several subfolders.
I'm using visual studio code and clasp push to push changes to server.
Everything is ok, except with the file location.
When moving the file, I can not find the way to supply the right path.
for example:
before rearrange two files (and others) were on the google editor.
client.html
server.gs
after moving to subfolder and pushing to server, as the editor does not support sub folders it is reflected with the files names so:
./subFolder/client.html
./subFolder/sever.gs
I also moved the server js (gs in google editor) to the same folder
Code in server to launch side bar
function launchSideBar(){
//try obvious
let file = "client"; // #1
file = "./client"; // #2
//like it displays in editor
file = ".subFolder/client"; // #3
/*maybe server is launched from root,
although it also resides on sun folder, so supply
relative path from root, like for other files (css,ims etc)
*/
file = "./subFolder/client"; // #4
let output =
HtmlService.createHtmlOutputFromFile(file);
//launch
SpreadsheetApp.getUi()
.showSidebar(output);
}
you can see the 4 options I have tried (of course only one different option was not commented each time)
When trying to display the side bar from the sheet added menu item, there is an error message
Exception: No HTML file named subFolder/client was found.
each time file name is different of course.
server is recognized automatically although also moved.
Ideas?
Try using file = "subFolder/client" instead.

How to generate a whole website in a variabilized sub-directory ? (Jekyll)

I've been playing around with Jekyll lately and recently discovered that S3 wouldn't allow me to have enough buckets to have one bucket per website.
So I'm struggling to figure out two things
1) How do I specify that I want a 'child' subdirectory to be created, and all the generated website's files to be in it ?
2) How do I use a variable as the 'child' subdirectory's name ? (since it will be different for each website)
The baseurl config option doesn't seem to do anything about that. Any idea will be welcome :-)
Thanks a lot, and have a great day !
I'm not sure about the variable option, however, for child sub-directories:
A) If you can put the content into "child" folders directly within the jekyll content, then use different configuration files to manage each site through build properties. See the examples under the example below.
B) If you just want to put the same content in different places, perhaps you could use different baseurl or destination properties in different config files? Use the same config file approach as below, but with different versions of those properties instead of/in combination with the exclude property (see https://jekyllrb.com/docs/configuration/#serve-command-options).
Example: Use different config files
Use the exclude config property to exclude folders (and all of that folder's contents) when running a build. You could also specify different output folder locations per site, base URLs, and so on. I'll focus on the exclude property, but you can find other useful properties in the documentation: https://jekyllrb.com/docs/configuration/#global-configuration
For example, you could have the following files/folders:
/siteA-folder/siteA-content/blah.html
/siteB-folder/siteB=content/meh.html
/siteC-folder/siteC=content/foo.html
config.yaml
config_buildA.yaml
config buildB.yaml
Use the build option --config FILE1[,FILE2...] (https://jekyllrb.com/docs/configuration/#build-command-options) to explicitly call your custom config file A or B, each of which has its own version of the exclude property.
Snippet from config_buildA.yaml:
exclude:
- /siteB-folder/ # While building A, you want to exclude the siteB folder and contents
- /siteC-folder/ # Similarly, exclude siteC contents
Snippet from config_buildB.yaml:
exclude:
- /siteA-folder/ # While building B, you want to exclude the siteA folder and contents
- /siteC-folder/ # Similarly, exclude siteC contents
Building A from the command line:
jekyll build --config config_buildA.yaml
Building B from the command line:
jekyll build --config config_buildB.yaml
By managing excludes in the config file, you can re-use the common templates and css, and keep everything together (using less disk space overall).
If there's shared content, you could also look into using a more advanced feature, includes (see https://jekyllrb.com/docs/includes/), to manage the shared content in the includes folder, referenced within the html or markdown files (but that's getting a little of the beaten track for your question, so I'll stop there...)
EDIT: I see you've edited the question specifying the baseurl property doesn't do what you're looking for.
I've used a combination of the url site property baseurl and destination similar to below. In my case, I have different destinations depending on whether it's an archive or latest content, but you could use this to build to different web folders if you wanted.
Ex: config for latest content
url: http://example.com
baseurl: "/latest/"
destination: /path/to/latest/output/
Ex: config for archived content
url: http://example.com
baseurl: "/archive/content/"
destination: /path/to/archive/output/
Then, using the multiple versions of the config file, I can just call whichever one applies.

Which will get Priority between "github pages" and "directory kept at root" in case of name conflicts and why

Say I have an index.html put on my username.github.io, which I can visit by the url, http://username.github.io
Now consider 2 conflicting cases
Say, I have a repository named repo1 with gh-pages activated. So, it should be available at http://username.github.io/repo1
I also have put a folder named repo1 with an index.html inside it, at the username.github.io location.
Here's my question
Now, if I visit from my browser the url http://username.github.io/repo1 which one of 1 or 2 will be served? and more importantly WHY ?
I tested it with my github repo sumanbarick.github.io.
Finding: Repository (github pages) will get priority in case of name conflict.
Test 1: http://sumanbarick.github.io/test/
First I made a repository name test with an index.html inside it. Created branch gh-pages. I tried the url http://sumanbarick.github.io/test/ and I got the page index.html.
Then I created a folder named test and an index.html inside it in sumanbarick.github.io repo
I hit the url again. But still got he index.html from the repo
Test 2: Does 1st defined gets the 1st priority?
This time I made a folder named test2 and an index.html inside it in sumanbarick.github.io repo. I tried the url http://sumanbarick.github.io/test2/ and I got the page index.html from folder test2
But as soon as I created the repo test2 with gh-pages, the result of the url favored the index page of the repo
So, this is a partial answer. And now we know,
Q. Which one will get priority?
A. The repo (Go to the above mentioned url and see for yourself).
Q. Why?
A. I am still curious about this WHY part. Let's see what others say.

silverstripe starting page in db level

silverstripe has main page, which after every rebuild is created new (as home page not always suits).
How and where can i see/change this after rebuilt in mysql level (table?).
I have looked however could not find place/table/field which denotes that this is "link of home page, etc."
Any help would be nice.
This is created based of requireDefaultRecords in SiteTree, this indicates that this can be stopped with a yml config (in _config/config.yml)
SiteTree:
'create_default_pages' : 'false'
In old and deprecated SilverStripe 2.4 you could define any page as homepage for a domain. However this was refactored to a module in 3.x and by default the page with URLSegment "home" is the default home page.
But you can install the functionality with the homepage for domain module, best using composer:
composer require silverstripe/homepagefordomain
which will add an input field to the cms where you can define that page as homepage for a specific domain.

Asp.net 5 Web template missing Bower files

ASP.NET 5 has a folder named Dependencies->Bower which the default Web template contains things like bootstrap, hammer.js, and jquery. These dependencies are copied to a lib folder according to gulpfile.js.
var paths = {
bower: "./bower_components/",
lib: "./" + project.webroot + "/lib/"
};
For some reason my site is missing all the styling and client behavior (carousel) that used to work fine, and the lib files appear to always be blank documents now. Does the gulpfile.js run during a VS build? Is there something else I need to do to re-copy these files to lib?
Go to the Task Runner Explorer in Visual Studio, right click on the copy task, and click run.
I'm not sure how the files got removed or why this was necessary, but it does fix the problem.