Hi, I?m new here and I have 2 unrelated questions:
I am almost finished with my website and I want to upload it to my server. I use Transmit as for another 2 websites I did, just by dropping the whole folder on the window. The upload process goes smooth, but when I check my URL (www.soniakazovsky.online) my content is not there. Any idea? Is there anything I’m missing? I have purchased and applied the license. How wold you suggest to do?
I need to define different text styles to different chunks of text on my website. I know I can do this in the .css file, by defining different classes, but how to tell to the text editor in the panel which text should respond to which class? Just writing some code there or…?
Thank you for your replies to such basic questions!
L
Thank you all for the advice. The c::set(‘debug’, true); is already there. And I think I’ll be able to manage the text style.
About the folder, I have uploaded the folder of this particular website, not the root folder (in the image below the selected folder is what I’ve droped in Transmit). I have tried to rename it according to the URL (as I usually do) but no luck. The www.soniakazovsky.online/folder_name (i assume I have to put the folder name, which I did) shows a 404error page.
Miracle! Yes, I see the subpages don’t work. I’ve read on the documents that the links can just be (link: networks text: networks) and the like, so you don’t have problems if you move your website to another domain. Not sure about the .htaccess, could you explain briefly?
The .htaccess file is a hidden file in the root of your project that is needed for rewriting to work and rewriting is necessary for subpages to work. Maybe it was not copied to the server?
If your host company use Apache as web server:
Create a file named htaccess and copy past this inside:
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite
# In some enviroments it's necessary to
# set the RewriteBase to:
#
# RewriteBase /
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
#RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
#RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
RewriteRule ^site/(.*) index.php [L]
# block direct access to kirby and the panel sources
RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) index.php [L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on
Then upload this htaccess file in your htdocs root folder and rename this file .htaccess (with a “dot” before)
This file is a hidden file used by Apache to rewrite URL …
“About you’re other question, i see you didn’t setup a domain forward yet, that’s why i did it for you. I saw that you created the folder named ‘’/www.soniakazovsky.online/’’. That’s where i pointed the domain to with a intern domain forward. In the link below you see how you can do this yourself. https://www.strato.nl/faq/article/382/Instellen-van-een-domeinforward.html#intern”
and this solved the first problem.
I’ll give a try to the text styling later, and might come back with some other questions. Thank you very much to all!!
L
Please note that if you add the caption within the Vimeo tag, it is added as a figcaption. You would have to style it via the figcaption element in this case.
okthan ks texnixe, i have had a look at the kyrbytag page, but can’t figure how to write the code. There’s not much said on that page about styling of the text, just something about a wikipedia link and other items. Where can I find some more advice on what this tag should look like?
Maybe you can give some examples of what exactly you want to style? The caption example above probably does not make that much sense, it would be better to include that in the Vimeo tag.
Sure. For example, in http://soniakazovsky.online/networks I would like to have the links in the text underlined, while the “home” buttons (which are also links) not underlined (same goes for the menu in http://soniakazovsky.online). Or in http://soniakazovsky.online/works/archive/a-syndrome I would like to have the short text under the first picture smaller and left aligned (this goes for other image captions throughout the site). Just in general, I can make more text classes on the .css file, but how do I specify which part of the code should apply to which part of the text?
And also: how do I create a layout for mobile? With less margin space, for example… I guess i just have to make a “mobile class” and specify that if the screen is smaller than 500px (for ex, is that a good size?) it should load the other part of the code… is that right?
If you add a link via kirbytext, you can give it a class:
(link: http://wikipedia.com class: inline-link)
Then you can style it via your stylesheet.
Your home buttons would get another class, maybe nav-link or whatever (but I don’t know why you add them via your text field and not via a tag in your template).
As regard the image caption, you add it as a separate paragraph. I wouldn’t do that but add it as a caption to the image ( where it belongs semantically) within the image tag
(image: someimage.jpg caption: My caption class:someclass)
Then you can either style all image captions in the same way, or you add a class like in the example.