I want to change the HTML structure of MediaWiki and i have no clue which files are responsible for it.
I would be very thankful, if someone could tell me which files are resposible for building the Mediawiki HTML structure.
What you mean by Mediawiki HTML structure is essentially the active skin structure rather than Mediawiki itself. If you want to change look and feed of Mediawiki you need to either alter existing skin (which is Vector by default) or build your own skin. Easiest would be to start from these two guides Manual:Skinning_Part_1 , Manual:Skinning_Part_2 .
MediaWiki uses PHP to process and display data stored in a MYSQL database. Check the source mirror at Github https://github.com/wikimedia/mediawiki
There's probably an easier way to achieve what you want to do.
Related
I'm using DITA OT 3.7.1 with a custom plugin to generate HTML5 documentation. When we used DITA OT 3.2.1 with the same plugin, HTML files were not generated for topics that were only used for content references and are not linked in the map. When we upgraded to DITA OT 3.6.1, HTML files were generated for these topics, and users were able to find them in our output.
I've been looking for a way to change our custom plugin to prevent those topics from being generated as HTML files. The closest solution is to set onlytopic.in.map to true. The problem is making this setting stick. Even if I change it in orgs.dita.base\build_init.xml, the HTML files are still generated for the topics that are not in the map. Of course, I would rather override it in our plugin and not change the core DITA OT. FYI, we're using map-first preprocessing with the preprocess2 target.
(Yes, I know we can add the topics to the map and set them to resource-only and toc=no. Some of our help systems have dozens of conref-only topics, and we're trying to avoid changing source files.)
Any suggestions on fixing this are greatly appreciated. Thanks in advance for your help.
Take care,
Matt Stern
Sr. Principal Technical Writer
Kofax
It is difficult to guess what's the problem, without looking at the code. You should read through the migration guides. I guess it is related to XSLT pipelines or the new <ditafileset> technique.
I'm just getting into preprocessors, and I'm beginning with haml. I've got the basics down, and have yet to put this to any practical use. I'm not great with the command line, but at the very least, I've managed to convert my index.haml file to a readable html file.
My question is twofold.
1) Do I need to individually convert EACH file within my site directory i.e index.haml | service.haml | contact.haml etc or am I able to bulk convert the entire directory?
2) My second question relates to CMS's such as Wordpress. Am I able to use preprocessors with platforms such as this? If so, how would that work?
Apologies if these questions sound basic and/or stupid, but gotta start somewhere!
Thanks, Scott
1) NO, you don't need to convert each file to HAML. your server serves back HTML back to the client. If it's just plain HTML, it just serves without pre-processing through HAML engine. If it's haml, it pre-processes to generate HTML which will be finally served to the client.
2) CMS's such as WordPress support plain HTML by default, maybe some plugins might allow you to use HAML. you can always use conversion tools like htmltohaml to convert HAML templates to HTML if you want skip plugins.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm building my own blog and I would have lots of articles, so, copying and pasting the head every time, or an aside, the footer or some repeated parts of the blog would be stupid.
So, I'm looking a way to do it in an easy way. I heared about templating (but don't know what it is) and found this answer: Is it possible to create a web site header without copying and pasting it on every page? but it seems that is not what I'm looking for.
I heared about HAML and Markdown (HTML Preprocessors) and don't know if they are used to do what I need.
The solution I want to find is something like #import in Sass.
I have an #import "head.scss"; and in the compiled file I hadn't repeated manualy the (in this case an "imported module" head.scss)
I might say I'm learning to develop my static blog with Jekyll, just because I want to learn to use this technology, and second I know how to use WordPress, Joomla and learning a new thing would be interesting for me but I don't want to learn PHP so I think a templating language will be easier for this project
If you want to use Jekyll, you can use includes to avoid repeating code.
If You are looking easier ways for managing posts and front matter You should look into Jekyll Bash UI or Octopress.
If You want to learn more about Jekyll and its templating system, I'd recommend You to read the Jeyll.tips web page. It contains well formatted and easy to read how-tos, and also covers advanced topics like data files and collections.
Jekyll Bash UI (requires Bash)
Creating a new post is quite easy process, just this on the command line:
jcli.sh new
Octopress
Octopress uses rake utility which makes using Jekyll easier.
For creating a post You just have to call this:
rake new_post["My new post with Octopress"].
After this You can call rake generate to generate the page or rake preview to run the webserver at localhost on port 4000, so You can preview the changes.
The answer is yes it's possible.
In order for a scss file to work you have to make sure the .scss file (or sass file) is converted to css first. (you can look up the many sass tutorials online. for that, just look for converting sass or scss files into css there are even little simple applications for that like scout) By the way, with less you can do the same thing for css files as with sass in terms of importing.
For html files there are templating engines like you said. You can compare popular ones like moustache, dust.js and handlebars just to name a few.
With these you can import snippets of html code inside your file (so you do not have to repeat code).
In programming languages like JavaScript and php you can also do the same thing.
in PHP you can use for example the include() or require() function to import other bits of code from other files into your current file. And in languages like JavaScript you can even use something like angular for example to create simple custom directives to achieve the same goal.
Pretty much every server side language I've worked with has shared views in some manner or another.
asp.net webforms has master pages, asp.net mvc has shared views, coldfusion has cfinclude, RoR has partials, PHP has shared layout. I don't know about straight up HTML, but when utilizing a server side language this is definitely possible.
I would suggest using a content management system, like WordPress (https://wordpress.com/) , Joomla (http://www.joomla.org/), or Drupal (https://www.drupal.org/). You create a template one time and load it into the CMS. You can then create as many pages as you need without having copy and paste the template. You can also add in different elements as needed. This makes managing a blog much easier.
If you dead set on doing it one page at a time, I would suggest using PHP to pull in the header. Here is a good article to get you started, Creating a PHP header/footer . However, you'll still need to copy and paste a template file to create a new page.
This might be a far fetched question, but here it goes:
I'm trying to configure a MediaWiki and I'm grouping content into namespaces. I need to find a reasonably easy way for copying a namespace (including content) and pasting it with a different name. First of all: is this possible? Are there any extensions for this? I've looked a bit at the MediaWiki database and I can implement my own software if it is needed, but there are a lot of tables, so if you can give any guidelines it would be nice!
Well this was easily solved. Just export everything by using Special:Export (Special:AllPages can filter by namespace). You can then parse the exported file and change for instance the content between each <title> tag to whatever you want. For example the name of the namespace or subpage you want to transfer the content to.
When you're done you just import it back by using Special:Import.
I've been tasked at work to create a 'website' on a CD for a client. I've made a start where basically everything is hardcoded pure html, and god how easily you forget how amazing templates are, so much freakin' boilerplate. So I would prefer to somehow create a set of linked html pages using a template system.
Is there some method of easily producing a set of linked html files (suitable for CD, i.e. no webserver) using something like Django? The project is doable by hand, but there's a lot of overhead.
Would love to hear alternative ideas as well, not set on Django, just what I'm kind of familiar with.
Note: Can't include any software, can't use anything from the internet. Flat html, on the cd.
You might be interested in a static-site generator like Hyde (Python) or Jekyll (Ruby). Essentially lets you create pages in Markdown/Textile/whatever with templates, and then generate static HTML files with a simple shell command. You can deploy it however you want, since it's just files.
I've used Jekyll myself because I heard about it first (despite being a Python guy primarily), but Hyde seems a bit more competent (CSS processors, for example). Jekyll is more widely used, I think.
(Using Django would mean that you'd have to run a Django installation on some server just to create the content and then generate "linked html files"...)
Here is another approach: http://lethain.com/intricate-static-websites-with-django-templates/