How can I customize Docfx documentation (themes or templates)? - documentation-generation

I just started using Docfx and set up some basic conceptual documentation. Now I want to make some adjustments to the theme (company logo, perhaps some font changes, etc.) Minor stuff.
The official documentation only gives a high-level description of how to create a new template. I've never used a templating language before, so I'd like to avoid that for now if possible.
My question is: how can I make small adjustments to the default theme, like some CSS changes and perhaps adding external resources (like font awesome)?
Do I have to create an entire template (or a part of it) or can I include a CSS file somehow? The documentation mentions a theme option but so far I've found no examples or existing themes to learn from.
A mere link to a project that uses a custom theme or template would already be very helpful. The docfx repo has a docfx.website.themes folder and the default template is also in there I believe, but I couldn't really figure out which files I would have to provide to roll my own.

Export template:
Run docfx template export default, then you'll see default template in _exported_templates\default
Change themes in default template, e.g:
Adding external resource: modify styles\head.tmpl.partial
CSS change: modify styles\docfx.css or styles\main.css
Use customized template:
Run docfx -t _exported_templates\default, which will use your customized template!
NOTE: It is possible that DocFX updates its embedded templates when releasing new version. So please make sure to re-export the template if you overwrite or dependent on that template in your custom template.

Related

How do I customize go-present template?

I am new to Go and just stumbled upon Go's present package which I imported via go get golang.org/x/tools/present.
Is there any way to customize the look of the presentation? E.g. via adjusting the default css file?
If so where are the files used for the style? I cannot find the package anywhere in my Go path...
Let's assume you have a directory myslides with some .slide files in it.
Create a subfolder theme in myslides.
Copy the folders template and static from $GOPATH/src/golang.org/x/tools/cmd/present to that new theme directory
Start present with a new parameter -base: present -base theme
Modify the styles and template files. Most small things are in styles.css.
If you change the template files, then you need to stop and restart present. If your are changing the styles only, then a reload in the browser will do (take care to disable the cache.)
I found that the only way to change presentation styles is to modify library files directly.
If you use vgo:
$GOPATH/pkg/mod/golang.org/x/tools#<version>/cmd/present
Otherwise:
$GOPATH/src/golang.org/x/tools/cmd/present
Of cause first you need to download present package: go get golang.org/x/tools/cmd/present

Have your custom theme exported in SemanticUI

Following documentation, I downloaded Semantic UI with:
npm install semantic-ui
then, I customised few variables per site, also few on element level, button for example.
This is all well, and I haven't had any problem changing those.
Then in theme.config file, I could specify:
#button: 'mytheme';
to pickup those custom style overrides
For my theme to be separate from Semantic UI core, I crated directory in the following path,
src/themes/mytheme
,and after running gulp build, I expected to have that mytheme exported over to dist/themes/mytheme along with basic and default which were already there. But that was not the case. So to be able to use my new button styles, I had to move manually newly generated button.css from dist/components after that gulp build task.
Am I doing this wrong? How to have all override files in one place like packaged theme? So I could then add <link> declaration after semantic.min.css to use my overrides.

Override Xcode's default templates

I want to modify Xcode's default templates but only for a given user in my Mac. I tried following the steps in this answer, but instead of overriding the default templates it created new ones. You can see the result in the following image.
Is there any way I can tell Xcode to use only my custom templates without modifying the original files?

JOOMLA, Best way to make alternate layouts for articles?

I can't find a answer for this, I want to know what is the best way to have an alternative layouts for articles in Joomla.
If I understand you correctly you are looking for a way to create additional Alternative Layouts for articles. Under parameter tab "Article Options":
If that is the case, its very close to the other provided answers here. Its just that you got to rename the copied default.php file to something else. If you rename it to custom.php it will end up with the text "custom" like the image above.
Here goes my shot for a step by step:
Find the default layout file(s). You could use the ones provided by the com_content component. They can be found at components/com_content/views/article/tmpl. Copy both default.php and default_links.php.
Now you need to rename and copy the file(s) into a template. The target template can be any of the installed templates. Using beez_20 the new path for the copied file(s) should be templates/beez_20/html/com_content/article/custom.php and templates/beez_20/html/com_content/article/custom_links.php.
Goto to edit article using the backend. Expand the Article Options tab and find Alternative Layout. Select your new layout.
Your template might already provide a article override. If so, you might want to use the files of that template instead (instead of the ones in step 1). So if you are using beez_20, you could copy templates/beez_20/html/com_content/article/default.php and templates/beez_20/html/com_content/article/default_links.php.
Helpful links:
Using Joomla’s Template and Layout Override
Layout overrides in Joomla 1.6
The best way to do this would either to install another content component - such as k2 which is highly customizable. Or any other content component on JED.
Alternatively you could create a template override on the existing Joomla Template. This is preferable to editing the files directly in com_content component as the template overrides will never be overwritten whereas the core files will be in any Joomla Updates. I should add, hopefully unnecessarily that this requires Joomla 1.5, 1.6, 1.7, 2.5 or 3.0 (although this is still in beta as of present). So make sure you're not using 1.0.
To create an alternative layout for the built in articles component the best way to do it is probably to create a template over-ride.
See this article on docs.joomla.org on "How to override the output from the Joomla! core"
Creating an alternative for an article layout is pretty straight forward. You can achieve this by using the core layout override with your published template(s).
First you want to get/copy the core article layout file:
components/com_content/views/article/tmpl/default.php
Then place it into your published template:
templates/YOURTEMPLATE/html/com_content/article/default.php
If the template you are using doesn't have the html folder, then you will have to create that folder and each folder to make that path correct.
Once you have this in place, all you need to do is make changes to that default.php file you have just place in the template and that is it!

How can i make customized template for the front end by overriding the default one?

I am new to Pyrocms and reading the documentation I could not change fix my problem. I need my own template to be incorporated that is I want to change the default one provided. How can I do that. I really need a help.
Go into:
system/cms/themes/default/
This is the folder where you can find the default template of pyrocms. There you will see folders like "views, css, js, img" etc.
You can start by modifying views/layouts/default.html and views/partials/ folder.
Ofcourse if you need to change css and/or js you need to modify them too.
By the way this is the official pyrocms documentation for editing themes:
http://www.pyrocms.com/docs/manuals/designers

Resources