I am using blocks to create and share my d3 snippets. When I have more than one file, for example this block, the data.tsv the file appears second. It's a huge file, so if someone wants to see the javascript code he has to scroll all the way down.
My question is, is there any way to change the order in which files are displayed in blocks? It seems to not follow Github gist's alphabetical order as index.html appears before data.tsv. Or do I have to create just one index.html file and put all my javascript and CSS code in it? like most of the blocks do.
index.html is always listed first, then the other files are listed alphabetically. Something I'll prepend an _ to interesting files, like _script.js to force them to show up first.
Related
I'm writing a document using asciidoc and asciidoctor. So, I'm having a intro.adoc file and then bunch of section files. So, what I want to do is list them on to intro.adoc and add hyperlinks to them so that it will be easy to navigate.
For this I can think of two approaches:
First, I can use headers and associate a relative link to .adoc files in the same directory. So, that they will redirect to them. But I don't know how to achieve it. link: == section1.adoc[Section 1] is not working.
Second, using include::section1.adoc[]. Its working but its not a hyperlink.
What is wrong with it? or is there a easy way to do it.
Edit
If its not clear, I'm trying to achieve this # [Section1](section.md)(Markdown version) in asciidoc.
What about:
<<section1.adoc#Section1,your link>>
See:
https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/
We are considering using Sphinx where I work and it appears to do everything we need. However, I am having issues getting it to match the required corporate template, which requires there to be some front matter pages inserted between the title page and table of contents.
If text is text is placed above the master table of contents in the .rst file, then it is placed above the TOC in the HTML output, but it is moved to below the TOC in the pdf output. I've also tried adding a hidden toc, but that didn't work either. The content also gets placed after the non-hidden toc.
.. toctree::
:hidden:
frontmatter
.. toctree::
:maxdepth: 2
contents_of_document
I know this has to be possible since people have published books using this tool, but I can't figure out how to do it.
I've tried this with sphinx 1.4.0 and 1.4.1. Is this something I need to add a latex sty or cls file to make it work? I would prefer not to since we would like to use both the HTML and PDF outputs.
Thanks
It looks like I need to RTFM. It is in chapter 10 to of the sphinx manual:
’tableofcontents’ “tableofcontents” call, default ’\tableofcontents’. Override if you want to generate a different table of contents or put content between the title page and the TOC.
So it order to do this, you need to learn some LaTeX as you will have to manually (or programmatically) write the from matter separately from the reST documentation.
I am having a little trouble here with a Magento installation here, which I "inherited" from a company who did some pretty heavy customizations to the theme.
I tried to rationalize most of the changes and was pretty successful with it. The problem is now, that I have some template files which have only one line of change.
In this specific case for example it would be a <button> that is now an <a> link. This is pretty much only one line in a 300 line template file.
Similar problems occurred with layout files of extensions. They have ONE dirty line in there, which for example resets the whole layout.
I then need to overwrite the complete layout XML file in the design, just to make a little change in one line, because those layout files are either overwritten or not. There is not merging process involved.
I took a look into the designer's documentation of Magento, but could not find anything useful.
I know that I could do some specific layout changes in the "local.xml" in my design, but those are more or less "contextless", which is not that great if those changes do belong to a certain extension.
Do you know a way to apply little template changes like mentioned in the first half or partially layout file overrides?
My main goal is to keep the files automatically updatable, which pretty much means: Download the module, replace files, done.
No manual updates to any overwritten files.
Use the "inherited" template as default template in a new package and add a child template with your changes. Example:
app/design/frontend/[package_name]/default - here will be the "inherited" old template
app/design/frontend/[package_name]/[your_child_template] - here will be your new child template
skin/design/frontend/[package_name]/default - here will be the "inherited" old template
skin/design/frontend/[package_name]/[your_child_template] - here will be your new child template
Partially layout file overwrides can be done for all pages or extensions in one local.xml file. Example:
app/design/frontend/[package_name]/[your_child_template]/layout/local.xml
If you want to add changes for a certain extension just add the extension xml file in your template folder. It will be the last one rendered and will wthe original. Example for the checkout cart page:
app/design/frontend/[package_name]/[your_child_template]/template/checkout/cart.phtml
For a small change inside a phtml file like your button example you will have to overwrite the whole phtml file. There is no way in Magneto to overwrite just a part of a phtml file.
I've put together a block of RTML that i would like to add to a product page. Now that i've got that, I'm trying to figure out how to place that whole block of RTML into the product's template. That may not be the right way to do it.
my desired result is that the html of the product page is rendered PLUS the html that would be rendered by my added block of RTML.'
What I have tried: as far as I can tell, i can only use the editor to add RTML 1 line / update at a time. which means anything complicated would take forever.
Yes Kristian, you're absolutely right. The operators in RTML take a very, very long time to insert because it requires a page refresh for each operator in the store editor. If you have a lot of HTML to update, you can use the RTML template uploader located here http://www.yourstorewizards.com/rtml-transfer-utility.html . While it is free to "download" templates, you are charged for "uploading" templates. This is because you aren't truly uploading or downloading templates. What the program does is move your mouse around the screen very quickly doing all the clicking for you.
At the very least, you can use the MULTI command to group other commands together. That way you can quickly duplicate operators/HTML. You can take a bunch of TEXT operators and quickly duplicate them inside a MULTI, and then duplicate the MULTI. This is probably one of the most efficient ways to do large blocks of HTML.
Another idea... Print out a script tag using a TEXT operator, and insert your HTML with JavaScript. Obviously you won't want to do this all the time, but if you're looking to insert a very large piece of HTML this may be your best bet.
"Change an item in the navigation? Sure I can do that in 15 minutes."
So I am trying to update the navigation on a site that I inherited only to find out that the previous programmer was a college student and was using this site as a project of some sort. Needless to say there are zero comments and the code calls function after function and I just can't follow the logic.
I am looking for a roundabout way to update the navigation. I tried using Dreamweaver to search through all of the files in the site and look for any files that contain the name of the page or the url (hoping to find some sort of included file). There was none. I did file text files that control the main navigation but none for the subnavigation.
There is no database.
If it helps here is the site. http://bit.ly/jbs639
And if you want to look at the interesting text file that is parsed to create the main navigation you can find it here: http://bit.ly/m3erna
Hmmm.... Interesting indeed. You have my sympathy.
One thing that I would look at... The file that gets parsed for the main navigation appears to be a simple delimited file. Sure, the delimiter is a rather unusual +++, but that choice means it avoids conflict with things like commas that might be desirable in the link text. It looks as if the last element indicates what type of resource is being accessed (file or directory, although I don't know what - if any - effect that has on the final output). It also appears that there are similar text files (in the framework/cfg/nav/ folder... which should probably not be generally accessible BTW) for the sub-menus. (E.g. the file stores.txt appears to contain the additional navigation items associated with the stores sub-navigation).
You don't mention which sub-menu you're trying to change. I suspect it is the "About TTO" one, which I can't find an entry for... but I'd look to see if there are any similar navigation text files in the /content/about/ folder.
Good Luck!
Of course it was as simple as a function that reads all of the files in the directory and the name of the file. I guess that in this case there was no shortcut.